MCPcopy
hub / github.com/kysely-org/kysely / findUserById

Function findUserById

example/src/user/user.repository.ts:18–29  ·  view source on GitHub ↗
(
  db: Kysely<Database>,
  id: string,
)

Source from the content-addressed store, hash-verified

16}
17
18export async function findUserById(
19 db: Kysely<Database>,
20 id: string,
21): Promise<UserRow | undefined> {
22 const user = await db
23 .selectFrom('user')
24 .where('user_id', '=', id)
25 .selectAll('user')
26 .executeTakeFirst()
27
28 return user
29}
30
31export async function lockUserById(
32 trx: Transaction<Database>,

Callers

nothing calls this directly

Calls 4

executeTakeFirstMethod · 0.65
selectAllMethod · 0.65
whereMethod · 0.65
selectFromMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…