Skip to content

FindFirstOptions

FindFirstOptions = Omit<FindManyOptions, "limit" | "offset">

Defined in: packages/db/src/types.ts:210

Options for db.query(table).findFirst().

Same as FindManyOptions without limit/offset (returns the first match or undefined).

db.query(posts).findFirst({
where: eq(posts.id, "abc-123"),
});