Answer Overflow Logo
Change Theme
Search Answer Overflow
GitHub
Add Your Server
Login
Home
Popular
Topics
Gaming
Programming
grimrippa
Posts
Comments
DT
Drizzle Team
•
Created by Flo on 5/24/2023 in
#help
select with limit of 1
I've been doing something like
const
[
user
]
= await
db.
select
().
from
(users).
where
(
eq
(users.id, userId)).
limit
(
1
);
const
[
user
]
= await
db.
select
().
from
(users).
where
(
eq
(users.id, userId)).
limit
(
1
);
Which seems to get the inference right but I don't know how typesafe this is.
12 replies