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

Method as

src/raw-builder/raw-builder.ts:87–87  ·  view source on GitHub ↗

* Returns an aliased version of the SQL expression. * * In addition to slapping `as "the_alias"` to the end of the SQL, * this method also provides strict typing: * * ```ts * import { sql } from 'kysely' * * const result = await db * .selectFrom('person') * .select(

(alias: A)

Source from the content-addressed store, hash-verified

85 * ```
86 */
87 as<A extends string>(alias: A): AliasedRawBuilder<O, A>
88 as<A extends string>(alias: Expression<any>): AliasedRawBuilder<O, A>
89
90 /**

Callers 15

testKyselyAnySelectsFunction · 0.65
testFromSingleFunction · 0.65
testFromMultipleFunction · 0.65
testSelectSingleFunction · 0.65
testSelectAllFunction · 0.65
testSelectMultipleFunction · 0.65
testManyNestedSubqueriesFunction · 0.65
testJSONReferenceFunction · 0.65
testHugeDBSelectFunction · 0.65

Implementers 1

RawBuilderImplsrc/raw-builder/raw-builder.ts

Calls

no outgoing calls

Tested by 5

testFunction · 0.52
getNewestPersonFunction · 0.52
valuesFunction · 0.52
getNewestPersonFunction · 0.52
createViewFunction · 0.52