A type-safe TypeScript SQL query builder
This report summarizes scanner evidence for kysely-org/kysely, a TypeScript project with 14,320 GitHub stars. SynthScan examined 125,661 lines of code across 634 source files, recording 106 pattern matches distributed across 5 syntactic categories. The legacy adjusted pattern signal is 0.9 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 104 finding(s).
Are imports declared and package/API names verified? 2 finding(s).
Are wrappers, guards, and repeated structures necessary? 87 finding(s).
Which changes need focused human review? 106 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 106 distinct pattern matches across 5 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deno.check.d.ts | 93 | export function functionThatExpectsPersonWithNonNullValue( | CODE |
| LOW⚡ | test/ts-benchmarks/generic.bench.ts | 40 | declare function acceptsNarrowSelectQueryBuilder( | CODE |
| LOW⚡ | test/ts-benchmarks/generic.bench.ts | 48 | declare function acceptsNarrowExpressionBuilder( | CODE |
| LOW⚡ | test/ts-benchmarks/generic.bench.ts | 56 | declare function acceptsTwoTableExpressionBuilder( | CODE |
| LOW⚡ | test/ts-benchmarks/generic.bench.ts | 70 | declare function acceptsNarrowDeleteQueryBuilder( | CODE |
| LOW⚡ | test/ts-benchmarks/generic.bench.ts | 80 | declare function acceptsNarrowUpdateQueryBuilder( | CODE |
| LOW⚡ | test/ts-benchmarks/generic.bench.ts | 90 | declare function acceptsNarrowMergeQueryBuilder( | CODE |
| LOW | test/typings/test-d/postgres-json.test-d.ts | 121 | async function testPostgresConditionalJsonSelects(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/expression.test-d.ts | 213 | async function testExpressionBuilderAnyWithColumnType( | CODE |
| LOW | test/typings/test-d/expression.test-d.ts | 237 | function testExpressionBuilderTuple(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/expression.test-d.ts | 302 | function testExpressionBuilderConstructor(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/expression.test-d.ts | 316 | function testTablelessExpressionBuilder( | CODE |
| LOW | test/typings/test-d/on-conflict-where.test-d.ts | 34 | function testGeneratedAndExcludedColumns() { | CODE |
| LOW | test/typings/test-d/on-conflict-where.test-d.ts | 45 | function testImmutableReferenceComparisons() { | CODE |
| LOW | test/typings/test-d/on-conflict-where.test-d.ts | 54 | function testReusablePredicateHelpers() { | CODE |
| LOW | test/typings/test-d/merge.test-d.ts | 189 | async function testWhenNotMatchedBySource( | CODE |
| LOW | test/typings/test-d/infer-result.test-d.ts | 15 | function testInferResultSelectQuery(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/infer-result.test-d.ts | 41 | function testInferResultInsertQuery(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/infer-result.test-d.ts | 69 | function testInferResultUpdateQuery(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/infer-result.test-d.ts | 110 | function testInferResultDeleteQuery(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/infer-result.test-d.ts | 133 | function testInferResultMergeQuery(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/create-table.test-d.ts | 5 | async function testCreateTableWithSeveralColumns(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/create-table.test-d.ts | 32 | async function testCreateTableWithAddUniqueConstraint(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/create-table.test-d.ts | 85 | async function testCreateTableWithAsStatement(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/index.test-d.ts | 25 | async function testKyselyAndTransactionTypes(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/index.test-d.ts | 35 | async function testExecuteTakeFirstOrThrow(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/generic-pre-5.4.test-d.ts | 14 | function testSelectQueryBuilderExtends() { | CODE |
| LOW | test/typings/test-d/generic-pre-5.4.test-d.ts | 28 | function testExpressionBuilderExtends() { | CODE |
| LOW | test/typings/test-d/generic-pre-5.4.test-d.ts | 42 | function testExpressionBuilderExtendsFuncArg() { | CODE |
| LOW | test/typings/test-d/alter-table.test-d.ts | 6 | async function testAlterTableWithAddUniqueConstraint(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 80 | async function testSelectWithDefaultGenerics(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 110 | async function testSelectExpressionBuilderWithDefaultGenerics( | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 142 | async function testSelectExpressionBuilderWithCustomGenerics( | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 169 | async function testSelectExpressionBuilderWithSubExpressions( | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 195 | async function testSelectWithCustomGenerics(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 233 | async function testSelectUnexpectedColumn(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 307 | async function testSelectWithDynamicReference(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 703 | async function testSelectWithOverAndPartitionBySingle(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 742 | async function testSelectWithOverAndPartitionByMultiple(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 789 | async function testSelectWithOverAndPartitionByUnexpectedColumns( | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 896 | async function testSelectWithOverAndOrderBySingle(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 935 | async function testSelectWithOverAndOrderByMultiple(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 974 | async function testSelectWithOverAndOrderByUnexpectedColumns( | CODE |
| LOW | test/typings/test-d/aggregate-function.test-d.ts | 1031 | async function testSelectAsCustomFunctionArgument(db: Kysely<Database>) { | CODE |
| LOW | test/typings/test-d/readonly.test-d.ts | 414 | async function testReadonlyControlledTransaction( | CODE |
| LOW | test/typings/test-d/generic.test-d.ts | 43 | function testSelectQueryBuilderExtends() { | CODE |
| LOW | test/typings/test-d/generic.test-d.ts | 56 | function testExpressionBuilderExtends() { | CODE |
| LOW | test/typings/test-d/generic.test-d.ts | 69 | function testExpressionBuilderExtendsFuncArg() { | CODE |
| LOW | test/node/src/test-setup.ts | 559 | function createNoopTransformerPlugin(): KyselyPlugin { | CODE |
| LOW | test/node/src/test-setup.ts | 659 | export function resolveJSONColumnDataType( | CODE |
| LOW | test/node/src/controlled-transaction.test.ts | 912 | async function startTransactionWithSavepoint() { | CODE |
| LOW | example/test/user/user.test.ts | 135 | async function createPasswordSignInMethod( | CODE |
| LOW | …e/src/user/sign-in-method/sign-in-method.repository.ts | 23 | export async function insertPasswordSignInMethod( | CODE |
| LOW | site/plugins/generate-agent-discovery-catalogs.ts | 7 | export default function generateAgentDiscoveryCatalogs(): Plugin { | CODE |
| LOW | …/docs/getting-started/IUseADifferentPackageManager.tsx | 8 | export function IUseADifferentPackageManager( | CODE |
| LOW | site/docs/getting-started/Instantiation.tsx | 113 | function getDialectSpecificCodeSnippet( | CODE |
| LOW | site/docs/recipes/0001-reusable-helpers.md | 131 | function idsOfPersonsThatHaveDogNamed(name: Expression<string>) { | CODE |
| LOW | site/src/components/playground-example-types.ts | 95 | export function functionThatExpectsPersonWithNonNullValue( | CODE |
| LOW | site/src/theme/DocCategoryGeneratedIndexPage/index.tsx | 8 | export default function DocCategoryGeneratedIndexPageWrapper( | CODE |
| LOW | src/kysely.ts | 1344 | function assertNotCommittedOrRolledBack( | CODE |
| 27 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pnpm-workspace.yaml | 61 | overrides: | COMMENT |
| LOW | test/typings/test-d/generic.test-d.ts | 21 | // 1. A method that accepts a `DB`/`TB`-parameterized expression type must keep it | COMMENT |
| LOW | site/docs/getting-started/TypesCode.tsx | 41 | // made optional in inserts and updates. | COMMENT |
| LOW | site/docs/examples/select/0051-not-null.js | 21 | // The special \`NotNull\` type can be used to make a | COMMENT |
| LOW | src/dialect/mssql/mssql-introspector.ts | 181 | // encryption_type: null | COMMENT |
| LOW | src/dialect/mssql/mssql-introspector.ts | 221 | 'sys.schemas': { | COMMENT |
| LOW | src/dialect/mssql/mssql-introspector.ts | 241 | // is_edge: boolean | COMMENT |
| LOW | src/dialect/mssql/mssql-introspector.ts | 261 | // lock_on_bulk_load: boolean | COMMENT |
| LOW | src/dialect/mssql/mssql-introspector.ts | 281 | // is_table_type: boolean | COMMENT |
| LOW | src/dialect/mssql/mssql-introspector.ts | 301 | // is_msh_shipped: boolean | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/kysely.ts | 1045 | * async function doSomething(kysely: Kysely<Database>) {} | COMMENT |
| LOW | src/kysely.ts | 1086 | * async function doSomething(kysely: Kysely<Database>) {} | COMMENT |
| LOW | src/kysely.ts | 1133 | * async function doSomething(kysely: Kysely<Database>) {} | COMMENT |
| LOW | src/kysely.ts | 1185 | * async function doSomething(kysely: Kysely<Database>) {} | COMMENT |
| LOW | src/kysely.ts | 1245 | * async function doSomething(kysely: Kysely<Database>) {} | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/publish.yml | 57 | # Check if tag points to a commit that exists on the expected branch | COMMENT |
| LOW | .github/workflows/bench.yml | 89 | # Check if there are benchmark changes | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/node/src/camel-case.test.ts | 70 | addressRow1: '123 Main St', | CODE |
| LOW | test/node/src/camel-case.test.ts | 76 | addressRow1: '123 Main St', | CODE |