Created
May 17, 2024 21:31
-
-
Save PaulieScanlon/8c83e0520be81f3785787081c6f60fc4 to your computer and use it in GitHub Desktop.
Select Example Drizzle ORM query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.select({ | |
id: users.user_id, | |
first_name: users.first_name, | |
last_name: users.last_name, | |
email: users.email, | |
role: users.role, | |
}) | |
.from(users) | |
.where(eq(users.role, 'admin')) | |
.orderBy(users.last_name); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment