Repository Analysis

drizzle-team/drizzle-orm

ORM

0.9 Likely human-written View on GitHub
0.9
Adjusted Score
0.9
Raw Score
100%
Time Factor
2026-05-29
Last Push
34,588
Stars
TypeScript
Language
481,716
Lines of Code
1335
Files
605
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 0LOW 605

Pattern Findings

605 matches across 3 categories. Click a row to expand file-level details.

Over-Commented Block567 hits · 402 pts
SeverityFileLineSnippet
LOWdrizzle-kit/tests/cli-generate.test.ts1import { test as brotest } from '@drizzle-team/brocli';
LOWdrizzle-kit/tests/pg-identity.test.ts1import { integer, pgSequence, pgTable } from 'drizzle-orm/pg-core';
LOWdrizzle-kit/tests/push/pg.test.ts1001 // async addVectorIndexes() {
LOWdrizzle-kit/tests/push/pg.test.ts1021 // .with({ m: 16, ef_construction: 64 }),
LOWdrizzle-kit/tests/migrate/libsql-migrate.test.ts41// const res = await query(`PRAGMA table_info("users");`);
LOWdrizzle-kit/src/introspect-gel.ts101// const mappedTableEntries = Object.entries(val).map((tableEntry) => {
LOWdrizzle-kit/src/introspect-gel.ts121// if (value.name === columnName) {
LOWdrizzle-kit/src/introspect-gel.ts141// relationsConfig.tableNamesMap[relation.referencedTableName].split('.')[1]
LOWdrizzle-kit/src/introspect-gel.ts161// }`,
LOWdrizzle-kit/src/introspect-gel.ts301 // Object.values(schema.enums).forEach((it) => {
LOWdrizzle-kit/src/introspect-gel.ts321 // const values = Object.values(it.values)
LOWdrizzle-kit/src/introspect-gel.ts341 // if (it.increment) {
LOWdrizzle-kit/src/introspect-gel.ts461 // : 'gelView';
LOWdrizzle-kit/src/introspect-gel.ts881
LOWdrizzle-kit/src/introspect-gel.ts901 // paramName,
LOWdrizzle-kit/src/utils.ts81};
LOWdrizzle-kit/src/jsonStatements.ts2361 // newDataType: columnType,
LOWdrizzle-kit/src/jsonStatements.ts2381 // columnOnUpdate,
LOWdrizzle-kit/src/introspect-pg.ts1161
LOWdrizzle-kit/src/introspect-pg.ts1181 // )
LOWdrizzle-kit/src/snapshotsDiffer.ts1681 );
LOWdrizzle-kit/src/serializer/sqliteSerializer.ts821 // }
LOWdrizzle-kit/src/serializer/gelSerializer.ts201 // const existingUnique = uniqueConstraintObject[column.uniqueName!];
LOWdrizzle-kit/src/serializer/gelSerializer.ts221 // )
LOWdrizzle-kit/src/serializer/gelSerializer.ts281 // uniqueConstraints?.map((unq) => {
LOWdrizzle-kit/src/serializer/gelSerializer.ts301 // // );
LOWdrizzle-kit/src/serializer/gelSerializer.ts521 });
LOWdrizzle-kit/src/serializer/gelSerializer.ts541 // tableName,
LOWdrizzle-kit/src/serializer/gelSerializer.ts1041
LOWdrizzle-kit/src/serializer/gelSerializer.ts1061 // FROM pg_class
LOWdrizzle-kit/src/serializer/gelSerializer.ts1161 // const constraintName: string = unqs.constraint_name;
LOWdrizzle-kit/src/serializer/gelSerializer.ts1221 // const tableCompositePkName = await db.query(
LOWdrizzle-kit/src/cli/commands/introspect.ts241 const schemaFile = join(out, 'schema.ts');
LOWdrizzle-kit/src/cli/commands/introspect.ts261 // viewsResolver,
LOWdrizzle-kit/src/cli/commands/pgPushUtils.ts1import chalk from 'chalk';
LOWdrizzle-kit/src/cli/commands/pgPushUtils.ts21// if (
LOWdrizzle-kit/src/cli/commands/singlestorePushUtils.ts61 // ) as JsonAlterColumnTypeStatement;
LOWdrizzle-arktype/tests/singlestore.test.ts81// const view = mysqlView('test').as((qb) => qb.select({ id: table.id, age: sql``.as('age') }).from(table));
LOWdrizzle-arktype/tests/singlestore.test.ts101// test('view with nested fields - select', (t) => {
LOWdrizzle-arktype/tests/singlestore.test.ts281// c6: int(),
LOWdrizzle-arktype/tests/singlestore.test.ts301// c5: (schema) => v.pipe(schema, v.maxValue(1000)),
LOWdrizzle-arktype/tests/singlestore.test.ts481}
LOWdrizzle-arktype/tests/singlestore.test.ts501// // @ts-expect-error
LOWdrizzle-valibot/tests/singlestore.test.ts81 Expect<Equal<typeof result, typeof expected>>();
LOWdrizzle-valibot/tests/singlestore.test.ts101// id: serial().primaryKey(),
LOWdrizzle-valibot/tests/singlestore.test.ts121// age: sql``.as('age'),
LOWdrizzle-valibot/tests/singlestore.test.ts281 Expect<Equal<typeof result, typeof expected>>();
LOWdrizzle-valibot/tests/singlestore.test.ts301// c6: table.c6,
LOWdrizzle-valibot/tests/singlestore.test.ts321// c2: v.nullable(v.pipe(intSchema, v.maxValue(1000))),
LOWdrizzle-valibot/tests/singlestore.test.ts501// const view = mysqlView('test').as((qb) => qb.select().from(table));
LOWintegration-tests/sst-env.d.ts1// eslint-disable-next-line @typescript-eslint/triple-slash-reference
LOWintegration-tests/tests/awsdatapi.alltypes.test.ts1/* eslint-disable unicorn/no-empty-file */
LOWintegration-tests/tests/awsdatapi.alltypes.test.ts21// jsonb,
LOWintegration-tests/tests/awsdatapi.alltypes.test.ts41// numeric: numeric('numeric'),
LOWintegration-tests/tests/awsdatapi.alltypes.test.ts61// realdef: real('realdef').default(100),
LOWintegration-tests/tests/awsdatapi.alltypes.test.ts81// }
LOWintegration-tests/tests/awsdatapi.alltypes.test.ts101// });
LOWintegration-tests/tests/awsdatapi.alltypes.test.ts121// "varchardef" varchar DEFAULT 'text',
LOWintegration-tests/tests/awsdatapi.alltypes.test.ts141// "timestampdef" timestamp DEFAULT now(),
LOWintegration-tests/tests/awsdatapi.alltypes.test.ts161// bigserial: 63473487,
507 more matches not shown…
Hyper-Verbose Identifiers27 hits · 32 pts
SeverityFileLineSnippet
LOWdrizzle-kit/tests/schemaDiffer.ts1940export async function diffTestSchemasPushLibSQL(
LOWdrizzle-kit/src/serializer/sqliteSerializer.ts498function filterIgnoredTablesByField(fieldName: string) {
LOWdrizzle-kit/src/serializer/gelSerializer.ts44function stringFromIdentityProperty(field: string | number | undefined): string | undefined {
LOWdrizzle-kit/src/serializer/gelSerializer.ts48function maxRangeForIdentityBasedOn(columnType: string) {
LOWdrizzle-kit/src/serializer/gelSerializer.ts52function minRangeForIdentityBasedOn(columnType: string) {
LOWdrizzle-kit/src/serializer/gelSerializer.ts56function stringFromDatabaseIdentityProperty(field: any): string | undefined {
LOWdrizzle-kit/src/serializer/pgSerializer.ts50function stringFromIdentityProperty(field: string | number | undefined): string | undefined {
LOWdrizzle-kit/src/serializer/pgSerializer.ts54function maxRangeForIdentityBasedOn(columnType: string) {
LOWdrizzle-kit/src/serializer/pgSerializer.ts58function minRangeForIdentityBasedOn(columnType: string) {
LOWdrizzle-kit/src/serializer/pgSerializer.ts62function stringFromDatabaseIdentityProperty(field: any): string | undefined {
LOWdrizzle-kit/src/cli/commands/migrate.ts589function singleStoreSchemaSuggestions(
LOWdrizzle-kit/src/cli/commands/singlestorePushUtils.ts109export function findColumnTypeAlternations(
LOWintegration-tests/tests/mysql-returning.test.ts133async function setupReturningFunctionsTest(db: MySql2Database) {
LOWintegration-tests/tests/sqlite/sqlite-common.ts318 async function setupAggregateFunctionsTest(db: BaseSQLiteDatabase<any, any>) {
LOWintegration-tests/tests/sqlite/durable-objects/index.ts168async function setupAggregateFunctionsTest(db: BaseSQLiteDatabase<any, any>) {
LOWintegration-tests/tests/bun/bun-sql.test.ts562async function setupAggregateFunctionsTest(db: PgDatabase<PgQueryResultHKT>) {
LOWintegration-tests/tests/pg/pg-common.ts581 async function setupAggregateFunctionsTest(db: PgDatabase<PgQueryResultHKT>) {
LOWintegration-tests/tests/mysql/mysql-common.ts394 async function setupReturningFunctionsTest(db: MySqlDatabase<any, any>) {
LOWintegration-tests/tests/mysql/mysql-common.ts446 async function setupAggregateFunctionsTest(db: TestMySQLDB) {
LOWintegration-tests/tests/gel/gel.test.ts633 async function setupAggregateFunctionsTest(db: GelJsDatabase) {
LOW…egration-tests/tests/singlestore/singlestore-common.ts381 async function setupReturningFunctionsTest(
LOW…egration-tests/tests/singlestore/singlestore-common.ts435 async function setupAggregateFunctionsTest(db: TestSingleStoreDB) {
LOWdrizzle-orm/src/alias.ts109export function mapColumnsInAliasedSQLToAlias(query: SQL.Aliased, alias: string): SQL.Aliased {
LOWdrizzle-orm/src/pg-core/view.ts397export function pgMaterializedViewWithSchema(
LOWdrizzle-orm/src/gel-core/view.ts397export function gelMaterializedViewWithSchema(
LOWdrizzle-orm/src/singlestore-core/view.ts188// export function singlestoreViewWithSchema(
LOWdrizzle-orm/src/singlestore-core/columns/all.ts27export function getSingleStoreColumnBuilders() {
Fake / Example Data11 hits · 12 pts
SeverityFileLineSnippet
LOWdrizzle-arktype/README.md47 name: 'John Doe',
LOWdrizzle-valibot/README.md47 name: 'John Doe',
LOWdrizzle-zod/README.md58 name: 'John Doe',
LOWchangelogs/drizzle-arktype/0.1.2.md47 name: 'John Doe',
LOWdrizzle-seed/src/datasets/loremIpsumSentences.ts5 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
LOWdrizzle-seed/src/datasets/loremIpsumSentences.ts5 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
LOWdrizzle-seed/src/datasets/loremIpsumSentences.ts679 'Vivamus scelerisque dolor sit amet erat dapibus consectetur.',
LOWdrizzle-seed/src/datasets/loremIpsumSentences.ts1346 'Integer sagittis dolor sit amet velit mollis, quis sodales odio sollicitudin.',
LOWdrizzle-seed/src/services/GeneratorFuncs.ts651 * generates 'lorem ipsum' text sentences.
LOWdrizzle-seed/src/services/Generators.ts2788 `You can't use lorem ipsum generator with a db column length restriction of ${this.stringLength}. Set the maximum st
LOWdrizzle-typebox/README.md48 name: 'John Doe',