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

Function getNewestPerson

test/node/src/insert.test.ts:1144–1156  ·  view source on GitHub ↗
(
    db: Kysely<Database>,
  )

Source from the content-addressed store, hash-verified

1142 })
1143
1144 async function getNewestPerson(
1145 db: Kysely<Database>,
1146 ): Promise<Pick<Person, 'first_name' | 'last_name'> | undefined> {
1147 return await db
1148 .selectFrom('person')
1149 .select(['first_name', 'last_name'])
1150 .where(
1151 'id',
1152 '=',
1153 db.selectFrom('person').select(sql<number>`max(id)`.as('max_id')),
1154 )
1155 .executeTakeFirst()
1156 }
1157}
1158
1159function values<R extends Record<string, unknown>, A extends string>(

Callers 1

insert.test.tsFile · 0.70

Calls 5

executeTakeFirstMethod · 0.65
whereMethod · 0.65
selectMethod · 0.65
selectFromMethod · 0.65
asMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…