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

Function getNewestPerson

test/node/src/replace.test.ts:213–225  ·  view source on GitHub ↗
(
      db: Kysely<Database>,
    )

Source from the content-addressed store, hash-verified

211 })
212
213 async function getNewestPerson(
214 db: Kysely<Database>,
215 ): Promise<Pick<Person, 'first_name' | 'last_name'> | undefined> {
216 return await db
217 .selectFrom('person')
218 .select(['first_name', 'last_name'])
219 .where(
220 'id',
221 '=',
222 db.selectFrom('person').select(sql<number>`max(id)`.as('max_id')),
223 )
224 .executeTakeFirst()
225 }
226 }
227}

Callers 1

replace.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…