Copy disabled (too large)
Download .txt
Showing preview only (11,156K chars total). Download the full file to get everything.
Repository: drizzle-team/drizzle-orm
Branch: main
Commit: 4aa6ecfee4b4
Files: 1373
Total size: 10.4 MB
Directory structure:
gitextract_jk7qoxoz/
├── .eslintignore
├── .eslintrc.yaml
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug-template.yaml
│ │ ├── config.yml
│ │ ├── docs-template.yaml
│ │ └── feature-template.yaml
│ └── workflows/
│ ├── codeql.yml
│ ├── release-feature-branch.yaml
│ ├── release-latest.yaml
│ ├── router.yaml
│ └── unpublish-release-feature-branch.yaml
├── .gitignore
├── .markdownlint.yaml
├── .npmrc
├── .nvmrc
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── changelogs/
│ ├── README.md
│ ├── drizzle-arktype/
│ │ ├── 0.1.2.md
│ │ └── 0.1.3.md
│ ├── drizzle-kit/
│ │ ├── 0.23.2.md
│ │ ├── 0.24.0.md
│ │ ├── 0.24.1.md
│ │ ├── 0.24.2.md
│ │ ├── 0.25.0.md
│ │ ├── 0.26.0.md
│ │ ├── 0.26.1.md
│ │ ├── 0.26.2.md
│ │ ├── 0.27.0.md
│ │ ├── 0.27.1.md
│ │ ├── 0.27.2.md
│ │ ├── 0.28.0.md
│ │ ├── 0.28.1.md
│ │ ├── 0.29.0.md
│ │ ├── 0.29.1.md
│ │ ├── 0.30.0.md
│ │ ├── 0.30.1.md
│ │ ├── 0.30.2.md
│ │ ├── 0.30.3.md
│ │ ├── 0.30.4.md
│ │ ├── 0.30.5.md
│ │ ├── 0.30.6.md
│ │ ├── 0.31.0.md
│ │ ├── 0.31.1.md
│ │ ├── 0.31.10.md
│ │ ├── 0.31.2.md
│ │ ├── 0.31.3.md
│ │ ├── 0.31.4.md
│ │ ├── 0.31.5.md
│ │ ├── 0.31.6.md
│ │ ├── 0.31.7.md
│ │ ├── 0.31.8.md
│ │ └── 0.31.9.md
│ ├── drizzle-orm/
│ │ ├── 0.12.0-beta.23.md
│ │ ├── 0.12.0-beta.24.md
│ │ ├── 0.13.0.md
│ │ ├── 0.13.1.md
│ │ ├── 0.14.1.md
│ │ ├── 0.14.2.md
│ │ ├── 0.15.0.md
│ │ ├── 0.15.1.md
│ │ ├── 0.15.2.md
│ │ ├── 0.15.3.md
│ │ ├── 0.16.0.md
│ │ ├── 0.16.1.md
│ │ ├── 0.17.0.md
│ │ ├── 0.17.1.md
│ │ ├── 0.17.2.md
│ │ ├── 0.17.3.md
│ │ ├── 0.17.4.md
│ │ ├── 0.17.5.md
│ │ ├── 0.17.6.md
│ │ ├── 0.17.7.md
│ │ ├── 0.18.0.md
│ │ ├── 0.19.0.md
│ │ ├── 0.19.1.md
│ │ ├── 0.20.0.md
│ │ ├── 0.20.1.md
│ │ ├── 0.20.2.md
│ │ ├── 0.20.3.md
│ │ ├── 0.21.0.md
│ │ ├── 0.21.1.md
│ │ ├── 0.22.0.md
│ │ ├── 0.23.0.md
│ │ ├── 0.23.1.md
│ │ ├── 0.23.10.md
│ │ ├── 0.23.11.md
│ │ ├── 0.23.12.md
│ │ ├── 0.23.13.md
│ │ ├── 0.23.2.md
│ │ ├── 0.23.3.md
│ │ ├── 0.23.4.md
│ │ ├── 0.23.5.md
│ │ ├── 0.23.6.md
│ │ ├── 0.23.7.md
│ │ ├── 0.23.8.md
│ │ ├── 0.23.9.md
│ │ ├── 0.24.0.md
│ │ ├── 0.24.1.md
│ │ ├── 0.24.2.md
│ │ ├── 0.24.3.md
│ │ ├── 0.24.4.md
│ │ ├── 0.24.5.md
│ │ ├── 0.25.0.md
│ │ ├── 0.25.1.md
│ │ ├── 0.25.2.md
│ │ ├── 0.25.3.md
│ │ ├── 0.25.4.md
│ │ ├── 0.26.0.md
│ │ ├── 0.26.1.md
│ │ ├── 0.26.2.md
│ │ ├── 0.26.3.md
│ │ ├── 0.26.4.md
│ │ ├── 0.26.5.md
│ │ ├── 0.27.0.md
│ │ ├── 0.27.1.md
│ │ ├── 0.27.2.md
│ │ ├── 0.28.0.md
│ │ ├── 0.28.1.md
│ │ ├── 0.28.2.md
│ │ ├── 0.28.3.md
│ │ ├── 0.28.4.md
│ │ ├── 0.28.5.md
│ │ ├── 0.28.6.md
│ │ ├── 0.29.0.md
│ │ ├── 0.29.1.md
│ │ ├── 0.29.2.md
│ │ ├── 0.29.3.md
│ │ ├── 0.29.4.md
│ │ ├── 0.29.5.md
│ │ ├── 0.30.0.md
│ │ ├── 0.30.1.md
│ │ ├── 0.30.10.md
│ │ ├── 0.30.2.md
│ │ ├── 0.30.3.md
│ │ ├── 0.30.4.md
│ │ ├── 0.30.5.md
│ │ ├── 0.30.6.md
│ │ ├── 0.30.7-preview.md
│ │ ├── 0.30.7.md
│ │ ├── 0.30.8.md
│ │ ├── 0.30.9.md
│ │ ├── 0.31.0-beta.md
│ │ ├── 0.31.0.md
│ │ ├── 0.31.1.md
│ │ ├── 0.31.2.md
│ │ ├── 0.31.3.md
│ │ ├── 0.31.4.md
│ │ ├── 0.32.0-beta.md
│ │ ├── 0.32.0.md
│ │ ├── 0.32.1.md
│ │ ├── 0.32.2.md
│ │ ├── 0.33.0.md
│ │ ├── 0.34.0.md
│ │ ├── 0.34.1.md
│ │ ├── 0.35.0.md
│ │ ├── 0.35.1.md
│ │ ├── 0.35.2.md
│ │ ├── 0.35.3.md
│ │ ├── 0.36.0.md
│ │ ├── 0.36.1.md
│ │ ├── 0.36.2.md
│ │ ├── 0.36.3.md
│ │ ├── 0.36.4.md
│ │ ├── 0.37.0.md
│ │ ├── 0.38.0.md
│ │ ├── 0.38.1.md
│ │ ├── 0.38.2.md
│ │ ├── 0.38.3.md
│ │ ├── 0.38.4.md
│ │ ├── 0.39.0.md
│ │ ├── 0.39.1.md
│ │ ├── 0.39.2.md
│ │ ├── 0.39.3.md
│ │ ├── 0.40.0.md
│ │ ├── 0.40.1.md
│ │ ├── 0.41.0.md
│ │ ├── 0.42.0.md
│ │ ├── 0.43.0.md
│ │ ├── 0.43.1.md
│ │ ├── 0.44.0.md
│ │ ├── 0.44.1.md
│ │ ├── 0.44.2.md
│ │ ├── 0.44.3.md
│ │ ├── 0.44.4.md
│ │ ├── 0.44.5.md
│ │ ├── 0.44.6.md
│ │ ├── 0.44.7.md
│ │ ├── 0.45.0.md
│ │ └── 0.45.1.md
│ ├── drizzle-orm-mysql/
│ │ ├── 0.14.1.md
│ │ ├── 0.14.2.md
│ │ ├── 0.14.3.md
│ │ ├── 0.15.0.md
│ │ ├── 0.15.1.md
│ │ ├── 0.15.2.md
│ │ ├── 0.15.3.md
│ │ ├── 0.16.0.md
│ │ ├── 0.16.1.md
│ │ └── 0.16.2.md
│ ├── drizzle-orm-pg/
│ │ ├── 0.12.0-beta.40.md
│ │ ├── 0.13.0.md
│ │ ├── 0.13.1.md
│ │ ├── 0.13.2.md
│ │ ├── 0.13.3.md
│ │ ├── 0.13.4.md
│ │ ├── 0.14.0.md
│ │ ├── 0.14.1.md
│ │ ├── 0.14.2.md
│ │ ├── 0.14.3.md
│ │ ├── 0.14.4.md
│ │ ├── 0.15.0.md
│ │ ├── 0.15.1.md
│ │ ├── 0.15.2.md
│ │ ├── 0.15.3.md
│ │ ├── 0.16.0.md
│ │ ├── 0.16.1.md
│ │ ├── 0.16.2.md
│ │ └── 0.16.3.md
│ ├── drizzle-orm-sqlite/
│ │ ├── 0.12.0-beta.17.md
│ │ ├── 0.12.0-beta.18.md
│ │ ├── 0.12.0-beta.19.md
│ │ ├── 0.12.0-beta.20.md
│ │ ├── 0.12.0-beta.21.md
│ │ ├── 0.13.0.md
│ │ ├── 0.14.1.md
│ │ ├── 0.14.2.md
│ │ ├── 0.14.3.md
│ │ ├── 0.14.4.md
│ │ ├── 0.14.5.md
│ │ ├── 0.15.0.md
│ │ ├── 0.15.2.md
│ │ ├── 0.15.3.md
│ │ ├── 0.15.4.md
│ │ ├── 0.16.0.md
│ │ └── 0.16.1.md
│ ├── drizzle-seed/
│ │ ├── 0.1.1.md
│ │ ├── 0.1.2.md
│ │ ├── 0.1.3.md
│ │ ├── 0.2.1.md
│ │ ├── 0.3.0.md
│ │ └── 0.3.1.md
│ ├── drizzle-typebox/
│ │ ├── 0.1.0.md
│ │ ├── 0.1.1.md
│ │ ├── 0.2.0.md
│ │ ├── 0.2.1.md
│ │ ├── 0.3.0.md
│ │ ├── 0.3.1.md
│ │ ├── 0.3.2.md
│ │ └── 0.3.3.md
│ ├── drizzle-valibot/
│ │ ├── 0.1.0.md
│ │ ├── 0.1.1.md
│ │ ├── 0.2.0.md
│ │ ├── 0.3.0.md
│ │ ├── 0.3.1.md
│ │ ├── 0.4.0.md
│ │ ├── 0.4.1.md
│ │ └── 0.4.2.md
│ ├── drizzle-zod/
│ │ ├── 0.1.0.md
│ │ ├── 0.1.1.md
│ │ ├── 0.1.2.md
│ │ ├── 0.1.3.md
│ │ ├── 0.1.4.md
│ │ ├── 0.2.0.md
│ │ ├── 0.2.1.md
│ │ ├── 0.3.0.md
│ │ ├── 0.3.1.md
│ │ ├── 0.3.2.md
│ │ ├── 0.4.0.md
│ │ ├── 0.4.1.md
│ │ ├── 0.4.2.md
│ │ ├── 0.4.3.md
│ │ ├── 0.4.4.md
│ │ ├── 0.5.0.md
│ │ ├── 0.5.1.md
│ │ ├── 0.6.0.md
│ │ ├── 0.6.1.md
│ │ ├── 0.7.0.md
│ │ ├── 0.7.1.md
│ │ ├── 0.8.0.md
│ │ ├── 0.8.1.md
│ │ ├── 0.8.2.md
│ │ └── 0.8.3.md
│ └── eslint-plugin-drizzle/
│ ├── 0.2.0.md
│ ├── 0.2.1.md
│ ├── 0.2.2.md
│ └── 0.2.3.md
├── docs/
│ ├── custom-types.lite.md
│ ├── custom-types.md
│ ├── joins.md
│ └── table-introspect-api.md
├── dprint.json
├── drizzle-arktype/
│ ├── README.md
│ ├── benchmarks/
│ │ └── types.ts
│ ├── package.json
│ ├── rollup.config.ts
│ ├── scripts/
│ │ ├── build.ts
│ │ └── fix-imports.ts
│ ├── src/
│ │ ├── column.ts
│ │ ├── column.types.ts
│ │ ├── constants.ts
│ │ ├── index.ts
│ │ ├── schema.ts
│ │ ├── schema.types.internal.ts
│ │ ├── schema.types.ts
│ │ └── utils.ts
│ ├── tests/
│ │ ├── mysql.test.ts
│ │ ├── pg.test.ts
│ │ ├── singlestore.test.ts
│ │ ├── sqlite.test.ts
│ │ ├── tsconfig.json
│ │ └── utils.ts
│ ├── tsconfig.build.json
│ ├── tsconfig.json
│ └── vitest.config.ts
├── drizzle-kit/
│ ├── .gitignore
│ ├── README.md
│ ├── build.dev.ts
│ ├── build.ts
│ ├── imports-checker/
│ │ ├── analyze.ts
│ │ ├── checker.ts
│ │ ├── grammar/
│ │ │ ├── grammar.ohm
│ │ │ ├── grammar.ohm-bundle.d.ts
│ │ │ └── grammar.ohm-bundle.js
│ │ └── index.ts
│ ├── package.json
│ ├── patches/
│ │ └── difflib@0.2.4.patch
│ ├── src/
│ │ ├── @types/
│ │ │ └── utils.ts
│ │ ├── api.ts
│ │ ├── cli/
│ │ │ ├── commands/
│ │ │ │ ├── _es5.ts
│ │ │ │ ├── check.ts
│ │ │ │ ├── drop.ts
│ │ │ │ ├── introspect.ts
│ │ │ │ ├── libSqlPushUtils.ts
│ │ │ │ ├── migrate.ts
│ │ │ │ ├── mysqlIntrospect.ts
│ │ │ │ ├── mysqlPushUtils.ts
│ │ │ │ ├── mysqlUp.ts
│ │ │ │ ├── pgIntrospect.ts
│ │ │ │ ├── pgPushUtils.ts
│ │ │ │ ├── pgUp.ts
│ │ │ │ ├── push.ts
│ │ │ │ ├── singlestoreIntrospect.ts
│ │ │ │ ├── singlestorePushUtils.ts
│ │ │ │ ├── singlestoreUp.ts
│ │ │ │ ├── sqliteIntrospect.ts
│ │ │ │ ├── sqlitePushUtils.ts
│ │ │ │ ├── sqliteUp.ts
│ │ │ │ └── utils.ts
│ │ │ ├── connections.ts
│ │ │ ├── index.ts
│ │ │ ├── schema.ts
│ │ │ ├── selector-ui.ts
│ │ │ ├── utils.ts
│ │ │ ├── validations/
│ │ │ │ ├── cli.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── gel.ts
│ │ │ │ ├── libsql.ts
│ │ │ │ ├── mysql.ts
│ │ │ │ ├── outputs.ts
│ │ │ │ ├── postgres.ts
│ │ │ │ ├── singlestore.ts
│ │ │ │ ├── sqlite.ts
│ │ │ │ └── studio.ts
│ │ │ └── views.ts
│ │ ├── extensions/
│ │ │ ├── getTablesFilterByExtensions.ts
│ │ │ └── vector.ts
│ │ ├── global.ts
│ │ ├── index.ts
│ │ ├── introspect-gel.ts
│ │ ├── introspect-mysql.ts
│ │ ├── introspect-pg.ts
│ │ ├── introspect-singlestore.ts
│ │ ├── introspect-sqlite.ts
│ │ ├── jsonDiffer.js
│ │ ├── jsonStatements.ts
│ │ ├── loader.mjs
│ │ ├── migrationPreparator.ts
│ │ ├── schemaValidator.ts
│ │ ├── serializer/
│ │ │ ├── gelSchema.ts
│ │ │ ├── gelSerializer.ts
│ │ │ ├── index.ts
│ │ │ ├── mysqlImports.ts
│ │ │ ├── mysqlSchema.ts
│ │ │ ├── mysqlSerializer.ts
│ │ │ ├── pgImports.ts
│ │ │ ├── pgSchema.ts
│ │ │ ├── pgSerializer.ts
│ │ │ ├── singlestoreImports.ts
│ │ │ ├── singlestoreSchema.ts
│ │ │ ├── singlestoreSerializer.ts
│ │ │ ├── sqliteImports.ts
│ │ │ ├── sqliteSchema.ts
│ │ │ ├── sqliteSerializer.ts
│ │ │ ├── studio.ts
│ │ │ └── utils.ts
│ │ ├── simulator.ts
│ │ ├── snapshotsDiffer.ts
│ │ ├── sqlgenerator.ts
│ │ ├── statementCombiner.ts
│ │ ├── utils/
│ │ │ ├── certs.ts
│ │ │ └── words.ts
│ │ └── utils.ts
│ ├── tests/
│ │ ├── bin.test.ts
│ │ ├── cli/
│ │ │ ├── d1http.config.ts
│ │ │ ├── drizzle.config.ts
│ │ │ ├── durable-sqlite.config.ts
│ │ │ ├── expo.config.ts
│ │ │ ├── postgres.config.ts
│ │ │ ├── postgres2.config.ts
│ │ │ ├── schema.ts
│ │ │ └── turso.config.ts
│ │ ├── cli-export.test.ts
│ │ ├── cli-generate.test.ts
│ │ ├── cli-migrate.test.ts
│ │ ├── cli-push.test.ts
│ │ ├── common.ts
│ │ ├── indexes/
│ │ │ ├── common.ts
│ │ │ └── pg.test.ts
│ │ ├── introspect/
│ │ │ ├── gel.ext.test.ts
│ │ │ ├── gel.test.ts
│ │ │ ├── libsql.test.ts
│ │ │ ├── mysql.test.ts
│ │ │ ├── pg.test.ts
│ │ │ ├── singlestore.test.ts
│ │ │ └── sqlite.test.ts
│ │ ├── libsql-checks.test.ts
│ │ ├── libsql-statements.test.ts
│ │ ├── libsql-views.test.ts
│ │ ├── migrate/
│ │ │ ├── libsq-schema.ts
│ │ │ ├── libsql-migrate.test.ts
│ │ │ └── migrations/
│ │ │ ├── 0000_little_blizzard.sql
│ │ │ ├── 0001_nebulous_storm.sql
│ │ │ └── meta/
│ │ │ ├── 0000_snapshot.json
│ │ │ ├── 0001_snapshot.json
│ │ │ └── _journal.json
│ │ ├── mysql-checks.test.ts
│ │ ├── mysql-generated.test.ts
│ │ ├── mysql-schemas.test.ts
│ │ ├── mysql-views.test.ts
│ │ ├── mysql.test.ts
│ │ ├── pg-array.test.ts
│ │ ├── pg-checks.test.ts
│ │ ├── pg-columns.test.ts
│ │ ├── pg-enums.test.ts
│ │ ├── pg-generated.test.ts
│ │ ├── pg-identity.test.ts
│ │ ├── pg-schemas.test.ts
│ │ ├── pg-sequences.test.ts
│ │ ├── pg-tables.test.ts
│ │ ├── pg-views.test.ts
│ │ ├── push/
│ │ │ ├── common.ts
│ │ │ ├── libsql.test.ts
│ │ │ ├── mysql-push.test.ts
│ │ │ ├── mysql.test.ts
│ │ │ ├── pg.test.ts
│ │ │ ├── singlestore-push.test.ts
│ │ │ ├── singlestore.test.ts
│ │ │ └── sqlite.test.ts
│ │ ├── rls/
│ │ │ ├── pg-policy.test.ts
│ │ │ └── pg-role.test.ts
│ │ ├── schemaDiffer.ts
│ │ ├── singlestore-generated.test.ts
│ │ ├── singlestore-schemas.test.ts
│ │ ├── singlestore.test.ts
│ │ ├── sqlite-checks.test.ts
│ │ ├── sqlite-columns.test.ts
│ │ ├── sqlite-generated.test.ts
│ │ ├── sqlite-tables.test.ts
│ │ ├── sqlite-views.test.ts
│ │ ├── statements-combiner/
│ │ │ ├── libsql-statements-combiner.test.ts
│ │ │ ├── singlestore-statements-combiner.test.ts
│ │ │ └── sqlite-statements-combiner.test.ts
│ │ ├── test/
│ │ │ └── sqlite.test.ts
│ │ ├── testsinglestore.ts
│ │ ├── validations.test.ts
│ │ └── wrap-param.test.ts
│ ├── tsconfig.build.json
│ ├── tsconfig.cli-types.json
│ ├── tsconfig.json
│ └── vitest.config.ts
├── drizzle-orm/
│ ├── .madgerc
│ ├── package.json
│ ├── scripts/
│ │ ├── build.ts
│ │ └── fix-imports.ts
│ ├── src/
│ │ ├── alias.ts
│ │ ├── aws-data-api/
│ │ │ ├── common/
│ │ │ │ └── index.ts
│ │ │ └── pg/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── batch.ts
│ │ ├── better-sqlite3/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── bun-sql/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── bun-sqlite/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── cache/
│ │ │ ├── core/
│ │ │ │ ├── cache.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── types.ts
│ │ │ ├── readme.md
│ │ │ └── upstash/
│ │ │ ├── cache.ts
│ │ │ └── index.ts
│ │ ├── casing.ts
│ │ ├── column-builder.ts
│ │ ├── column.ts
│ │ ├── d1/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── durable-sqlite/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── entity.ts
│ │ ├── errors.ts
│ │ ├── expo-sqlite/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ ├── query.ts
│ │ │ └── session.ts
│ │ ├── gel/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── gel-core/
│ │ │ ├── alias.ts
│ │ │ ├── checks.ts
│ │ │ ├── columns/
│ │ │ │ ├── all.ts
│ │ │ │ ├── bigint.ts
│ │ │ │ ├── bigintT.ts
│ │ │ │ ├── boolean.ts
│ │ │ │ ├── bytes.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── custom.ts
│ │ │ │ ├── date-duration.ts
│ │ │ │ ├── date.common.ts
│ │ │ │ ├── decimal.ts
│ │ │ │ ├── double-precision.ts
│ │ │ │ ├── duration.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── int.common.ts
│ │ │ │ ├── integer.ts
│ │ │ │ ├── json.ts
│ │ │ │ ├── localdate.ts
│ │ │ │ ├── localtime.ts
│ │ │ │ ├── real.ts
│ │ │ │ ├── relative-duration.ts
│ │ │ │ ├── smallint.ts
│ │ │ │ ├── text.ts
│ │ │ │ ├── timestamp.ts
│ │ │ │ ├── timestamptz.ts
│ │ │ │ └── uuid.ts
│ │ │ ├── db.ts
│ │ │ ├── dialect.ts
│ │ │ ├── expressions.ts
│ │ │ ├── foreign-keys.ts
│ │ │ ├── index.ts
│ │ │ ├── indexes.ts
│ │ │ ├── policies.ts
│ │ │ ├── primary-keys.ts
│ │ │ ├── query-builders/
│ │ │ │ ├── count.ts
│ │ │ │ ├── delete.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── insert.ts
│ │ │ │ ├── query-builder.ts
│ │ │ │ ├── query.ts
│ │ │ │ ├── raw.ts
│ │ │ │ ├── refresh-materialized-view.ts
│ │ │ │ ├── select.ts
│ │ │ │ ├── select.types.ts
│ │ │ │ └── update.ts
│ │ │ ├── roles.ts
│ │ │ ├── schema.ts
│ │ │ ├── sequence.ts
│ │ │ ├── session.ts
│ │ │ ├── subquery.ts
│ │ │ ├── table.ts
│ │ │ ├── unique-constraint.ts
│ │ │ ├── utils.ts
│ │ │ ├── view-base.ts
│ │ │ ├── view-common.ts
│ │ │ └── view.ts
│ │ ├── index.ts
│ │ ├── knex/
│ │ │ ├── README.md
│ │ │ └── index.ts
│ │ ├── kysely/
│ │ │ ├── README.md
│ │ │ └── index.ts
│ │ ├── libsql/
│ │ │ ├── driver-core.ts
│ │ │ ├── driver.ts
│ │ │ ├── http/
│ │ │ │ └── index.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ ├── node/
│ │ │ │ └── index.ts
│ │ │ ├── session.ts
│ │ │ ├── sqlite3/
│ │ │ │ └── index.ts
│ │ │ ├── wasm/
│ │ │ │ └── index.ts
│ │ │ ├── web/
│ │ │ │ └── index.ts
│ │ │ └── ws/
│ │ │ └── index.ts
│ │ ├── logger.ts
│ │ ├── migrator.ts
│ │ ├── mysql-core/
│ │ │ ├── alias.ts
│ │ │ ├── checks.ts
│ │ │ ├── columns/
│ │ │ │ ├── all.ts
│ │ │ │ ├── bigint.ts
│ │ │ │ ├── binary.ts
│ │ │ │ ├── boolean.ts
│ │ │ │ ├── char.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── custom.ts
│ │ │ │ ├── date.common.ts
│ │ │ │ ├── date.ts
│ │ │ │ ├── datetime.ts
│ │ │ │ ├── decimal.ts
│ │ │ │ ├── double.ts
│ │ │ │ ├── enum.ts
│ │ │ │ ├── float.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── int.ts
│ │ │ │ ├── json.ts
│ │ │ │ ├── mediumint.ts
│ │ │ │ ├── real.ts
│ │ │ │ ├── serial.ts
│ │ │ │ ├── smallint.ts
│ │ │ │ ├── text.ts
│ │ │ │ ├── time.ts
│ │ │ │ ├── timestamp.ts
│ │ │ │ ├── tinyint.ts
│ │ │ │ ├── varbinary.ts
│ │ │ │ ├── varchar.ts
│ │ │ │ └── year.ts
│ │ │ ├── db.ts
│ │ │ ├── dialect.ts
│ │ │ ├── expressions.ts
│ │ │ ├── foreign-keys.ts
│ │ │ ├── index.ts
│ │ │ ├── indexes.ts
│ │ │ ├── primary-keys.ts
│ │ │ ├── query-builders/
│ │ │ │ ├── count.ts
│ │ │ │ ├── delete.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── insert.ts
│ │ │ │ ├── query-builder.ts
│ │ │ │ ├── query.ts
│ │ │ │ ├── select.ts
│ │ │ │ ├── select.types.ts
│ │ │ │ └── update.ts
│ │ │ ├── schema.ts
│ │ │ ├── session.ts
│ │ │ ├── subquery.ts
│ │ │ ├── table.ts
│ │ │ ├── unique-constraint.ts
│ │ │ ├── utils.ts
│ │ │ ├── view-base.ts
│ │ │ ├── view-common.ts
│ │ │ └── view.ts
│ │ ├── mysql-proxy/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── mysql2/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── neon/
│ │ │ ├── index.ts
│ │ │ ├── neon-auth.ts
│ │ │ └── rls.ts
│ │ ├── neon-http/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── neon-serverless/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── node-postgres/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── op-sqlite/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── operations.ts
│ │ ├── pg-core/
│ │ │ ├── alias.ts
│ │ │ ├── checks.ts
│ │ │ ├── columns/
│ │ │ │ ├── all.ts
│ │ │ │ ├── bigint.ts
│ │ │ │ ├── bigserial.ts
│ │ │ │ ├── boolean.ts
│ │ │ │ ├── char.ts
│ │ │ │ ├── cidr.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── custom.ts
│ │ │ │ ├── date.common.ts
│ │ │ │ ├── date.ts
│ │ │ │ ├── double-precision.ts
│ │ │ │ ├── enum.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── inet.ts
│ │ │ │ ├── int.common.ts
│ │ │ │ ├── integer.ts
│ │ │ │ ├── interval.ts
│ │ │ │ ├── json.ts
│ │ │ │ ├── jsonb.ts
│ │ │ │ ├── line.ts
│ │ │ │ ├── macaddr.ts
│ │ │ │ ├── macaddr8.ts
│ │ │ │ ├── numeric.ts
│ │ │ │ ├── point.ts
│ │ │ │ ├── postgis_extension/
│ │ │ │ │ ├── geometry.ts
│ │ │ │ │ └── utils.ts
│ │ │ │ ├── real.ts
│ │ │ │ ├── serial.ts
│ │ │ │ ├── smallint.ts
│ │ │ │ ├── smallserial.ts
│ │ │ │ ├── text.ts
│ │ │ │ ├── time.ts
│ │ │ │ ├── timestamp.ts
│ │ │ │ ├── uuid.ts
│ │ │ │ ├── varchar.ts
│ │ │ │ └── vector_extension/
│ │ │ │ ├── bit.ts
│ │ │ │ ├── halfvec.ts
│ │ │ │ ├── sparsevec.ts
│ │ │ │ └── vector.ts
│ │ │ ├── db.ts
│ │ │ ├── dialect.ts
│ │ │ ├── expressions.ts
│ │ │ ├── foreign-keys.ts
│ │ │ ├── index.ts
│ │ │ ├── indexes.ts
│ │ │ ├── policies.ts
│ │ │ ├── primary-keys.ts
│ │ │ ├── query-builders/
│ │ │ │ ├── count.ts
│ │ │ │ ├── delete.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── insert.ts
│ │ │ │ ├── query-builder.ts
│ │ │ │ ├── query.ts
│ │ │ │ ├── raw.ts
│ │ │ │ ├── refresh-materialized-view.ts
│ │ │ │ ├── select.ts
│ │ │ │ ├── select.types.ts
│ │ │ │ └── update.ts
│ │ │ ├── roles.ts
│ │ │ ├── schema.ts
│ │ │ ├── sequence.ts
│ │ │ ├── session.ts
│ │ │ ├── subquery.ts
│ │ │ ├── table.ts
│ │ │ ├── unique-constraint.ts
│ │ │ ├── utils/
│ │ │ │ ├── array.ts
│ │ │ │ └── index.ts
│ │ │ ├── utils.ts
│ │ │ ├── view-base.ts
│ │ │ ├── view-common.ts
│ │ │ └── view.ts
│ │ ├── pg-proxy/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── pglite/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── planetscale-serverless/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── postgres-js/
│ │ │ ├── README.md
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── primary-key.ts
│ │ ├── prisma/
│ │ │ ├── mysql/
│ │ │ │ ├── driver.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── session.ts
│ │ │ ├── pg/
│ │ │ │ ├── driver.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── session.ts
│ │ │ ├── schema.prisma
│ │ │ └── sqlite/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ └── session.ts
│ │ ├── query-builders/
│ │ │ ├── query-builder.ts
│ │ │ └── select.types.ts
│ │ ├── query-promise.ts
│ │ ├── relations.ts
│ │ ├── runnable-query.ts
│ │ ├── selection-proxy.ts
│ │ ├── session.ts
│ │ ├── singlestore/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── singlestore-core/
│ │ │ ├── alias.ts
│ │ │ ├── columns/
│ │ │ │ ├── all.ts
│ │ │ │ ├── bigint.ts
│ │ │ │ ├── binary.ts
│ │ │ │ ├── boolean.ts
│ │ │ │ ├── char.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── custom.ts
│ │ │ │ ├── date.common.ts
│ │ │ │ ├── date.ts
│ │ │ │ ├── datetime.ts
│ │ │ │ ├── decimal.ts
│ │ │ │ ├── double.ts
│ │ │ │ ├── enum.ts
│ │ │ │ ├── float.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── int.ts
│ │ │ │ ├── json.ts
│ │ │ │ ├── mediumint.ts
│ │ │ │ ├── real.ts
│ │ │ │ ├── serial.ts
│ │ │ │ ├── smallint.ts
│ │ │ │ ├── text.ts
│ │ │ │ ├── time.ts
│ │ │ │ ├── timestamp.ts
│ │ │ │ ├── tinyint.ts
│ │ │ │ ├── varbinary.ts
│ │ │ │ ├── varchar.ts
│ │ │ │ ├── vector.ts
│ │ │ │ └── year.ts
│ │ │ ├── db.ts
│ │ │ ├── dialect.ts
│ │ │ ├── expressions.ts
│ │ │ ├── index.ts
│ │ │ ├── indexes.ts
│ │ │ ├── primary-keys.ts
│ │ │ ├── query-builders/
│ │ │ │ ├── count.ts
│ │ │ │ ├── delete.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── insert.ts
│ │ │ │ ├── query-builder.ts
│ │ │ │ ├── query.ts
│ │ │ │ ├── select.ts
│ │ │ │ ├── select.types.ts
│ │ │ │ └── update.ts
│ │ │ ├── schema.ts
│ │ │ ├── session.ts
│ │ │ ├── subquery.ts
│ │ │ ├── table.ts
│ │ │ ├── unique-constraint.ts
│ │ │ ├── utils.ts
│ │ │ ├── view-base.ts
│ │ │ ├── view-common.ts
│ │ │ └── view.ts
│ │ ├── singlestore-proxy/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── sql/
│ │ │ ├── expressions/
│ │ │ │ ├── conditions.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── select.ts
│ │ │ ├── functions/
│ │ │ │ ├── aggregate.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── vector.ts
│ │ │ ├── index.ts
│ │ │ └── sql.ts
│ │ ├── sql-js/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── sqlite-core/
│ │ │ ├── README.md
│ │ │ ├── alias.ts
│ │ │ ├── checks.ts
│ │ │ ├── columns/
│ │ │ │ ├── all.ts
│ │ │ │ ├── blob.ts
│ │ │ │ ├── common.ts
│ │ │ │ ├── custom.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── integer.ts
│ │ │ │ ├── numeric.ts
│ │ │ │ ├── real.ts
│ │ │ │ └── text.ts
│ │ │ ├── db.ts
│ │ │ ├── dialect.ts
│ │ │ ├── expressions.ts
│ │ │ ├── foreign-keys.ts
│ │ │ ├── index.ts
│ │ │ ├── indexes.ts
│ │ │ ├── primary-keys.ts
│ │ │ ├── query-builders/
│ │ │ │ ├── count.ts
│ │ │ │ ├── delete.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── insert.ts
│ │ │ │ ├── query-builder.ts
│ │ │ │ ├── query.ts
│ │ │ │ ├── raw.ts
│ │ │ │ ├── select.ts
│ │ │ │ ├── select.types.ts
│ │ │ │ └── update.ts
│ │ │ ├── session.ts
│ │ │ ├── subquery.ts
│ │ │ ├── table.ts
│ │ │ ├── unique-constraint.ts
│ │ │ ├── utils.ts
│ │ │ ├── view-base.ts
│ │ │ ├── view-common.ts
│ │ │ └── view.ts
│ │ ├── sqlite-proxy/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── subquery.ts
│ │ ├── supabase/
│ │ │ ├── index.ts
│ │ │ └── rls.ts
│ │ ├── table.ts
│ │ ├── table.utils.ts
│ │ ├── tidb-serverless/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── tracing-utils.ts
│ │ ├── tracing.ts
│ │ ├── utils.ts
│ │ ├── vercel-postgres/
│ │ │ ├── driver.ts
│ │ │ ├── index.ts
│ │ │ ├── migrator.ts
│ │ │ └── session.ts
│ │ ├── version.ts
│ │ ├── view-common.ts
│ │ └── xata-http/
│ │ ├── driver.ts
│ │ ├── index.ts
│ │ ├── migrator.ts
│ │ └── session.ts
│ ├── tests/
│ │ ├── casing/
│ │ │ ├── casing.test.ts
│ │ │ ├── mysql-to-camel.test.ts
│ │ │ ├── mysql-to-snake.test.ts
│ │ │ ├── pg-to-camel.test.ts
│ │ │ ├── pg-to-snake.test.ts
│ │ │ ├── sqlite-to-camel.test.ts
│ │ │ └── sqlite-to-snake.test.ts
│ │ ├── exports.test.ts
│ │ ├── is.test.ts
│ │ ├── makePgArray.test.ts
│ │ ├── parsePgArray.test.ts
│ │ ├── relation.test.ts
│ │ ├── tsconfig.json
│ │ └── type-hints.test.ts
│ ├── tsconfig.build.json
│ ├── tsconfig.dts.json
│ ├── tsconfig.json
│ ├── tsup.config.ts
│ ├── type-tests/
│ │ ├── common/
│ │ │ └── aliased-table.ts
│ │ ├── geldb/
│ │ │ ├── 1-to-1-fk.ts
│ │ │ ├── array.ts
│ │ │ ├── count.ts
│ │ │ ├── db-rel.ts
│ │ │ ├── db.ts
│ │ │ ├── delete.ts
│ │ │ ├── generated-columns.ts
│ │ │ ├── insert.ts
│ │ │ ├── no-strict-null-checks/
│ │ │ │ ├── test.ts
│ │ │ │ └── tsconfig.json
│ │ │ ├── other.ts
│ │ │ ├── select.ts
│ │ │ ├── set-operators.ts
│ │ │ ├── subquery.ts
│ │ │ ├── tables-rel.ts
│ │ │ ├── tables.ts
│ │ │ ├── update.ts
│ │ │ └── with.ts
│ │ ├── knex/
│ │ │ └── index.ts
│ │ ├── kysely/
│ │ │ └── index.ts
│ │ ├── mysql/
│ │ │ ├── 1-to-1-fk.ts
│ │ │ ├── 1000columns.ts
│ │ │ ├── count.ts
│ │ │ ├── db-rel.ts
│ │ │ ├── db.ts
│ │ │ ├── delete.ts
│ │ │ ├── generated-columns.ts
│ │ │ ├── insert.ts
│ │ │ ├── no-strict-null-checks/
│ │ │ │ ├── test.ts
│ │ │ │ └── tsconfig.json
│ │ │ ├── select.ts
│ │ │ ├── set-operators.ts
│ │ │ ├── subquery.ts
│ │ │ ├── tables-rel.ts
│ │ │ ├── tables.ts
│ │ │ ├── update.ts
│ │ │ └── with.ts
│ │ ├── pg/
│ │ │ ├── 1-to-1-fk.ts
│ │ │ ├── array.ts
│ │ │ ├── count.ts
│ │ │ ├── db-rel.ts
│ │ │ ├── db.ts
│ │ │ ├── delete.ts
│ │ │ ├── generated-columns.ts
│ │ │ ├── insert.ts
│ │ │ ├── no-strict-null-checks/
│ │ │ │ ├── test.ts
│ │ │ │ └── tsconfig.json
│ │ │ ├── other.ts
│ │ │ ├── select.ts
│ │ │ ├── set-operators.ts
│ │ │ ├── subquery.ts
│ │ │ ├── tables-rel.ts
│ │ │ ├── tables.ts
│ │ │ ├── update.ts
│ │ │ └── with.ts
│ │ ├── singlestore/
│ │ │ ├── 1000columns.ts
│ │ │ ├── count.ts
│ │ │ ├── db.ts
│ │ │ ├── delete.ts
│ │ │ ├── insert.ts
│ │ │ ├── no-strict-null-checks/
│ │ │ │ ├── test.ts
│ │ │ │ └── tsconfig.json
│ │ │ ├── select.ts
│ │ │ ├── set-operators.ts
│ │ │ ├── subquery.ts
│ │ │ ├── tables.ts
│ │ │ ├── update.ts
│ │ │ └── with.ts
│ │ ├── sqlite/
│ │ │ ├── .gitignore
│ │ │ ├── count.ts
│ │ │ ├── db.ts
│ │ │ ├── delete.ts
│ │ │ ├── generated-columns.ts
│ │ │ ├── insert.ts
│ │ │ ├── no-strict-null-checks/
│ │ │ │ ├── test.ts
│ │ │ │ └── tsconfig.json
│ │ │ ├── other.ts
│ │ │ ├── select.ts
│ │ │ ├── set-operators.ts
│ │ │ ├── subquery.ts
│ │ │ ├── tables.ts
│ │ │ ├── update.ts
│ │ │ └── with.ts
│ │ ├── tsconfig.json
│ │ ├── utils/
│ │ │ └── neon-auth-token.ts
│ │ └── utils.ts
│ └── vitest.config.ts
├── drizzle-seed/
│ ├── README.md
│ ├── package.json
│ ├── rollup.config.ts
│ ├── scripts/
│ │ └── build.ts
│ ├── src/
│ │ ├── datasets/
│ │ │ ├── adjectives.ts
│ │ │ ├── cityNames.ts
│ │ │ ├── companyNameSuffixes.ts
│ │ │ ├── countries.ts
│ │ │ ├── emailDomains.ts
│ │ │ ├── firstNames.ts
│ │ │ ├── jobsTitles.ts
│ │ │ ├── lastNames.ts
│ │ │ ├── loremIpsumSentences.ts
│ │ │ ├── phonesInfo.ts
│ │ │ ├── states.ts
│ │ │ └── streetSuffix.ts
│ │ ├── index.ts
│ │ ├── services/
│ │ │ ├── GeneratorFuncs.ts
│ │ │ ├── Generators.ts
│ │ │ ├── SeedService.ts
│ │ │ ├── apiVersion.ts
│ │ │ ├── utils.ts
│ │ │ └── versioning/
│ │ │ └── v2.ts
│ │ └── types/
│ │ ├── drizzleStudio.ts
│ │ ├── seedService.ts
│ │ └── tables.ts
│ ├── tests/
│ │ ├── benchmarks/
│ │ │ └── generatorsBenchmark.ts
│ │ ├── mysql/
│ │ │ ├── allDataTypesTest/
│ │ │ │ ├── mysqlSchema.ts
│ │ │ │ └── mysql_all_data_types.test.ts
│ │ │ ├── cyclicTables/
│ │ │ │ ├── cyclicTables.test.ts
│ │ │ │ └── mysqlSchema.ts
│ │ │ ├── generatorsTest/
│ │ │ │ ├── generators.test.ts
│ │ │ │ └── mysqlSchema.ts
│ │ │ ├── mysql.test.ts
│ │ │ ├── mysqlSchema.ts
│ │ │ └── softRelationsTest/
│ │ │ ├── mysqlSchema.ts
│ │ │ └── softRelations.test.ts
│ │ ├── northwind/
│ │ │ ├── mysqlSchema.ts
│ │ │ ├── mysqlTest.ts
│ │ │ ├── pgSchema.ts
│ │ │ ├── pgTest.ts
│ │ │ ├── sqliteSchema.ts
│ │ │ └── sqliteTest.ts
│ │ ├── pg/
│ │ │ ├── allDataTypesTest/
│ │ │ │ ├── pgSchema.ts
│ │ │ │ └── pg_all_data_types.test.ts
│ │ │ ├── cyclicTables/
│ │ │ │ ├── cyclicTables.test.ts
│ │ │ │ └── pgSchema.ts
│ │ │ ├── generatorsTest/
│ │ │ │ ├── generators.test.ts
│ │ │ │ └── pgSchema.ts
│ │ │ ├── pg.test.ts
│ │ │ ├── pgSchema.ts
│ │ │ └── softRelationsTest/
│ │ │ ├── pgSchema.ts
│ │ │ └── softRelations.test.ts
│ │ └── sqlite/
│ │ ├── allDataTypesTest/
│ │ │ ├── sqliteSchema.ts
│ │ │ └── sqlite_all_data_types.test.ts
│ │ ├── cyclicTables/
│ │ │ ├── cyclicTables.test.ts
│ │ │ └── sqliteSchema.ts
│ │ ├── softRelationsTest/
│ │ │ ├── softRelations.test.ts
│ │ │ └── sqliteSchema.ts
│ │ ├── sqlite.test.ts
│ │ └── sqliteSchema.ts
│ ├── tsconfig.build.json
│ ├── tsconfig.json
│ ├── type-tests/
│ │ ├── mysql.ts
│ │ ├── pg.ts
│ │ ├── sqlite.ts
│ │ └── tsconfig.json
│ └── vitest.config.ts
├── drizzle-typebox/
│ ├── README.md
│ ├── package.json
│ ├── rollup.config.ts
│ ├── scripts/
│ │ ├── build.ts
│ │ └── fix-imports.ts
│ ├── src/
│ │ ├── column.ts
│ │ ├── column.types.ts
│ │ ├── constants.ts
│ │ ├── index.ts
│ │ ├── schema.ts
│ │ ├── schema.types.internal.ts
│ │ ├── schema.types.ts
│ │ └── utils.ts
│ ├── tests/
│ │ ├── mysql.test.ts
│ │ ├── pg.test.ts
│ │ ├── singlestore.test.ts
│ │ ├── sqlite.test.ts
│ │ ├── tsconfig.json
│ │ └── utils.ts
│ ├── tsconfig.build.json
│ ├── tsconfig.json
│ └── vitest.config.ts
├── drizzle-valibot/
│ ├── README.md
│ ├── package.json
│ ├── rollup.config.ts
│ ├── scripts/
│ │ ├── build.ts
│ │ └── fix-imports.ts
│ ├── src/
│ │ ├── column.ts
│ │ ├── column.types.ts
│ │ ├── constants.ts
│ │ ├── index.ts
│ │ ├── schema.ts
│ │ ├── schema.types.internal.ts
│ │ ├── schema.types.ts
│ │ └── utils.ts
│ ├── tests/
│ │ ├── mysql.test.ts
│ │ ├── pg.test.ts
│ │ ├── singlestore.test.ts
│ │ ├── sqlite.test.ts
│ │ ├── tsconfig.json
│ │ └── utils.ts
│ ├── tsconfig.build.json
│ ├── tsconfig.json
│ └── vitest.config.ts
├── drizzle-zod/
│ ├── README.md
│ ├── package.json
│ ├── rollup.config.ts
│ ├── scripts/
│ │ ├── build.ts
│ │ └── fix-imports.ts
│ ├── src/
│ │ ├── column.ts
│ │ ├── column.types.ts
│ │ ├── constants.ts
│ │ ├── index.ts
│ │ ├── schema.ts
│ │ ├── schema.types.internal.ts
│ │ ├── schema.types.ts
│ │ └── utils.ts
│ ├── tests/
│ │ ├── mysql.test.ts
│ │ ├── pg.test.ts
│ │ ├── singlestore.test.ts
│ │ ├── sqlite.test.ts
│ │ ├── tsconfig.json
│ │ └── utils.ts
│ ├── tsconfig.build.json
│ ├── tsconfig.json
│ └── vitest.config.ts
├── eslint/
│ └── eslint-plugin-drizzle-internal/
│ └── index.js
├── eslint-plugin-drizzle/
│ ├── .gitignore
│ ├── package.json
│ ├── readme.md
│ ├── src/
│ │ ├── configs/
│ │ │ ├── all.ts
│ │ │ └── recommended.ts
│ │ ├── enforce-delete-with-where.ts
│ │ ├── enforce-update-with-where.ts
│ │ ├── index.ts
│ │ └── utils/
│ │ ├── ast.ts
│ │ └── options.ts
│ ├── tests/
│ │ ├── delete.test.ts
│ │ └── update.test.ts
│ ├── tsconfig.json
│ └── vitest.config.ts
├── integration-tests/
│ ├── .gitignore
│ ├── .xata/
│ │ ├── migrations/
│ │ │ └── .ledger
│ │ └── version/
│ │ └── compatibility.json
│ ├── .xatarc
│ ├── docker-neon.yml
│ ├── drizzle2/
│ │ ├── mysql/
│ │ │ ├── 0000_nostalgic_carnage.sql
│ │ │ └── meta/
│ │ │ ├── 0000_snapshot.json
│ │ │ └── _journal.json
│ │ ├── mysql-proxy/
│ │ │ ├── first/
│ │ │ │ ├── 0000_nostalgic_carnage.sql
│ │ │ │ └── meta/
│ │ │ │ ├── 0000_snapshot.json
│ │ │ │ └── _journal.json
│ │ │ └── second/
│ │ │ ├── 0000_nostalgic_carnage.sql
│ │ │ ├── 0001_test.sql
│ │ │ └── meta/
│ │ │ ├── 0000_snapshot.json
│ │ │ ├── 0001_snapshot.json
│ │ │ └── _journal.json
│ │ ├── pg/
│ │ │ ├── 0000_puzzling_flatman.sql
│ │ │ ├── 0001_test.sql
│ │ │ └── meta/
│ │ │ ├── 0000_snapshot.json
│ │ │ └── _journal.json
│ │ ├── pg-proxy/
│ │ │ ├── first/
│ │ │ │ ├── 0000_puzzling_flatman.sql
│ │ │ │ └── meta/
│ │ │ │ ├── 0000_snapshot.json
│ │ │ │ └── _journal.json
│ │ │ └── second/
│ │ │ ├── 0000_puzzling_flatman.sql
│ │ │ ├── 0001_test.sql
│ │ │ └── meta/
│ │ │ ├── 0000_snapshot.json
│ │ │ ├── 0001_snapshot.json
│ │ │ └── _journal.json
│ │ ├── planetscale/
│ │ │ ├── 0000_nostalgic_carnage.sql
│ │ │ └── meta/
│ │ │ ├── 0000_snapshot.json
│ │ │ └── _journal.json
│ │ ├── singlestore/
│ │ │ ├── 0000_nostalgic_carnage.sql
│ │ │ └── meta/
│ │ │ ├── 0000_snapshot.json
│ │ │ └── _journal.json
│ │ └── sqlite/
│ │ ├── 0000_fancy_bug.sql
│ │ └── meta/
│ │ ├── 0000_snapshot.json
│ │ └── _journal.json
│ ├── js-tests/
│ │ └── driver-init/
│ │ ├── commonjs/
│ │ │ ├── better-sqlite3.test.cjs
│ │ │ ├── libsql.test.cjs
│ │ │ ├── mysql2.test.cjs
│ │ │ ├── neon-http.test.cjs
│ │ │ ├── neon-ws.test.cjs
│ │ │ ├── node-pg.test.cjs
│ │ │ ├── pglite.test.cjs
│ │ │ ├── planetscale.test.cjs
│ │ │ ├── postgres-js.test.cjs
│ │ │ ├── schema.cjs
│ │ │ ├── tidb.test.cjs
│ │ │ └── vercel.test.cjs
│ │ └── module/
│ │ ├── better-sqlite3.test.mjs
│ │ ├── libsql.test.mjs
│ │ ├── mysql2.test.mjs
│ │ ├── neon-http.test.mjs
│ │ ├── neon-ws.test.mjs
│ │ ├── node-pg.test.mjs
│ │ ├── pglite.test.mjs
│ │ ├── planetscale.test.mjs
│ │ ├── postgres-js.test.mjs
│ │ ├── schema.mjs
│ │ ├── tidb.test.mjs
│ │ └── vercel.test.mjs
│ ├── package.json
│ ├── sst-env.d.ts
│ ├── sst.config.ts
│ ├── tests/
│ │ ├── awsdatapi.alltypes.test.ts
│ │ ├── bun/
│ │ │ ├── bun-sql.test.ts
│ │ │ ├── sqlite-nw.test.ts
│ │ │ └── sqlite.test.ts
│ │ ├── common.ts
│ │ ├── extensions/
│ │ │ ├── postgis/
│ │ │ │ ├── pg.test.ts
│ │ │ │ └── postgres.test.ts
│ │ │ └── vectors/
│ │ │ ├── pg.test.ts
│ │ │ └── postgres.test.ts
│ │ ├── gel/
│ │ │ ├── cache.ts
│ │ │ ├── createInstance.ts
│ │ │ ├── gel-custom.test.ts
│ │ │ ├── gel-ext.test.ts
│ │ │ └── gel.test.ts
│ │ ├── imports/
│ │ │ └── index.test.ts
│ │ ├── mysql/
│ │ │ ├── mysql-common-cache.ts
│ │ │ ├── mysql-common.ts
│ │ │ ├── mysql-custom.test.ts
│ │ │ ├── mysql-planetscale.test.ts
│ │ │ ├── mysql-prefixed.test.ts
│ │ │ ├── mysql-proxy.test.ts
│ │ │ ├── mysql.test.ts
│ │ │ └── tidb-serverless.test.ts
│ │ ├── mysql-returning.test.ts
│ │ ├── pg/
│ │ │ ├── awsdatapi.test.ts
│ │ │ ├── neon-http-batch.test.ts
│ │ │ ├── neon-http-batch.ts
│ │ │ ├── neon-http.test.ts
│ │ │ ├── neon-serverless.test.ts
│ │ │ ├── node-postgres.test.ts
│ │ │ ├── pg-common-cache.ts
│ │ │ ├── pg-common.ts
│ │ │ ├── pg-custom.test.ts
│ │ │ ├── pg-proxy.test.ts
│ │ │ ├── pglite.test.ts
│ │ │ ├── postgres-js.test.ts
│ │ │ ├── rls/
│ │ │ │ └── rls.definition.test.ts
│ │ │ ├── vercel-pg.test.ts
│ │ │ └── xata-http.test.ts
│ │ ├── relational/
│ │ │ ├── bettersqlite.test.ts
│ │ │ ├── db.ts
│ │ │ ├── issues-schemas/
│ │ │ │ ├── duplicates/
│ │ │ │ │ ├── mysql/
│ │ │ │ │ │ ├── mysql.duplicates.test.ts
│ │ │ │ │ │ └── mysql.duplicates.ts
│ │ │ │ │ └── pg/
│ │ │ │ │ ├── pg.duplicates.test.ts
│ │ │ │ │ └── pg.duplicates.ts
│ │ │ │ └── wrong-mapping/
│ │ │ │ ├── pg.schema.ts
│ │ │ │ └── pg.test.ts
│ │ │ ├── mysql.planetscale.test.ts
│ │ │ ├── mysql.schema.ts
│ │ │ ├── mysql.test.ts
│ │ │ ├── pg.postgresjs.test.ts
│ │ │ ├── pg.schema.ts
│ │ │ ├── pg.test.ts
│ │ │ ├── singlestore.schema.ts
│ │ │ ├── singlestore.test.ts
│ │ │ ├── sqlite.schema.ts
│ │ │ ├── tables.ts
│ │ │ ├── turso.test.ts
│ │ │ └── vercel.test.ts
│ │ ├── replicas/
│ │ │ ├── mysql.test.ts
│ │ │ ├── postgres.test.ts
│ │ │ ├── singlestore.test.ts
│ │ │ └── sqlite.test.ts
│ │ ├── seeder/
│ │ │ ├── mysql.test.ts
│ │ │ ├── mysqlSchema.ts
│ │ │ ├── pg.test.ts
│ │ │ ├── pgSchema.ts
│ │ │ ├── sqlite.test.ts
│ │ │ └── sqliteSchema.ts
│ │ ├── singlestore/
│ │ │ ├── singlestore-cache.ts
│ │ │ ├── singlestore-common.ts
│ │ │ ├── singlestore-custom.test.ts
│ │ │ ├── singlestore-prefixed.test.ts
│ │ │ ├── singlestore-proxy.test.ts
│ │ │ └── singlestore.test.ts
│ │ ├── sqlite/
│ │ │ ├── better-sqlite.test.ts
│ │ │ ├── d1-batch.test.ts
│ │ │ ├── d1.test.ts
│ │ │ ├── durable-objects/
│ │ │ │ ├── drizzle/
│ │ │ │ │ ├── 0000_cuddly_black_bolt.sql
│ │ │ │ │ ├── meta/
│ │ │ │ │ │ ├── 0000_snapshot.json
│ │ │ │ │ │ └── _journal.json
│ │ │ │ │ └── migrations.js
│ │ │ │ ├── index.ts
│ │ │ │ ├── worker-configuration.d.ts
│ │ │ │ └── wrangler.toml
│ │ │ ├── libsql-batch.test.ts
│ │ │ ├── libsql-http.test.ts
│ │ │ ├── libsql-node.test.ts
│ │ │ ├── libsql-sqlite3.test.ts
│ │ │ ├── libsql-ws.test.ts
│ │ │ ├── libsql.test.ts
│ │ │ ├── sql-js.test.ts
│ │ │ ├── sqlite-common-cache.ts
│ │ │ ├── sqlite-common.ts
│ │ │ ├── sqlite-proxy-batch.test.ts
│ │ │ └── sqlite-proxy.test.ts
│ │ ├── utils/
│ │ │ └── is-config.test.ts
│ │ ├── utils.ts
│ │ ├── version.test.ts
│ │ └── xata/
│ │ └── xata.ts
│ ├── tsconfig.json
│ ├── type-tests/
│ │ └── join-nodenext/
│ │ ├── gel.ts
│ │ ├── mysql.ts
│ │ ├── package.json
│ │ ├── pg.ts
│ │ ├── singlestore.ts
│ │ ├── sqlite.ts
│ │ └── tsconfig.json
│ ├── vitest-ci.config.ts
│ └── vitest.config.ts
├── package.json
├── patches/
│ └── typescript@5.6.3.patch
├── pnpm-workspace.yaml
├── tsconfig.json
└── turbo.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .eslintignore
================================================
node_modules
dist
dist-dts
examples
**/*.js
**/*.mjs
**/*.cjs
**/playground
integration-tests/tests/prisma/*/client
integration-tests/tests/prisma/*/drizzle
drizzle-kit/*
================================================
FILE: .eslintrc.yaml
================================================
root: true
extends:
- 'eslint:recommended'
- 'plugin:@typescript-eslint/recommended'
- 'plugin:unicorn/recommended'
parser: '@typescript-eslint/parser'
parserOptions:
project: './tsconfig.json'
plugins:
- import
- unused-imports
- no-instanceof
- drizzle-internal
overrides:
- files:
- '**/tests/**/*.ts'
- '**/type-tests/**/*.ts'
rules:
import/extensions: 'off'
no-instanceof: 'off'
- files: 'eslint-plugin-drizzle/**/*'
rules:
import/extensions: 'off'
rules:
'@typescript-eslint/consistent-type-imports':
- error
- disallowTypeAnnotations: false
fixStyle: separate-type-imports
'@typescript-eslint/no-import-type-side-effects': 'error'
import/no-cycle: error
import/no-self-import: error
import/no-empty-named-blocks: error
unused-imports/no-unused-imports: error
import/no-useless-path-segments: error
import/newline-after-import: error
import/no-duplicates: error
import/extensions:
- error
- always
- ignorePackages: true
'@typescript-eslint/no-explicit-any': 'off'
'@typescript-eslint/no-non-null-assertion': 'off'
'@typescript-eslint/no-namespace': 'off'
'@typescript-eslint/no-unused-vars':
- error
- argsIgnorePattern: '^_'
varsIgnorePattern: '^_'
'@typescript-eslint/ban-types':
- error
- extendDefaults: true
types:
'{}' : false
'@typescript-eslint/no-this-alias': 'off'
'@typescript-eslint/no-var-requires': 'off'
'unicorn/prefer-node-protocol': 'off'
'unicorn/prefer-top-level-await': 'off'
'unicorn/prevent-abbreviations': 'off'
'unicorn/prefer-switch': 'off'
'unicorn/catch-error-name': 'off'
'unicorn/no-null': 'off'
'unicorn/numeric-separators-style': 'off'
'unicorn/explicit-length-check': 'off'
'unicorn/filename-case': 'off'
'unicorn/prefer-module': 'off'
'unicorn/no-array-reduce': 'off'
'unicorn/no-nested-ternary': 'off'
'unicorn/no-useless-undefined':
- error
- checkArguments: false
'unicorn/no-this-assignment': 'off'
'unicorn/empty-brace-spaces': 'off'
'unicorn/no-thenable': 'off'
'unicorn/consistent-function-scoping': 'off'
'unicorn/prefer-type-error': 'off'
'unicorn/relative-url-style': 'off'
'eqeqeq': 'error'
'no-instanceof/no-instanceof': 'error'
'drizzle-internal/require-entity-kind': 'error'
'unicorn/prefer-string-replace-all': 'off'
'unicorn/no-process-exit': 'off'
'@typescript-eslint/ban-ts-comment': 'off'
'@typescript-eslint/no-empty-interface': 'off'
'@typescript-eslint/no-unsafe-declaration-merging': 'off'
'no-inner-declarations': 'off'
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: drizzle-team
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/ISSUE_TEMPLATE/bug-template.yaml
================================================
name: "Bug Report"
description: Report an issue or possible bug
title: "[BUG]:"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to file a bug report! Please provide as much information as possible.
- type: checkboxes
id: verified
attributes:
label: Report hasn't been filed before.
options:
- label: I have verified that the bug I'm about to report hasn't been filed before.
required: true
- type: input
attributes:
label: What version of `drizzle-orm` are you using?
description: You can check the version by opening the `package.json` file in your project.
placeholder: 0.0.0
validations:
required: true
- type: input
attributes:
label: What version of `drizzle-kit` are you using?
description: You can check the version by opening the `package.json` file in your project.
placeholder: 0.0.0
validations:
required: true
- type: input
attributes:
label: Other packages
description: If this bug is related to one of the other first-party packages we maintain, please list them here alongside their version.
placeholder: drizzle-zod@0.0.0, drizzle-valibot@0.0.0
validations:
required: false
- type: textarea
attributes:
label: Describe the Bug
description: |
To fill this field, please answer the following:
- What is the undesired behavior?
- What are the steps to reproduce it?
- What is the desired result?
If the issue is more specific, consider answering the following questions if you think they may be relevant:
- What database engine are you using? Are you using a specific cloud provider? Which one?
- Do you think this bug pertains to a specific database driver? Which one?
- Are you working in a monorepo?
- If this is a bug related to types: What Typescript version are you using? What's the content of your tsconfig.json file?
- If you're using a runtime that isn't Node.js: Which one? What version? Have you verified that this isn't an issue with the runtime itself?
validations:
required: true
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: true
contact_links:
- name: Ask a question
url: https://discord.gg/JGrkEU4Scj
about: Ask questions and discuss with other community members in Discord
================================================
FILE: .github/ISSUE_TEMPLATE/docs-template.yaml
================================================
name: "Documentation Enhancement"
description: Suggest documentation improvements
title: "[DOCS]:"
labels: ["docs"]
body:
- type: checkboxes
id: verified
attributes:
label: Enhancement hasn't been filed before.
options:
- label: I have verified this enhancement I'm about to request hasn't been suggested before.
required: true
- type: textarea
attributes:
label: Describe the enhancement you want to request
description: What do you want to change or add to the documentation?
validations:
required: true
================================================
FILE: .github/ISSUE_TEMPLATE/feature-template.yaml
================================================
name: "Feature Request"
description: Suggest new feature
title: "[FEATURE]:"
labels: ["enhancement"]
body:
- type: checkboxes
id: verified
attributes:
label: Feature hasn't been suggested before.
options:
- label: I have verified this feature I'm about to request hasn't been suggested before.
required: true
- type: textarea
attributes:
label: Describe the enhancement you want to request
description: What do you want to change or add? What are the benefits of implementing this?
validations:
required: true
================================================
FILE: .github/workflows/codeql.yml
================================================
name: "CodeQL"
on:
push:
branches: [ 'main', 'beta' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ 'main' ]
schedule:
- cron: '44 16 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
================================================
FILE: .github/workflows/release-feature-branch.yaml
================================================
name: Release (feature branch)
on:
workflow_call:
secrets:
PLANETSCALE_CONNECTION_STRING:
required: true
NEON_CONNECTION_STRING:
required: true
# NEON_HTTP_CONNECTION_STRING:
# required: true
TIDB_CONNECTION_STRING:
required: true
XATA_API_KEY:
required: true
XATA_BRANCH:
required: true
LIBSQL_REMOTE_URL:
required: true
LIBSQL_REMOTE_TOKEN:
required: true
jobs:
test:
# only run on all pushes or pull requests from forks
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
shard:
- gel
- planetscale
- singlestore-core
- singlestore-proxy
- singlestore-prefixed
- singlestore-custom
- neon-http
- neon-serverless
- drizzle-orm
- drizzle-kit
- drizzle-zod
- drizzle-seed
- drizzle-typebox
- drizzle-valibot
- drizzle-arktype
- other
runs-on: ubuntu-22.04
services:
postgres-postgis:
image: postgis/postgis:16-3.4
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: drizzle
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 54322:5432
postgres-vector:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: drizzle
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 54321:5432
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: drizzle
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 55433:5432
mysql:
image: mysql:8
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: drizzle
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 33306:3306
singlestore:
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
env:
ROOT_PASSWORD: singlestore
ports:
- 33307:3306
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.19'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
version: latest
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build Prisma client
working-directory: drizzle-orm
run: pnpm prisma generate --schema src/prisma/schema.prisma
- name: Build
run: pnpm build
- name: Run tests
env:
PG_CONNECTION_STRING: postgres://postgres:postgres@localhost:55433/drizzle
PG_VECTOR_CONNECTION_STRING: postgres://postgres:postgres@localhost:54321/drizzle
PG_POSTGIS_CONNECTION_STRING: postgres://postgres:postgres@localhost:54322/drizzle
MYSQL_CONNECTION_STRING: mysql://root:root@localhost:33306/drizzle
PLANETSCALE_CONNECTION_STRING: ${{ secrets.PLANETSCALE_CONNECTION_STRING }}
NEON_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
# NEON_HTTP_CONNECTION_STRING: postgres://postgres:postgres@db.localtest.me:5432/postgres
NEON_HTTP_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
NEON_SERVERLESS_CONNECTION_STRING: postgres://postgres:postgres@localhost:5445/postgres
TIDB_CONNECTION_STRING: ${{ secrets.TIDB_CONNECTION_STRING }}
XATA_API_KEY: ${{ secrets.XATA_API_KEY }}
XATA_BRANCH: ${{ secrets.XATA_BRANCH }}
LIBSQL_URL: file:local.db
LIBSQL_REMOTE_URL: ${{ secrets.LIBSQL_REMOTE_URL }}
LIBSQL_REMOTE_TOKEN: ${{ secrets.LIBSQL_REMOTE_TOKEN }}
SINGLESTORE_CONNECTION_STRING: singlestore://root:singlestore@localhost:33307/
working-directory: integration-tests
run: |
if [[ ${{ github.event_name }} != "push" && "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then
export SKIP_EXTERNAL_DB_TESTS=1
fi
case ${{ matrix.shard }} in
gel)
if [[ -z "$SKIP_EXTERNAL_DB_TESTS" ]]; then
pnpm vitest run tests/gel
fi
;;
planetscale)
if [[ -z "$SKIP_EXTERNAL_DB_TESTS" ]]; then
pnpm vitest run \
tests/mysql/mysql-planetscale.test.ts \
tests/relational/mysql.planetscale-v1.test.ts \
tests/relational/mysql.planetscale.test.ts
fi
;;
singlestore-core)
pnpm vitest run tests/singlestore/singlestore.test.ts
;;
singlestore-proxy)
pnpm vitest run tests/singlestore/singlestore-proxy.test.ts
;;
singlestore-prefixed)
pnpm vitest run tests/singlestore/singlestore-prefixed.test.ts
;;
singlestore-custom)
pnpm vitest run tests/singlestore/singlestore-custom.test.ts
;;
neon-http)
if [[ -z "$SKIP_EXTERNAL_DB_TESTS" ]]; then
pnpm vitest run tests/pg/neon-http.test.ts tests/pg/neon-http-batch.test.ts
fi
;;
neon-serverless)
docker compose -f docker-neon.yml up -d
pnpm vitest run --config=./vitest-ci.config.ts tests/pg/neon-serverless.test.ts
docker compose -f docker-neon.yml down
;;
drizzle-orm|drizzle-kit|drizzle-zod|drizzle-seed|drizzle-typebox|drizzle-valibot|drizzle-arktype)
(cd .. && pnpm test --filter ${{ matrix.shard }})
;;
other)
pnpm vitest run \
--exclude tests/gel \
--exclude tests/mysql/mysql-planetscale.test.ts \
--exclude tests/relational/mysql.planetscale-v1.test.ts \
--exclude tests/relational/mysql.planetscale.test.ts \
--exclude tests/singlestore/singlestore.test.ts \
--exclude tests/singlestore/singlestore-proxy.test.ts \
--exclude tests/singlestore/singlestore-prefixed.test.ts \
--exclude tests/singlestore/singlestore-custom.test.ts \
--exclude tests/pg/neon-http.test.ts \
--exclude tests/pg/neon-http-batch.test.ts \
--exclude tests/pg/neon-serverless.test.ts
;;
esac
attw:
# only run on all pushes or pull requests from forks
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
package:
- drizzle-orm
- drizzle-kit
- drizzle-zod
- drizzle-seed
- drizzle-typebox
- drizzle-valibot
- drizzle-arktype
- eslint-plugin-drizzle
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
version: latest
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Install Bun
uses: oven-sh/setup-bun@v2
- name: Check preconditions
id: checks
shell: bash
working-directory: ${{ matrix.package }}
run: |
old_version="$(jq -r .version package.json)"
version="$old_version-$(git rev-parse --short HEAD)"
npm version $version
tag="${{ github.ref_name }}"
is_version_published="$(npm view ${{ matrix.package }} versions --json | jq -r '.[] | select(. == "'$version'") | . == "'$version'"')"
if [[ "$is_version_published" == "true" ]]; then
echo "\`${{ matrix.package }}$version\` already published, adding tag \`$tag\`" >> $GITHUB_STEP_SUMMARY
npm dist-tag add ${{ matrix.package }}@$version $tag
else
{
echo "version=$version"
echo "tag=$tag"
echo "has_new_release=true"
} >> $GITHUB_OUTPUT
fi
- name: Build Prisma client
if: steps.checks.outputs.has_new_release == 'true'
working-directory: drizzle-orm
run: pnpm prisma generate --schema src/prisma/schema.prisma
- name: Build
if: steps.checks.outputs.has_new_release == 'true'
run: pnpm build
- name: Pack
if: steps.checks.outputs.has_new_release == 'true'
working-directory: ${{ matrix.package }}
run: npm run pack
- name: Run @arethetypeswrong/cli
if: steps.checks.outputs.has_new_release == 'true'
working-directory: ${{ matrix.package }}
run: bunx attw package.tgz
release:
# only run on all pushes or pull requests from forks
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
needs:
- test
- attw
strategy:
matrix:
package:
- drizzle-orm
- drizzle-kit
- drizzle-zod
- drizzle-seed
- drizzle-typebox
- drizzle-valibot
- drizzle-arktype
- eslint-plugin-drizzle
runs-on: ubuntu-22.04
permissions:
contents: read
id-token: write # for OIDC
# force empty so npm can use OIDC
env:
NODE_AUTH_TOKEN: ""
NPM_TOKEN: ""
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
with: { run_install: false }
- uses: actions/setup-node@v6
with: { node-version: '24', cache: 'pnpm', cache-dependency-path: pnpm-lock.yaml }
- run: pnpm install --frozen-lockfile --prefer-offline
# >= 11.5.1 for trusted publishing
- name: Update NPM
run: npm install -g npm@latest
# nuke, so npm can use OIDC
- name: Remove temp npmrc
run: rm -f "$NPM_CONFIG_USERCONFIG"
- name: Check preconditions
id: checks
shell: bash
working-directory: ${{ matrix.package }}
run: |
old_version="$(jq -r .version package.json)"
version="$old_version-$(git rev-parse --short HEAD)"
npm version $version
tag="${{ github.ref_name }}"
is_version_published="$(npm view ${{ matrix.package }} versions --json | jq -r '.[] | select(. == "'$version'") | . == "'$version'"')"
if [[ "$is_version_published" == "true" ]]; then
echo "\`${{ matrix.package }}$version\` already published, adding tag \`$tag\`" >> $GITHUB_STEP_SUMMARY
else
{
echo "version=$version"
echo "tag=$tag"
echo "has_new_release=true"
} >> $GITHUB_OUTPUT
fi
- name: Build Prisma client
working-directory: drizzle-orm
run: pnpm prisma generate --schema src/prisma/schema.prisma
- name: Build
if: steps.checks.outputs.has_new_release == 'true'
run: pnpm build
- name: Pack
if: steps.checks.outputs.has_new_release == 'true'
working-directory: ${{ matrix.package }}
shell: bash
run: npm run pack
- name: Publish
if: github.event_name == 'push' && steps.checks.outputs.has_new_release == 'true'
working-directory: ${{ matrix.package }}
shell: bash
run: |
tag="${{ steps.checks.outputs.tag }}"
version="${{ steps.checks.outputs.version }}"
echo "Publishing ${{ matrix.package }}@$tag using version $version"
npm run publish -- --tag $tag
echo "npm: \`${{ matrix.package }}@$tag | ${{ matrix.package }}@$version\`" >> $GITHUB_STEP_SUMMARY
# Post release message to Discord
# curl -X POST -H "Content-Type: application/json" -d "{\"embeds\": [{\"title\": \"New \`${{ matrix.package }}\` release! 🎉\", \"url\": \"https://www.npmjs.com/package/${{ matrix.package }}/v/$version\", \"color\": \"12907856\", \"fields\": [{\"name\": \"Version\", \"value\": \"\`$version\`\"}, {\"name\": \"Tag\", \"value\": \"\`$tag\`\"}]}]}" ${{ secrets.DISCORD_DEV_RELEASE_WEBHOOK_URL }}
================================================
FILE: .github/workflows/release-latest.yaml
================================================
name: Release (latest)
on:
workflow_call:
secrets:
PLANETSCALE_CONNECTION_STRING:
required: true
NEON_CONNECTION_STRING:
required: true
# NEON_HTTP_CONNECTION_STRING:
# required: true
TIDB_CONNECTION_STRING:
required: true
XATA_API_KEY:
required: true
XATA_BRANCH:
required: true
LIBSQL_REMOTE_URL:
required: true
LIBSQL_REMOTE_TOKEN:
required: true
jobs:
test:
strategy:
matrix:
shard:
- gel
- planetscale
- singlestore-core
- singlestore-proxy
- singlestore-prefixed
- singlestore-custom
- neon-http
- neon-serverless
- drizzle-orm
- drizzle-kit
- drizzle-zod
- drizzle-seed
- drizzle-typebox
- drizzle-valibot
- drizzle-arktype
- other
runs-on: ubuntu-22.04
services:
postgres-postgis:
image: postgis/postgis:16-3.4
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: drizzle
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 54322:5432
postgres-vector:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: drizzle
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 54321:5432
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: drizzle
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 55433:5432
mysql:
image: mysql:8
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: drizzle
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 33306:3306
singlestore:
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
env:
ROOT_PASSWORD: singlestore
ports:
- 33307:3306
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.19'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
version: latest
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build Prisma client
working-directory: drizzle-orm
run: pnpm prisma generate --schema src/prisma/schema.prisma
- name: Build
run: pnpm build
- name: Run tests
env:
PG_CONNECTION_STRING: postgres://postgres:postgres@localhost:55433/drizzle
PG_VECTOR_CONNECTION_STRING: postgres://postgres:postgres@localhost:54321/drizzle
PG_POSTGIS_CONNECTION_STRING: postgres://postgres:postgres@localhost:54322/drizzle
MYSQL_CONNECTION_STRING: mysql://root:root@localhost:33306/drizzle
PLANETSCALE_CONNECTION_STRING: ${{ secrets.PLANETSCALE_CONNECTION_STRING }}
NEON_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
# NEON_HTTP_CONNECTION_STRING: postgres://postgres:postgres@db.localtest.me:5432/postgres
NEON_HTTP_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
NEON_SERVERLESS_CONNECTION_STRING: postgres://postgres:postgres@localhost:5445/postgres
TIDB_CONNECTION_STRING: ${{ secrets.TIDB_CONNECTION_STRING }}
XATA_API_KEY: ${{ secrets.XATA_API_KEY }}
XATA_BRANCH: ${{ secrets.XATA_BRANCH }}
LIBSQL_URL: file:local.db
LIBSQL_REMOTE_URL: ${{ secrets.LIBSQL_REMOTE_URL }}
LIBSQL_REMOTE_TOKEN: ${{ secrets.LIBSQL_REMOTE_TOKEN }}
SINGLESTORE_CONNECTION_STRING: singlestore://root:singlestore@localhost:33307/
working-directory: integration-tests
run: |
case ${{ matrix.shard }} in
gel)
pnpm vitest run tests/gel
;;
planetscale)
pnpm vitest run \
tests/mysql/mysql-planetscale.test.ts \
tests/relational/mysql.planetscale-v1.test.ts \
tests/relational/mysql.planetscale.test.ts
;;
singlestore-core)
pnpm vitest run tests/singlestore/singlestore.test.ts
;;
singlestore-proxy)
pnpm vitest run tests/singlestore/singlestore-proxy.test.ts
;;
singlestore-prefixed)
pnpm vitest run tests/singlestore/singlestore-prefixed.test.ts
;;
singlestore-custom)
pnpm vitest run tests/singlestore/singlestore-custom.test.ts
;;
neon-http)
pnpm vitest run tests/pg/neon-http.test.ts tests/pg/neon-http-batch.test.ts
;;
neon-serverless)
docker compose -f docker-neon.yml up -d
pnpm vitest run tests/pg/neon-serverless.test.ts
docker compose -f docker-neon.yml down
;;
drizzle-orm|drizzle-kit|drizzle-zod|drizzle-seed|drizzle-typebox|drizzle-valibot|drizzle-arktype)
(cd .. && pnpm test --filter ${{ matrix.shard }})
;;
other)
pnpm vitest run \
--exclude tests/gel \
--exclude tests/mysql/mysql-planetscale.test.ts \
--exclude tests/relational/mysql.planetscale-v1.test.ts \
--exclude tests/relational/mysql.planetscale.test.ts \
--exclude tests/singlestore/singlestore.test.ts \
--exclude tests/singlestore/singlestore-proxy.test.ts \
--exclude tests/singlestore/singlestore-prefixed.test.ts \
--exclude tests/singlestore/singlestore-custom.test.ts \
--exclude tests/pg/neon-http.test.ts \
--exclude tests/pg/neon-http-batch.test.ts \
--exclude tests/pg/neon-serverless.test.ts
;;
esac
attw:
strategy:
matrix:
package:
- drizzle-orm
- drizzle-kit
- drizzle-zod
- drizzle-seed
- drizzle-typebox
- drizzle-valibot
- drizzle-arktype
- eslint-plugin-drizzle
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.18'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
version: latest
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Install Bun
uses: oven-sh/setup-bun@v2
- name: Check preconditions
id: checks
shell: bash
working-directory: ${{ matrix.package }}
run: |
latest="$(npm view --json ${{ matrix.package }} dist-tags.latest | jq -r)"
version="$(jq -r .version package.json)"
is_version_published="$(npm view ${{ matrix.package }} versions --json | jq -r '.[] | select(. == "'$version'") | . == "'$version'"')"
if [[ "$is_version_published" == "false" && "$latest" != "$version" ]]; then
{
echo "version=$version"
echo "has_new_release=true"
echo "changelog_path=$changelogPath"
} >> $GITHUB_OUTPUT
fi
- name: Build Prisma client
if: steps.checks.outputs.has_new_release == 'true'
working-directory: drizzle-orm
run: pnpm prisma generate --schema src/prisma/schema.prisma
- name: Build
if: steps.checks.outputs.has_new_release == 'true'
run: pnpm build
- name: Pack
if: steps.checks.outputs.has_new_release == 'true'
working-directory: ${{ matrix.package }}
run: npm run pack
- name: Run @arethetypeswrong/cli
if: steps.checks.outputs.has_new_release == 'true'
working-directory: ${{ matrix.package }}
run: bunx attw package.tgz
release:
permissions:
contents: write # for creating GitHub releases
id-token: write # for OIDC
needs:
- test
- attw
strategy:
fail-fast: false
matrix:
package:
- drizzle-orm
- drizzle-kit
- drizzle-zod
- drizzle-seed
- drizzle-typebox
- drizzle-valibot
- drizzle-arktype
- eslint-plugin-drizzle
runs-on: ubuntu-22.04
# force empty so npm can use OIDC
env:
NODE_AUTH_TOKEN: ""
NPM_TOKEN: ""
services:
postgres-postgis:
image: postgis/postgis:16-3.4
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: drizzle
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 54322:5432
postgres-vector:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: drizzle
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 54321:5432
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: drizzle
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 55433:5432
mysql:
image: mysql:8
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: drizzle
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 33306:3306
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
with: { run_install: false }
- uses: actions/setup-node@v6
with: { node-version: '24', cache: 'pnpm', cache-dependency-path: pnpm-lock.yaml }
- run: pnpm install --frozen-lockfile --prefer-offline
# >= 11.5.1 for trusted publishing
- name: Update NPM
run: npm install -g npm@latest
# nuke, so npm can use OIDC
- name: Remove temp npmrc
run: rm -f "$NPM_CONFIG_USERCONFIG"
- name: Check preconditions
id: checks
shell: bash
working-directory: ${{ matrix.package }}
run: |
latest="$(npm view --json ${{ matrix.package }} dist-tags.latest | jq -r)"
version="$(jq -r .version package.json)"
is_version_published="$(npm view ${{ matrix.package }} versions --json | jq -r '.[] | select(. == "'$version'") | . == "'$version'"')"
if [[ "$is_version_published" == "true" ]]; then
echo "\`${{ matrix.package }}@$version\` already published, adding tag \`latest\`" >> $GITHUB_STEP_SUMMARY
elif [[ "$latest" != "$version" ]]; then
echo "Latest: $latest"
echo "Current: $version"
changelogPath=$(node -e "console.log(require('path').resolve('..', 'changelogs', '${{ matrix.package }}', '$version.md'))")
if [[ ! -f "$changelogPath" ]]; then
echo "::error::Changelog for version $version not found: $changelogPath"
exit 1
fi
{
echo "version=$version"
echo "has_new_release=true"
echo "changelog_path=$changelogPath"
} >> $GITHUB_OUTPUT
else
echo "Already up to date: $version"
echo "\`$version\` is already latest on NPM" >> $GITHUB_STEP_SUMMARY
fi
- name: Build Prisma client
if: steps.checks.outputs.has_new_release == 'true'
working-directory: drizzle-orm
run: pnpm prisma generate --schema src/prisma/schema.prisma
- name: Build
if: steps.checks.outputs.has_new_release == 'true'
run: pnpm build
- name: Pack
if: steps.checks.outputs.has_new_release == 'true'
working-directory: ${{ matrix.package }}
shell: bash
run: npm run pack
- name: Publish
if: steps.checks.outputs.has_new_release == 'true'
working-directory: ${{ matrix.package }}
shell: bash
run: |
version="${{ steps.checks.outputs.version }}"
echo "Publishing ${{ matrix.package }}@$version"
npm run publish
echo "npm: \`+ ${{ matrix.package }}@$version\`" >> $GITHUB_STEP_SUMMARY
# Post release message to Discord
# curl -X POST -H "Content-Type: application/json" -d "{\"embeds\": [{\"title\": \"New \`${{ matrix.package }}\` release! 🎉\", \"url\": \"https://www.npmjs.com/package/${{ matrix.package }}\", \"color\": \"12907856\", \"fields\": [{\"name\": \"Tag\", \"value\": \"\`$tag\`\"}]}]}" ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}
- name: Create GitHub release for ORM package
uses: actions/github-script@v6
if: matrix.package == 'drizzle-orm' && steps.checks.outputs.has_new_release == 'true'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
const fs = require("fs");
const path = require("path");
const version = "${{ steps.checks.outputs.version }}";
const changelog = fs.readFileSync("${{ steps.checks.outputs.changelog_path }}", "utf8");
const release = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: `${version}`,
name: `${version}`,
body: changelog,
});
await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.data.id,
name: `${{ matrix.package }}-${version}-dist.tgz`,
data: fs.readFileSync(path.resolve("${{ matrix.package }}", "package.tgz")),
});
} catch (e) {
core.setFailed(e.message);
}
- name: Create GitHub release for KIT package
uses: actions/github-script@v6
if: matrix.package == 'drizzle-kit' && steps.checks.outputs.has_new_release == 'true'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
const fs = require("fs");
const path = require("path");
const version = "${{ steps.checks.outputs.version }}";
const changelog = fs.readFileSync("${{ steps.checks.outputs.changelog_path }}", "utf8");
const release = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: `drizzle-kit@${version}`,
name: `drizzle-kit@${version}`,
body: changelog,
});
await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.data.id,
name: `${{ matrix.package }}-${version}-dist.tgz`,
data: fs.readFileSync(path.resolve("${{ matrix.package }}", "package.tgz")),
});
} catch (e) {
core.setFailed(e.message);
}
================================================
FILE: .github/workflows/router.yaml
================================================
name: Release Router
on:
push:
branches-ignore:
- main
pull_request:
workflow_dispatch:
jobs:
switch:
runs-on: ubuntu-24.04
outputs:
target: ${{ steps.route.outputs.target }}
steps:
- name: Route release
id: route
shell: bash
run: |
HEAD_REPO="${{ github.event.pull_request.head.repo.full_name }}"
if [[ "$GITHUB_EVENT_NAME" == "workflow_dispatch" && "${GITHUB_REF##*/}" == "main" ]]; then
echo "target=latest" >> $GITHUB_OUTPUT
# only run on all pushes or pull requests from forks
elif [[ "$GITHUB_EVENT_NAME" == "push" ]] || [[ "$HEAD_REPO" != "$GITHUB_REPOSITORY" ]]; then
echo "target=feature" >> $GITHUB_OUTPUT
else
echo "target=skip" >> $GITHUB_OUTPUT
fi
run-feature:
needs: switch
if: needs.switch.outputs.target == 'feature'
uses: ./.github/workflows/release-feature-branch.yaml
secrets:
PLANETSCALE_CONNECTION_STRING: ${{ secrets.PLANETSCALE_CONNECTION_STRING }}
NEON_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
# NEON_HTTP_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
TIDB_CONNECTION_STRING: ${{ secrets.TIDB_CONNECTION_STRING }}
XATA_API_KEY: ${{ secrets.XATA_API_KEY }}
XATA_BRANCH: ${{ secrets.XATA_BRANCH }}
LIBSQL_REMOTE_URL: ${{ secrets.LIBSQL_REMOTE_URL }}
LIBSQL_REMOTE_TOKEN: ${{ secrets.LIBSQL_REMOTE_TOKEN }}
run-latest:
needs: switch
if: needs.switch.outputs.target == 'latest'
uses: ./.github/workflows/release-latest.yaml
secrets:
PLANETSCALE_CONNECTION_STRING: ${{ secrets.PLANETSCALE_CONNECTION_STRING }}
NEON_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
# NEON_HTTP_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
TIDB_CONNECTION_STRING: ${{ secrets.TIDB_CONNECTION_STRING }}
XATA_API_KEY: ${{ secrets.XATA_API_KEY }}
XATA_BRANCH: ${{ secrets.XATA_BRANCH }}
LIBSQL_REMOTE_URL: ${{ secrets.LIBSQL_REMOTE_URL }}
LIBSQL_REMOTE_TOKEN: ${{ secrets.LIBSQL_REMOTE_TOKEN }}
================================================
FILE: .github/workflows/unpublish-release-feature-branch.yaml
================================================
name: Unpublish release (feature branch)
on: delete
jobs:
unpublish-release:
if: github.event.ref_type == 'branch' && github.event.ref != 'refs/heads/main' && github.event.ref != 'refs/heads/beta'
strategy:
matrix:
package:
- drizzle-orm
- drizzle-kit
- drizzle-zod
- drizzle-typebox
- drizzle-valibot
- drizzle-arktype
- eslint-plugin-drizzle
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- name: Unpublish
run: |
tag="${{ github.event.ref }}"
tag="${tag#refs/heads/}"
echo "Unpublishing ${{ matrix.package }}@$tag"
npm dist-tag rm ${{ matrix.package }} $tag
echo "npm: \`- ${{ matrix.package }}@$tag\`" >> $GITHUB_STEP_SUMMARY
working-directory: ${{ matrix.package }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
================================================
FILE: .gitignore
================================================
node_modules
.vscode
dist
dist.new
*.tsbuildinfo
*.tgz
/*.sql
.cache
.turbo
.rollup.cache
dist-dts
rollup.config-*.mjs
*.log
.DS_Store
drizzle-seed/src/dev
================================================
FILE: .markdownlint.yaml
================================================
no-inline-html: false
first-line-h1: false
line-length: false
MD010:
spaces_per_tab: 2
================================================
FILE: .npmrc
================================================
# prefer-workspace-packages = true
================================================
FILE: .nvmrc
================================================
22
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
help@drizzle.team.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing
Welcome! We're glad you're interested in Drizzle ORM and want to help us make it better.
Drizzle ORM is owned by [Drizzle Team](https://drizzle.team) and maintained by community members, mainly by our core contributors ([@AndriiSherman](https://github.com/AndriiSherman), [@AlexBlokh](https://github.com/AlexBlokh), [@dankochetov](https://github.com/dankochetov)). Everything that is going to be merged should be approved by all core contributors members.
---
There are many ways you can contribute to the Drizzle ORM project:
- [Submitting bug reports](#bug-report)
- [Submitting feature request](#feature-request)
- [Providing feedback](#feedback)
- [Contribution guidelines](#contribution-guidelines)
## <a name="bug-report"></a> Submitting bug report
To report a bug or issue, please use our [issue form](https://github.com/drizzle-team/drizzle-orm/issues/new/choose) and choose Bug Report.
## <a name="feature-request"></a> Submitting feature request
To request a feature, please use our [issue form](https://github.com/drizzle-team/drizzle-orm/issues/new/choose) and choose Feature Request.
## <a name="feedback"></a> Providing feedback
There are several ways you can provide feedback:
- You can join our [Discord server](https://discord.gg/yfjTbVXMW4) and provide feedback there.
- You can add new ticket in [Discussions](https://github.com/drizzle-team/drizzle-orm/discussions).
- Mention our [Twitter account](https://twitter.com/DrizzleOrm).
## <a name="contribution-guidelines"></a> Contribution guidelines
- [Pre-contribution setup](#pre-contribution)
- [Installing Node](#installing-node)
- [Installing pnpm](#installing-pnpm)
- [Installing Docker](#installing-docker)
- [Cloning the repository](#cloning-the-repository)
- [Repository structure](#repository-structure)
- [Building the project](#building-the-project)
- [Commit message guidelines](#commit-message-guidelines)
- [Contributing to `drizzle-orm`](#contributing-orm)
- [Project structure](#project-structure-orm)
- [Running tests](#running-tests-orm)
- [PR guidelines](#pr-guidelines-orm)
- [Contributing to `drizzle-kit`](#contributing-kit)
- [Project structure](#project-structure-kit)
- [Running tests](#running-tests-kit)
- [PR guidelines](#pr-guidelines-kit)
## <a name="pre-contribution"></a> Pre-contribution setup
### <a name="installing-node"></a> Installing Node
```bash
# https://github.com/nvm-sh/nvm#install--update-script
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
nvm install 18.13.0
nvm use 18.13.0
```
### <a name="installing-pnpm"></a> Installing pnpm
```bash
# https://pnpm.io/installation
npm install -g pnpm
```
### <a name="installing-docker"></a> Installing Docker
```bash
# https://docs.docker.com/get-docker/
# Use Docker's guide to install Docker for your OS.
```
### <a name="cloning-the-repository"></a> Cloning the repository
```bash
git clone https://github.com/drizzle-team/drizzle-orm.git
cd drizzle-orm
```
### <a name="repository-structure"></a> Repository structure
- 📂 `drizzle-orm/`
orm core package with all main logic for each dialect
- 📂 `drizzle-kit/`
kit core package with all main logic and tests for each dialect
- 📂 `drizzle-typebox/`
all the code related to drizzle+typebox extension
- 📂 `drizzle-valibot/`
all the code related to drizzle+valibot extension
- 📂 `drizzle-zod/`
all the code related to drizzle+zod extension
- 📂 `eslint-plugin-drizzle/`
all the code related to drizzle eslint plugin
- 📂 `changelogs/`
all changelogs for drizzle-orm, drizzle-kit, drizzle-typebox, drizzle-zod, drizzle-valibot modules
- 📂 `examples/`
package with Drizzle ORM usage examples
- 📂 `integration-tests/`
package with all type of tests for each supported database
### <a name="building-the-project"></a> Building the project
Run the following script from the root folder to build the whole monorepo. Running it from a specific package folder will only build that package.
```bash
pnpm install && pnpm build
```
## <a name="commit-message-guidelines"></a> Commit message guidelines
We have specific rules on how commit messages should be structured.
It's important to make sure your commit messages are clear, concise, and informative to make it easier for others to understand the changes you are making.
All commit messages should follow the pattern below:
```
<subject>
<BLANK LINE>
<body>
```
Example:
```
Add groupBy error message
In specific case, groupBy was responding with unreadable error
...
```
> [!WARNING]
> All commits should be signed before submitting a PR. Please check the documentation on [how to sign commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification).
## <a name="contributing-orm"></a> Contributing to `drizzle-orm`
### <a name="project-structure-orm"></a> Project structure
- 📂 `pg-core/`, `mysql-core/`, `sqlite-core/`
core packages for each dialect with all the main logic for relation and query builder
- 📂 `sql/`
package containing all expressions and SQL template implementation
- All other folders are for each specific driver that Drizzle ORM supports.
### <a name="running-tests-orm"></a> Running tests
All tests for Drizzle ORM are integration tests that simulate real databases with different queries and responses from each database. Each file in `integration-tests` has a list of different scenarios for different dialects and drivers. Each file creates a Docker container with the needed database and runs the test cases there. After every test is run, the Docker container will be deleted.
If you have added additional logic to a core package, make sure that all tests completed without any failures.
> [!NOTE]
> If you have added data types or a feature for query building, you need to create additional test cases using the new API to ensure it works properly.
If you are in the root of the repository, run all integration tests with the following script:
```bash
cd integration-tests && pnpm test
```
### <a name="pr-guidelines-orm"></a> PR guidelines
1. PR titles should follow the pattern below:
```
[<dialect name>]: <subject>
```
Example:
```
[Pg] Add PostGIS extension support
```
2. PRs should contain a detailed description of everything that was changed.
3. Commit messages should follow the [message style guidelines](#commit-message-guidelines).
4. PRs should implement:
- Tests for features that were added.
- Tests for bugs that were fixed.
> [!NOTE]
> To understand how tests should be created and run, please check the [Running tests](#running-tests-orm) section.
## <a name="contributing-kit"></a> Contributing to `drizzle-kit`
### <a name="project-structure-kit"></a> Project structure
- 📂 `cli/`
- 📄 `schema.ts`
all the commands defined using brocli
- 📂 `commands/`
all the business logic for drizzle-kit commands
- 📂 `extensions/`
all the extension helpers for databases
- 📂 `serializer/`
all the necessary logic to read from the Drizzle ORM schema and convert it to a common JSON format, as well as the logic to introspect all tables, types, and other database elements and convert them to a common JSON format
- 📄 `introspect-pg.ts`, `introspect-mysql.ts`, `introspect-sqlite.ts`
these files are responsible for mapping JSON snapshots to TypeScript files during introspect commands
- 📄 `snapshotsDiffer.ts`
this file handles the mapping from JSON snapshot format to JSON statement objects.
- 📄 `jsonStatements.ts`
this file defines JSON statement types, interfaces, and helper functions.
- 📄 `sqlgenerator.ts`
this file converts JSON statements to SQL strings.
### <a name="running-tests-kit"></a> Running tests
All tests for Drizzle Kit are integration tests that simulate real databases with different queries and responses from each database. Each file in `drizzle-kit/tests` has a list of different scenarios for different commands. Each file creates a Docker container with the needed database and runs the test cases there. After every test is run, the Docker container will be deleted. We test MySQL, PostgreSQL (using PGlite), and SQLite.
If you are in the root of the repository, run all Drizzle Kit tests with the following script:
```bash
cd drizzle-kit && pnpm test
```
### <a name="pr-guidelines-kit"></a> PR guidelines
1. PR titles should follow the pattern below:
```
[<dialect name>-kit]: <subject>
```
Example:
```
[Pg-kit] Add PostGIS extension support
```
2. PRs should contain a detailed description of everything that was changed.
3. Commit messages should follow the [message style guidelines](#commit-message-guidelines).
4. PRs should implement:
- Tests for features that were added.
- Tests for bugs that were fixed.
> [!NOTE]
> To understand how tests should be created and run, please check the [Running tests](#running-tests-kit) section.
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
<div align="center">
<img src="./misc/readme/logo-github-sq-dark.svg#gh-dark-mode-only" />
<img src="./misc/readme/logo-github-sq-light.svg#gh-light-mode-only" />
</div>
<br/>
<div align="center">
<h3>Headless ORM for NodeJS, TypeScript and JavaScript 🚀</h3>
<a href="https://orm.drizzle.team">Website</a> •
<a href="https://orm.drizzle.team/docs/overview">Documentation</a> •
<a href="https://x.com/drizzleorm">Twitter</a> •
<a href="https://driz.link/discord">Discord</a>
</div>
<br/>
<br/>
### What's Drizzle?
Drizzle is a modern TypeScript ORM developers [wanna use in their next project](https://stateofdb.com/tools/drizzle).
It is [lightweight](https://bundlephobia.com/package/drizzle-orm) at only ~7.4kb minified+gzipped, and it's tree shakeable with exactly 0 dependencies.
**Drizzle supports every PostgreSQL, MySQL and SQLite database**, including serverless ones like [Turso](https://orm.drizzle.team/docs/get-started-sqlite#turso), [Neon](https://orm.drizzle.team/docs/get-started-postgresql#neon), [Xata](https://orm.drizzle.team/docs/connect-xata), [PlanetScale](https://orm.drizzle.team/docs/get-started-mysql#planetscale), [Cloudflare D1](https://orm.drizzle.team/docs/get-started-sqlite#cloudflare-d1), [FlyIO LiteFS](https://fly.io/docs/litefs/), [Vercel Postgres](https://orm.drizzle.team/docs/get-started-postgresql#vercel-postgres), [Supabase](https://orm.drizzle.team/docs/get-started-postgresql#supabase) and [AWS Data API](https://orm.drizzle.team/docs/get-started-postgresql#aws-data-api). No bells and whistles, no Rust binaries, no serverless adapters, everything just works out of the box.
**Drizzle is serverless-ready by design**. It works in every major JavaScript runtime like NodeJS, Bun, Deno, Cloudflare Workers, Supabase functions, any Edge runtime, and even in browsers.
With Drizzle you can be [**fast out of the box**](https://orm.drizzle.team/benchmarks) and save time and costs while never introducing any data proxies into your infrastructure.
While you can use Drizzle as a JavaScript library, it shines with TypeScript. It lets you [**declare SQL schemas**](https://orm.drizzle.team/docs/sql-schema-declaration) and build both [**relational**](https://orm.drizzle.team/docs/rqb) and [**SQL-like queries**](https://orm.drizzle.team/docs/select), while keeping the balance between type-safety and extensibility for toolmakers to build on top.
### Ecosystem
While Drizzle ORM remains a thin typed layer on top of SQL, we made a set of tools for people to have best possible developer experience.
Drizzle comes with a powerful [**Drizzle Kit**](https://orm.drizzle.team/kit-docs/overview) CLI companion for you to have hassle-free migrations. It can generate SQL migration files for you or apply schema changes directly to the database.
We also have [**Drizzle Studio**](https://orm.drizzle.team/drizzle-studio/overview) for you to effortlessly browse and manipulate data in your database of choice.
### Documentation
Check out the full documentation on [the website](https://orm.drizzle.team/docs/overview).
### Our sponsors ❤️
<p align="center">
<a href="https://drizzle.team" target="_blank">
<img src='https://api.drizzle.team/v2/sponsors/svg'/>
</a>
</p>
================================================
FILE: SECURITY.md
================================================
# Security Policy
## Reporting a Vulnerability
If you have a security issue to report, please contact us at [security@drizzle.team](mailto:security@drizzle.team).
================================================
FILE: changelogs/README.md
================================================
# Release flow
- Push feature branch
- GitHub workflow publishes new feature tag to NPM
- Bump package versions manually
- (Optional) Create and merge PR to beta
- (Optional) GitHub workflow publishes new beta version to NPM
- Create PR to main
- TODO: GitHub workflow checks if changelog is present for every package version
- Resolve all conflicts, bump versions if necessary
- Merge PR
- GitHub workflow publishes new latest version to NPM and removes feature tag from NPM
================================================
FILE: changelogs/drizzle-arktype/0.1.2.md
================================================
`drizzle-arktype` is a plugin for [Drizzle ORM](https://github.com/drizzle-team/drizzle-orm) that allows you to generate [arktype](https://arktype.io/) schemas from Drizzle ORM schemas.
**Features**
- Create a select schema for tables, views and enums.
- Create insert and update schemas for tables.
- Supports all dialects: PostgreSQL, MySQL and SQLite.
# Usage
```ts
import { pgEnum, pgTable, serial, text, timestamp } from 'drizzle-orm/pg-core';
import { createInsertSchema, createSelectSchema } from 'drizzle-arktype';
import { type } from 'arktype';
const users = pgTable('users', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
email: text('email').notNull(),
role: text('role', { enum: ['admin', 'user'] }).notNull(),
createdAt: timestamp('created_at').notNull().defaultNow(),
});
// Schema for inserting a user - can be used to validate API requests
const insertUserSchema = createInsertSchema(users);
// Schema for updating a user - can be used to validate API requests
const updateUserSchema = createUpdateSchema(users);
// Schema for selecting a user - can be used to validate API responses
const selectUserSchema = createSelectSchema(users);
// Overriding the fields
const insertUserSchema = createInsertSchema(users, {
role: type('string'),
});
// Refining the fields - useful if you want to change the fields before they become nullable/optional in the final schema
const insertUserSchema = createInsertSchema(users, {
id: (schema) => schema.atLeast(1),
role: type('string'),
});
// Usage
const isUserValid = parse(insertUserSchema, {
name: 'John Doe',
email: 'johndoe@test.com',
role: 'admin',
});
```
thanks @L-Mario564
================================================
FILE: changelogs/drizzle-arktype/0.1.3.md
================================================
- TS language server performance improvements
- Fixed [Buffer is not defined using drizzle-arktype client side with vite](https://github.com/drizzle-team/drizzle-orm/issues/4383)
- Fixed [[BUG]: drizzle-arktype Buffer is undefined](https://github.com/drizzle-team/drizzle-orm/issues/4371)
================================================
FILE: changelogs/drizzle-kit/0.23.2.md
================================================
- Fixed a bug in PostgreSQL with push and introspect where the `schemaFilter` object was passed. It was detecting enums even in schemas that were not defined in the schemaFilter.
- Fixed the `drizzle-kit up` command to work as expected, starting from the sequences release.
================================================
FILE: changelogs/drizzle-kit/0.24.0.md
================================================
## Breaking changes (for SQLite users)
#### Fixed [Composite primary key order is not consistent](https://github.com/drizzle-team/drizzle-kit-mirror/issues/342) by removing `sort` in SQLite and to be consistant with the same logic in PostgreSQL and MySQL
The issue that may arise for SQLite users with any driver using composite primary keys is that the order in the database may differ from the Drizzle schema.
- If you are using `push`, you **MAY** be prompted to update your table with a new order of columns in the composite primary key. You will need to either change it manually in the database or push the changes, but this may lead to data loss, etc.
- If you are using `generate`, you **MAY** also be prompted to update your table with a new order of columns in the composite primary key. You can either keep that migration or skip it by emptying the SQL migration file.
If nothing works for you and you are blocked, please reach out to me @AndriiSherman. I will try to help you!
## Bug fixes
- [[BUG] When using double type columns, import is not inserted](https://github.com/drizzle-team/drizzle-kit-mirror/issues/403) - thanks @Karibash
- [[BUG] A number value is specified as the default for a column of type char](https://github.com/drizzle-team/drizzle-kit-mirror/issues/404) - thanks @Karibash
- [[BUG]: Array default in migrations are wrong](https://github.com/drizzle-team/drizzle-orm/issues/2621) - thanks @L-Mario564
- [[FEATURE]: Simpler default array fields](https://github.com/drizzle-team/drizzle-orm/issues/2709) - thanks @L-Mario564
- [[BUG]: drizzle-kit generate succeeds but generates invalid SQL for default([]) - Postgres](https://github.com/drizzle-team/drizzle-orm/issues/2432) - thanks @L-Mario564
- [[BUG]: Incorrect type for array column default value](https://github.com/drizzle-team/drizzle-orm/issues/2334) - thanks @L-Mario564
- [[BUG]: error: column is of type integer[] but default expression is of type integer](https://github.com/drizzle-team/drizzle-orm/issues/2224) - thanks @L-Mario564
- [[BUG]: Default value in array generating wrong migration file](https://github.com/drizzle-team/drizzle-orm/issues/1003) - thanks @L-Mario564
- [[BUG]: enum as array, not possible?](https://github.com/drizzle-team/drizzle-orm/issues/1564) - thanks @L-Mario564
================================================
FILE: changelogs/drizzle-kit/0.24.1.md
================================================
## Bug fixes
> Big thanks to @L-Mario564 for his [PR](https://github.com/drizzle-team/drizzle-orm/pull/2804). It conflicted in most cases with a PR that was merged, but we incorporated some of his logic. Merging it would have caused more problems and taken more time to resolve, so we just took a few things from his PR, like removing "::<type>" mappings in introspect and some array type default handlers
### What was fixed
1. The Drizzle Kit CLI was not working properly for the `introspect` command.
2. Added the ability to use column names with special characters for all dialects.
3. Included PostgreSQL sequences in the introspection process.
4. Reworked array type introspection and added all test cases.
5. Fixed all (we hope) default issues in PostgreSQL, where `::<type>` was included in the introspected output.
6. `preserve` casing option was broken
### Tickets that were closed
- [[BUG]: invalid schema generation with drizzle-kit introspect:pg](https://github.com/drizzle-team/drizzle-orm/issues/1210)
- [[BUG][mysql introspection]: TS error when introspect column including colon](https://github.com/drizzle-team/drizzle-orm/issues/1928)
- [[BUG]: Unhandled defaults when introspecting postgres db](https://github.com/drizzle-team/drizzle-orm/issues/1625)
- [[BUG]: PostgreSQL Enum Naming and Schema Typing Issue](https://github.com/drizzle-team/drizzle-orm/issues/2315)
- [[BUG]: drizzle-kit instrospect command generates syntax error on varchar column types](https://github.com/drizzle-team/drizzle-orm/issues/2714)
- [[BUG]: Introspecting varchar[] type produces syntactically invalid schema.ts](https://github.com/drizzle-team/drizzle-orm/issues/1633)
- [[BUG]: introspect:pg column not using generated enum name](https://github.com/drizzle-team/drizzle-orm/issues/1648)
- [[BUG]: drizzle-kit introspect casing "preserve" config not working](https://github.com/drizzle-team/drizzle-orm/issues/2773)
- [[BUG]: drizzle-kit introspect fails on required param that is defined](https://github.com/drizzle-team/drizzle-orm/issues/2719)
- [[BUG]: Error when running npx drizzle-kit introspect: "Expected object, received string"](https://github.com/drizzle-team/drizzle-orm/issues/2657)
- [[BUG]: Missing index names when running introspect command [MYSQL]](https://github.com/drizzle-team/drizzle-orm/issues/2525)
- [[BUG]: drizzle-kit introspect TypeError: Cannot read properties of undefined (reading 'toLowerCase')](https://github.com/drizzle-team/drizzle-orm/issues/2338)
- [[BUG]: Wrong column name when using PgEnum.array()](https://github.com/drizzle-team/drizzle-orm/issues/2100)
- [[BUG]: Incorrect Schema Generated when introspecting extisting pg database](https://github.com/drizzle-team/drizzle-orm/issues/1985)
- [[⚠️🐞BUG]: index() missing argument after introspection, causes tsc error that fails the build](https://github.com/drizzle-team/drizzle-orm/issues/1870)
- [[BUG]: drizzle-kit introspect small errors](https://github.com/drizzle-team/drizzle-orm/issues/1738)
- [[BUG]: Missing bigint import in drizzle-kit introspect](https://github.com/drizzle-team/drizzle-orm/issues/1020)
================================================
FILE: changelogs/drizzle-kit/0.24.2.md
================================================
## New Features
### 🎉 Support for `pglite` driver
You can now use pglite with all drizzle-kit commands, including Drizzle Studio!
```ts
import { defineConfig } from "drizzle-kit";
export default defineConfig({
dialect: "postgresql",
driver: "pglite",
schema: "./schema.ts",
dbCredentials: {
url: "local-pg.db",
},
verbose: true,
strict: true,
});
```
## Bug fixes
- mysql-kit: fix GENERATED ALWAYS AS ... NOT NULL - [#2824](https://github.com/drizzle-team/drizzle-orm/pull/2824)
================================================
FILE: changelogs/drizzle-kit/0.25.0.md
================================================
## Breaking changes and migrate guide for Turso users
If you are using Turso and libsql, you will need to upgrade your `drizzle.config` and `@libsql/client` package.
1. This version of drizzle-orm will only work with `@libsql/client@0.10.0` or higher if you are using the `migrate` function. For other use cases, you can continue using previous versions(But the suggestion is to upgrade)
To install the latest version, use the command:
```bash
npm i @libsql/client@latest
```
2. Previously, we had a common `drizzle.config` for SQLite and Turso users, which allowed a shared strategy for both dialects. Starting with this release, we are introducing the turso dialect in drizzle-kit. We will evolve and improve Turso as a separate dialect with its own migration strategies.
**Before**
```ts
import { defineConfig } from "drizzle-kit";
export default defineConfig({
dialect: "sqlite",
schema: "./schema.ts",
out: "./drizzle",
dbCredentials: {
url: "database.db",
},
breakpoints: true,
verbose: true,
strict: true,
});
```
**After**
```ts
import { defineConfig } from "drizzle-kit";
export default defineConfig({
dialect: "turso",
schema: "./schema.ts",
out: "./drizzle",
dbCredentials: {
url: "database.db",
},
breakpoints: true,
verbose: true,
strict: true,
});
```
If you are using only SQLite, you can use `dialect: "sqlite"`
## LibSQL/Turso and Sqlite migration updates
### SQLite "generate" and "push" statements updates
Starting from this release, we will no longer generate comments like this:
```sql
'/*\n SQLite does not support "Changing existing column type" out of the box, we do not generate automatic migration for that, so it has to be done manually'
+ '\n Please refer to: https://www.techonthenet.com/sqlite/tables/alter_table.php'
+ '\n https://www.sqlite.org/lang_altertable.html'
+ '\n https://stackoverflow.com/questions/2083543/modify-a-columns-type-in-sqlite3'
+ "\n\n Due to that we don't generate migration automatically and it has to be done manually"
+ '\n*/'
```
We will generate a set of statements, and you can decide if it's appropriate to create data-moving statements instead. Here is an example of the SQL file you'll receive now:
```sql
PRAGMA foreign_keys=OFF;
--> statement-breakpoint
CREATE TABLE `__new_worker` (
`id` integer PRIMARY KEY NOT NULL,
`name` text NOT NULL,
`salary` text NOT NULL,
`job_id` integer,
FOREIGN KEY (`job_id`) REFERENCES `job`(`id`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
INSERT INTO `__new_worker`("id", "name", "salary", "job_id") SELECT "id", "name", "salary", "job_id" FROM `worker`;
--> statement-breakpoint
DROP TABLE `worker`;
--> statement-breakpoint
ALTER TABLE `__new_worker` RENAME TO `worker`;
--> statement-breakpoint
PRAGMA foreign_keys=ON;
```
### LibSQL/Turso "generate" and "push" statements updates
Since LibSQL supports more ALTER statements than SQLite, we can generate more statements without recreating your schema and moving all the data, which can be potentially dangerous for production environments.
LibSQL and Turso will now have a separate dialect in the Drizzle config file, meaning that we will evolve Turso and LibSQL independently from SQLite and will aim to support as many features as Turso/LibSQL offer.
With the updated LibSQL migration strategy, you will have the ability to:
- **Change Data Type**: Set a new data type for existing columns.
- **Set and Drop Default Values**: Add or remove default values for existing columns.
- **Set and Drop NOT NULL**: Add or remove the NOT NULL constraint on existing columns.
- **Add References to Existing Columns**: Add foreign key references to existing columns
You can find more information in the [LibSQL documentation](https://github.com/tursodatabase/libsql/blob/main/libsql-sqlite3/doc/libsql_extensions.md#altering-columns)
### LIMITATIONS
- Dropping or altering an index will cause table recreation.
This is because LibSQL/Turso does not support dropping this type of index.
```sql
CREATE TABLE `users` (
`id` integer NOT NULL,
`name` integer,
`age` integer PRIMARY KEY NOT NULL
FOREIGN KEY (`name`) REFERENCES `users1`("id") ON UPDATE no action ON DELETE no action
);
```
- If the table has indexes, altering columns will cause table recreation.
- Drizzle-Kit will drop the indexes, modify the columns, and then recreate the indexes.
- Adding or dropping composite foreign keys is not supported and will cause table recreation
### NOTES
- You can create a reference on any column type, but if you want to insert values, the referenced column must have a unique index or primary key.
```sql
CREATE TABLE parent(a PRIMARY KEY, b UNIQUE, c, d, e, f);
CREATE UNIQUE INDEX i1 ON parent(c, d);
CREATE INDEX i2 ON parent(e);
CREATE UNIQUE INDEX i3 ON parent(f COLLATE nocase);
CREATE TABLE child1(f, g REFERENCES parent(a)); -- Ok
CREATE TABLE child2(h, i REFERENCES parent(b)); -- Ok
CREATE TABLE child3(j, k, FOREIGN KEY(j, k) REFERENCES parent(c, d)); -- Ok
CREATE TABLE child4(l, m REFERENCES parent(e)); -- Error!
CREATE TABLE child5(n, o REFERENCES parent(f)); -- Error!
CREATE TABLE child6(p, q, FOREIGN KEY(p, q) REFERENCES parent(b, c)); -- Error!
CREATE TABLE child7(r REFERENCES parent(c)); -- Error!
```
> **NOTE**: The foreign key for the table child5 is an error because, although the parent key column has a unique index, the index uses a different collating sequence.
See more: https://www.sqlite.org/foreignkeys.html
## New `casing` param in `drizzle-orm` and `drizzle-kit`
There are more improvements you can make to your schema definition. The most common way to name your variables in a database and in TypeScript code is usually `snake_case` in the database and `camelCase` in the code. For this case, in Drizzle, you can now define a naming strategy in your database to help Drizzle map column keys automatically. Let's take a table from the previous example and make it work with the new casing API in Drizzle
Table can now become:
```ts
import { pgTable } from "drizzle-orm/pg-core";
export const ingredients = pgTable("ingredients", (t) => ({
id: t.uuid().defaultRandom().primaryKey(),
name: t.text().notNull(),
description: t.text(),
inStock: t.boolean().default(true),
}));
```
As you can see, `inStock` doesn't have a database name alias, but by defining the casing configuration at the connection level, all queries will automatically map it to `snake_case`
```ts
const db = await drizzle('node-postgres', { connection: '', casing: 'snake_case' })
```
For `drizzle-kit` migrations generation you should also specify `casing` param in drizzle config, so you can be sure you casing strategy will be applied to drizzle-kit as well
```ts
import { defineConfig } from "drizzle-kit";
export default defineConfig({
dialect: "postgresql",
schema: "./schema.ts",
dbCredentials: {
url: "postgresql://postgres:password@localhost:5432/db",
},
casing: "snake_case",
});
```
================================================
FILE: changelogs/drizzle-kit/0.26.0.md
================================================
# New Features
## Checks support in `drizzle-kit`
You can use drizzle-kit to manage your `check` constraint defined in drizzle-orm schema definition
For example current drizzle table:
```ts
import { sql } from "drizzle-orm";
import { check, pgTable } from "drizzle-orm/pg-core";
export const users = pgTable(
"users",
(c) => ({
id: c.uuid().defaultRandom().primaryKey(),
username: c.text().notNull(),
age: c.integer(),
}),
(table) => ({
checkConstraint: check("age_check", sql`${table.age} > 21`),
})
);
```
will be generated into
```sql
CREATE TABLE IF NOT EXISTS "users" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"username" text NOT NULL,
"age" integer,
CONSTRAINT "age_check" CHECK ("users"."age" > 21)
);
```
The same is supported in all dialects
### Limitations
- `generate` will work as expected for all check constraint changes.
- `push` will detect only check renames and will recreate the constraint. All other changes to SQL won't be detected and will be ignored.
So, if you want to change the constraint's SQL definition using only `push`, you would need to manually comment out the constraint, `push`, then put it back with the new SQL definition and `push` one more time.
## Views support in `drizzle-kit`
You can use drizzle-kit to manage your `views` defined in drizzle-orm schema definition. It will work with all existing dialects and view options
### PostgreSQL
For example current drizzle table:
```ts
import { sql } from "drizzle-orm";
import {
check,
pgMaterializedView,
pgTable,
pgView,
} from "drizzle-orm/pg-core";
export const users = pgTable(
"users",
(c) => ({
id: c.uuid().defaultRandom().primaryKey(),
username: c.text().notNull(),
age: c.integer(),
}),
(table) => ({
checkConstraint: check("age_check", sql`${table.age} > 21`),
})
);
export const simpleView = pgView("simple_users_view").as((qb) =>
qb.select().from(users)
);
export const materializedView = pgMaterializedView(
"materialized_users_view"
).as((qb) => qb.select().from(users));
```
will be generated into
```sql
CREATE TABLE IF NOT EXISTS "users" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"username" text NOT NULL,
"age" integer,
CONSTRAINT "age_check" CHECK ("users"."age" > 21)
);
CREATE VIEW "public"."simple_users_view" AS (select "id", "username", "age" from "users");
CREATE MATERIALIZED VIEW "public"."materialized_users_view" AS (select "id", "username", "age" from "users");
```
Views supported in all dialects, but materialized views are supported only in PostgreSQL
#### Limitations
- `generate` will work as expected for all view changes
- `push` limitations:
1. If you want to change the view's SQL definition using only `push`, you would need to manually comment out the view, `push`, then put it back with the new SQL definition and `push` one more time.
## Updates for PostgreSQL enums behavior
We've updated enum behavior in Drizzle with PostgreSQL:
- Add value after or before in enum: With this change, Drizzle will now respect the order of values in the enum and allow adding new values after or before a specific one.
- Support for dropping a value from an enum: In this case, Drizzle will attempt to alter all columns using the enum to text, then drop the existing enum and create a new one with the updated set of values. After that, all columns previously using the enum will be altered back to the new enum.
> If the deleted enum value was used by a column, this process will result in a database error.
- Support for dropping an enum
- Support for moving enums between schemas
- Support for renaming enums
================================================
FILE: changelogs/drizzle-kit/0.26.1.md
================================================
- Fix `data is malformed` for views
================================================
FILE: changelogs/drizzle-kit/0.26.2.md
================================================
- Updated internal versions for the drizzle-kit and drizzle-orm packages. Changes were introduced in the last minor release, and you are required to upgrade both packages to ensure they work as expected
================================================
FILE: changelogs/drizzle-kit/0.27.0.md
================================================
> This version of `drizzle-jit` requires `drizzle-orm@0.36.0` to enable all new features
# New Features
## Row-Level Security (RLS)
With Drizzle, you can enable Row-Level Security (RLS) for any Postgres table, create policies with various options, and define and manage the roles those policies apply to.
Drizzle supports a raw representation of Postgres policies and roles that can be used in any way you want. This works with popular Postgres database providers such as `Neon` and `Supabase`.
In Drizzle, we have specific predefined RLS roles and functions for RLS with both database providers, but you can also define your own logic.
### Enable RLS
If you just want to enable RLS on a table without adding policies, you can use `.enableRLS()`
As mentioned in the PostgreSQL documentation:
> If no policy exists for the table, a default-deny policy is used, meaning that no rows are visible or can be modified.
Operations that apply to the whole table, such as TRUNCATE and REFERENCES, are not subject to row security.
```ts
import { integer, pgTable } from 'drizzle-orm/pg-core';
export const users = pgTable('users', {
id: integer(),
}).enableRLS();
```
> If you add a policy to a table, RLS will be enabled automatically. So, there’s no need to explicitly enable RLS when adding policies to a table.
### Roles
Currently, Drizzle supports defining roles with a few different options, as shown below. Support for more options will be added in a future release.
```ts
import { pgRole } from 'drizzle-orm/pg-core';
export const admin = pgRole('admin', { createRole: true, createDb: true, inherit: true });
```
If a role already exists in your database, and you don’t want drizzle-kit to ‘see’ it or include it in migrations, you can mark the role as existing.
```ts
import { pgRole } from 'drizzle-orm/pg-core';
export const admin = pgRole('admin').existing();
```
### Policies
To fully leverage RLS, you can define policies within a Drizzle table.
> In PostgreSQL, policies should be linked to an existing table. Since policies are always associated with a specific table, we decided that policy definitions should be defined as a parameter of `pgTable`
**Example of pgPolicy with all available properties**
```ts
import { sql } from 'drizzle-orm';
import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core';
export const admin = pgRole('admin');
export const users = pgTable('users', {
id: integer(),
}, (t) => [
pgPolicy('policy', {
as: 'permissive',
to: admin,
for: 'delete',
using: sql``,
withCheck: sql``,
}),
]);
```
**Link Policy to an existing table**
There are situations where you need to link a policy to an existing table in your database.
The most common use case is with database providers like `Neon` or `Supabase`, where you need to add a policy
to their existing tables. In this case, you can use the `.link()` API
```ts
import { sql } from "drizzle-orm";
import { pgPolicy } from "drizzle-orm/pg-core";
import { authenticatedRole, realtimeMessages } from "drizzle-orm/supabase";
export const policy = pgPolicy("authenticated role insert policy", {
for: "insert",
to: authenticatedRole,
using: sql``,
}).link(realtimeMessages);
```
### Migrations
If you are using drizzle-kit to manage your schema and roles, there may be situations where you want to refer to roles that are not defined in your Drizzle schema. In such cases, you may want drizzle-kit to skip managing these roles without having to define each role in your drizzle schema and marking it with `.existing()`.
In these cases, you can use `entities.roles` in `drizzle.config.ts`. For a complete reference, refer to the the [`drizzle.config.ts`](https://orm.drizzle.team/docs/drizzle-config-file) documentation.
By default, `drizzle-kit` does not manage roles for you, so you will need to enable this feature in `drizzle.config.ts`.
```ts {12-14}
// drizzle.config.ts
import { defineConfig } from "drizzle-kit";
export default defineConfig({
dialect: 'postgresql',
schema: "./drizzle/schema.ts",
dbCredentials: {
url: process.env.DATABASE_URL!
},
verbose: true,
strict: true,
entities: {
roles: true
}
});
```
In case you need additional configuration options, let's take a look at a few more examples.
**You have an `admin` role and want to exclude it from the list of manageable roles**
```ts
// drizzle.config.ts
import { defineConfig } from "drizzle-kit";
export default defineConfig({
...
entities: {
roles: {
exclude: ['admin']
}
}
});
```
**You have an `admin` role and want to include it in the list of manageable roles**
```ts
// drizzle.config.ts
import { defineConfig } from "drizzle-kit";
export default defineConfig({
...
entities: {
roles: {
include: ['admin']
}
}
});
```
**If you are using `Neon` and want to exclude Neon-defined roles, you can use the provider option**
```ts
// drizzle.config.ts
import { defineConfig } from "drizzle-kit";
export default defineConfig({
...
entities: {
roles: {
provider: 'neon'
}
}
});
```
**If you are using `Supabase` and want to exclude Supabase-defined roles, you can use the provider option**
```ts
// drizzle.config.ts
import { defineConfig } from "drizzle-kit";
export default defineConfig({
...
entities: {
roles: {
provider: 'supabase'
}
}
});
```
> You may encounter situations where Drizzle is slightly outdated compared to new roles specified by your database provider.
In such cases, you can use the `provider` option and `exclude` additional roles:
```ts
// drizzle.config.ts
import { defineConfig } from "drizzle-kit";
export default defineConfig({
...
entities: {
roles: {
provider: 'supabase',
exclude: ['new_supabase_role']
}
}
});
```
### RLS on views
With Drizzle, you can also specify RLS policies on views. For this, you need to use `security_invoker` in the view's WITH options. Here is a small example:
```ts {5}
...
export const roomsUsersProfiles = pgView("rooms_users_profiles")
.with({
securityInvoker: true,
})
.as((qb) =>
qb
.select({
...getTableColumns(roomsUsers),
email: profiles.email,
})
.from(roomsUsers)
.innerJoin(profiles, eq(roomsUsers.userId, profiles.id))
);
```
### Using with Neon
The Neon Team helped us implement their vision of a wrapper on top of our raw policies API. We defined a specific
`/neon` import with the `crudPolicy` function that includes predefined functions and Neon's default roles.
Here's an example of how to use the `crudPolicy` function:
```ts
import { crudPolicy } from 'drizzle-orm/neon';
import { integer, pgRole, pgTable } from 'drizzle-orm/pg-core';
export const admin = pgRole('admin');
export const users = pgTable('users', {
id: integer(),
}, (t) => [
crudPolicy({ role: admin, read: true, modify: false }),
]);
```
This policy is equivalent to:
```ts
import { sql } from 'drizzle-orm';
import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core';
export const admin = pgRole('admin');
export const users = pgTable('users', {
id: integer(),
}, (t) => [
pgPolicy(`crud-${admin.name}-policy-insert`, {
for: 'insert',
to: admin,
withCheck: sql`false`,
}),
pgPolicy(`crud-${admin.name}-policy-update`, {
for: 'update',
to: admin,
using: sql`false`,
withCheck: sql`false`,
}),
pgPolicy(`crud-${admin.name}-policy-delete`, {
for: 'delete',
to: admin,
using: sql`false`,
}),
pgPolicy(`crud-${admin.name}-policy-select`, {
for: 'select',
to: admin,
using: sql`true`,
}),
]);
```
`Neon` exposes predefined `authenticated` and `anaonymous` roles and related functions. If you are using `Neon` for RLS, you can use these roles, which are marked as existing, and the related functions in your RLS queries.
```ts
// drizzle-orm/neon
export const authenticatedRole = pgRole('authenticated').existing();
export const anonymousRole = pgRole('anonymous').existing();
export const authUid = (userIdColumn: AnyPgColumn) => sql`(select auth.user_id() = ${userIdColumn})`;
```
For example, you can use the `Neon` predefined roles and functions like this:
```ts
import { sql } from 'drizzle-orm';
import { authenticatedRole } from 'drizzle-orm/neon';
import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core';
export const admin = pgRole('admin');
export const users = pgTable('users', {
id: integer(),
}, (t) => [
pgPolicy(`policy-insert`, {
for: 'insert',
to: authenticatedRole,
withCheck: sql`false`,
}),
]);
```
### Using with Supabase
We also have a `/supabase` import with a set of predefined roles marked as existing, which you can use in your schema.
This import will be extended in a future release with more functions and helpers to make using RLS and `Supabase` simpler.
```ts
// drizzle-orm/supabase
export const anonRole = pgRole('anon').existing();
export const authenticatedRole = pgRole('authenticated').existing();
export const serviceRole = pgRole('service_role').existing();
export const postgresRole = pgRole('postgres_role').existing();
export const supabaseAuthAdminRole = pgRole('supabase_auth_admin').existing();
```
For example, you can use the `Supabase` predefined roles like this:
```ts
import { sql } from 'drizzle-orm';
import { serviceRole } from 'drizzle-orm/supabase';
import { integer, pgPolicy, pgRole, pgTable } from 'drizzle-orm/pg-core';
export const admin = pgRole('admin');
export const users = pgTable('users', {
id: integer(),
}, (t) => [
pgPolicy(`policy-insert`, {
for: 'insert',
to: serviceRole,
withCheck: sql`false`,
}),
]);
```
The `/supabase` import also includes predefined tables and functions that you can use in your application
```ts
// drizzle-orm/supabase
const auth = pgSchema('auth');
export const authUsers = auth.table('users', {
id: uuid().primaryKey().notNull(),
});
const realtime = pgSchema('realtime');
export const realtimeMessages = realtime.table(
'messages',
{
id: bigserial({ mode: 'bigint' }).primaryKey(),
topic: text().notNull(),
extension: text({
enum: ['presence', 'broadcast', 'postgres_changes'],
}).notNull(),
},
);
export const authUid = sql`(select auth.uid())`;
export const realtimeTopic = sql`realtime.topic()`;
```
This allows you to use it in your code, and Drizzle Kit will treat them as existing databases,
using them only as information to connect to other entities
```ts
import { foreignKey, pgPolicy, pgTable, text, uuid } from "drizzle-orm/pg-core";
import { sql } from "drizzle-orm/sql";
import { authenticatedRole, authUsers } from "drizzle-orm/supabase";
export const profiles = pgTable(
"profiles",
{
id: uuid().primaryKey().notNull(),
email: text().notNull(),
},
(table) => [
foreignKey({
columns: [table.id],
// reference to the auth table from Supabase
foreignColumns: [authUsers.id],
name: "profiles_id_fk",
}).onDelete("cascade"),
pgPolicy("authenticated can view all profiles", {
for: "select",
// using predefined role from Supabase
to: authenticatedRole,
using: sql`true`,
}),
]
);
```
Let's check an example of adding a policy to a table that exists in `Supabase`
```ts
import { sql } from "drizzle-orm";
import { pgPolicy } from "drizzle-orm/pg-core";
import { authenticatedRole, realtimeMessages } from "drizzle-orm/supabase";
export const policy = pgPolicy("authenticated role insert policy", {
for: "insert",
to: authenticatedRole,
using: sql``,
}).link(realtimeMessages);
```
# Bug fixes
- [[BUG]: Studio + mysql default mode, wrong format related timezone](https://github.com/drizzle-team/drizzle-orm/issues/2747)
- [[BUG]: Drizzle Studio CORS error](https://github.com/drizzle-team/drizzle-orm/issues/1857)
- [[BUG]: TIMESTAMPS showing up incorrectly on drizzle studio](https://github.com/drizzle-team/drizzle-orm/issues/2549)
================================================
FILE: changelogs/drizzle-kit/0.27.1.md
================================================
- Fix: [[BUG]: When using RLS policies and Views, the view is the last clause generated](https://github.com/drizzle-team/drizzle-orm/issues/3378)
================================================
FILE: changelogs/drizzle-kit/0.27.2.md
================================================
- Fix [[BUG]: Undefined properties when using drizzle-kit push](https://github.com/drizzle-team/drizzle-orm/issues/3391)
- Fix TypeError: Cannot read properties of undefined (reading 'isRLSEnabled')
- Fix push bugs, when pushing a schema with linked policy to a table from `drizzle-orm/supabase`
================================================
FILE: changelogs/drizzle-kit/0.28.0.md
================================================
# Improvements
- Added an OHM static imports checker to identify unexpected imports within a chain of imports in the drizzle-kit repo. For example, it checks if drizzle-orm is imported before drizzle-kit and verifies if the drizzle-orm import is available in your project.
- [Adding more columns to Supabase auth.users table schema](https://github.com/drizzle-team/drizzle-orm/issues/3327) - thanks @nicholasdly
# Bug Fixes
- [[BUG]: [drizzle-kit]: Fix breakpoints option cannot be disabled](https://github.com/drizzle-team/drizzle-orm/issues/2828) - thanks @klotztech
- [[BUG]: drizzle-kit introspect: SMALLINT import missing and incorrect DECIMAL UNSIGNED handling](https://github.com/drizzle-team/drizzle-orm/issues/2950) - thanks @L-Mario564
- [Unsigned tinyints preventing migrations](https://github.com/drizzle-team/drizzle-orm/issues/1571) - thanks @L-Mario564
- [[BUG]: Can't parse float(8,2) from database (precision and scale and/or unsigned breaks float types)](https://github.com/drizzle-team/drizzle-orm/issues/3285) - thanks @L-Mario564
- [[BUG]: PgEnum generated migration doesn't escape single quotes](https://github.com/drizzle-team/drizzle-orm/issues/1272) - thanks @L-Mario564
- [[BUG]: single quote not escaped correctly in migration file](https://github.com/drizzle-team/drizzle-orm/issues/2184) - thanks @L-Mario564
- [[BUG]: Migrations does not escape single quotes](https://github.com/drizzle-team/drizzle-orm/issues/1765) - thanks @L-Mario564
- [[BUG]: Issue with quoted default string values](https://github.com/drizzle-team/drizzle-orm/issues/2122) - thanks @L-Mario564
- [[BUG]: SQl commands in wrong roder](https://github.com/drizzle-team/drizzle-orm/issues/2390) - thanks @L-Mario564
- [[BUG]: Time with precision in drizzle-orm/pg-core adds double-quotes around type](https://github.com/drizzle-team/drizzle-orm/issues/1804) - thanks @L-Mario564
- [[BUG]: Postgres push fails due to lack of quotes](https://github.com/drizzle-team/drizzle-orm/issues/2396) - thanks @L-Mario564
- [[BUG]: TypeError: Cannot read properties of undefined (reading 'compositePrimaryKeys')](https://github.com/drizzle-team/drizzle-orm/issues/2344) - thanks @L-Mario564
- [[BUG]: drizzle-kit introspect generates CURRENT_TIMESTAMP without sql operator on date column](https://github.com/drizzle-team/drizzle-orm/issues/2899) - thanks @L-Mario564
- [[BUG]: Drizzle-kit introspect doesn't pull correct defautl statement](https://github.com/drizzle-team/drizzle-orm/issues/2905) - thanks @L-Mario564
- [[BUG]: Problem on MacBook - This statement does not return data. Use run() instead](https://github.com/drizzle-team/drizzle-orm/issues/2623) - thanks @L-Mario564
- [[BUG]: Enum column names that are used as arrays are not quoted](https://github.com/drizzle-team/drizzle-orm/issues/2598) - thanks @L-Mario564
- [[BUG]: drizzle-kit generate ignores index operators](https://github.com/drizzle-team/drizzle-orm/issues/2935) - thanks @L-Mario564
- [dialect param config error message is wrong](https://github.com/drizzle-team/drizzle-orm/issues/3427) - thanks @L-Mario564
- [[BUG]: Error setting default enum field values](https://github.com/drizzle-team/drizzle-orm/issues/2299) - thanks @L-Mario564
- [[BUG]: drizzle-kit does not respect the order of columns configured in primaryKey()](https://github.com/drizzle-team/drizzle-orm/issues/2326) - thanks @L-Mario564
- [[BUG]: Cannot drop Unique Constraint MySQL](https://github.com/drizzle-team/drizzle-orm/issues/998) - thanks @L-Mario564
================================================
FILE: changelogs/drizzle-kit/0.28.1.md
================================================
# Bug fixes
- Fixed typos in repository: thanks @armandsalle, @masto, @wackbyte, @Asher-JH, @MaxLeiter
- [fix: wrong dialect set in mysql/sqlite introspect](https://github.com/drizzle-team/drizzle-orm/pull/2865)
================================================
FILE: changelogs/drizzle-kit/0.29.0.md
================================================
# New Dialects
### 🎉 `SingleStore` dialect is now available in Drizzle
Thanks to the SingleStore team for creating a PR with all the necessary changes to support the MySQL-compatible part of SingleStore. You can already start using it with Drizzle. The SingleStore team will also help us iterate through updates and make more SingleStore-specific features available in Drizzle
```ts
import 'dotenv/config';
import { defineConfig } from 'drizzle-kit';
export default defineConfig({
dialect: 'singlestore',
out: './drizzle',
schema: './src/db/schema.ts',
dbCredentials: {
url: process.env.DATABASE_URL!,
},
});
```
You can check out our [Getting started guides](https://orm.drizzle.team/docs/get-started/singlestore-new) to try SingleStore!
# New Drivers
### 🎉 `SQLite Durable Objects` driver is now available in Drizzle
You can now query SQLite Durable Objects in Drizzle!
For the full example, please check our [Get Started](https://orm.drizzle.team/docs/get-started/do-new) Section
```ts
import 'dotenv/config';
import { defineConfig } from 'drizzle-kit';
export default defineConfig({
out: './drizzle',
schema: './src/db/schema.ts',
dialect: 'sqlite',
driver: 'durable-sqlite',
});
```
================================================
FILE: changelogs/drizzle-kit/0.29.1.md
================================================
- Fix SingleStore generate migrations command
================================================
FILE: changelogs/drizzle-kit/0.30.0.md
================================================
Starting from this update, the PostgreSQL dialect will align with the behavior of all other dialects. It will no longer include `IF NOT EXISTS`, `$DO`, or similar statements, which could cause incorrect DDL statements to not fail when an object already exists in the database and should actually fail.
This change marks our first step toward several major upgrades we are preparing:
- An updated and improved migration workflow featuring commutative migrations, a revised folder structure, and enhanced collaboration capabilities for migrations.
- Better support for Xata migrations.
- Compatibility with CockroachDB (achieving full compatibility will only require removing serial fields from the migration folder).
================================================
FILE: changelogs/drizzle-kit/0.30.1.md
================================================
# New Features
### `drizzle-kit export`
To make drizzle-kit integration with other migration tools, like Atlas much easier, we've prepared a new command called `export`. It will translate your drizzle schema in SQL representation(DDL) statements and outputs to the console
```ts
// schema.ts
import { pgTable, serial, text } from 'drizzle-orm/pg-core'
export const users = pgTable('users', {
id: serial('id').primaryKey(),
email: text('email').notNull(),
name: text('name')
});
```
Running
```bash
npx drizzle-kit export
```
will output this string to console
```bash
CREATE TABLE "users" (
"id" serial PRIMARY KEY NOT NULL,
"email" text NOT NULL,
"name" text
);
```
By default, the only option for now is `--sql`, so the output format will be SQL DDL statements. In the future, we will support additional output formats to accommodate more migration tools
```bash
npx drizzle-kit export --sql
```
================================================
FILE: changelogs/drizzle-kit/0.30.2.md
================================================
- Fix certificates generation utility for Drizzle Studio; [[BUG]: [drizzle-kit]: drizzle-kit dependency on drizzle-studio perms error](https://github.com/drizzle-team/drizzle-orm/issues/3729)
================================================
FILE: changelogs/drizzle-kit/0.30.3.md
================================================
# SingleStore `push` and `generate` improvements
As SingleStore did not support certain DDL statements before this release, you might encounter an error indicating that some schema changes cannot be applied due to a database issue. Starting from this version, drizzle-kit will detect such cases and initiate table recreation with data transfer between the tables
# Bug fixes
- [[BUG] If the index name is the same as the generated name, it will be empty and a type error will occur](https://github.com/drizzle-team/drizzle-orm/issues/3420)
================================================
FILE: changelogs/drizzle-kit/0.30.4.md
================================================
- Fix bug that generates incorrect syntax when introspect in mysql
- Fix a bug that caused incorrect syntax output when introspect in unsigned columns
================================================
FILE: changelogs/drizzle-kit/0.30.5.md
================================================
# New Features
## Added `Gel` dialect support and `gel-js` client support
Drizzle is getting a new `Gel` dialect with its own types and Gel-specific logic. In this first iteration, almost all query-building features have been copied from the `PostgreSQL` dialect since Gel is fully PostgreSQL-compatible. The only change in this iteration is the data types. The Gel dialect has a different set of available data types, and all mappings for these types have been designed to avoid any extra conversions on Drizzle's side. This means you will insert and select exactly the same data as supported by the Gel protocol.
Drizzle + Gel integration will work only through `drizzle-kit pull`. Drizzle won't support `generate`, `migrate`, or `push` features in this case. Instead, drizzle-kit is used solely to pull the Drizzle schema from the Gel database, which can then be used in your `drizzle-orm` queries.
The Gel + Drizzle workflow:
1. Use the `gel` CLI to manage your schema.
2. Use the `gel` CLI to generate and apply migrations to the database.
3. Use drizzle-kit to pull the Gel database schema into a Drizzle schema.
4. Use drizzle-orm with gel-js to query the Gel database.
On the drizzle-kit side you can now use `dialect: "gel"`
```ts
// drizzle.config.ts
import { defineConfig } from 'drizzle-kit';
export default defineConfig({
dialect: 'gel',
});
```
For a complete Get Started tutorial you can use our new guides:
- [Get Started with Drizzle and Gel in a new project](https://orm.drizzle.team/docs/get-started/gel-new)
- [Get Started with Drizzle and Gel in a existing project](https://orm.drizzle.team/docs/get-started/gel-existing)
================================================
FILE: changelogs/drizzle-kit/0.30.6.md
================================================
### Bug fixes
- [[BUG]: d1 push locally is not working](https://github.com/drizzle-team/drizzle-orm/issues/4099) - thanks @mabels and @RomanNabukhotnyi
- [[BUG] Cloudflare D1: drizzle-kit push is not working (error 7500 SQLITE_AUTH)](https://github.com/drizzle-team/drizzle-orm/issues/3728) - thanks @mabels and @RomanNabukhotnyi
================================================
FILE: changelogs/drizzle-kit/0.31.0.md
================================================
## Features and improvements
### Enum DDL improvements
For situations where you drop an `enum` value or reorder values in an `enum`, there is no native way to do this in PostgreSQL. To handle these cases, `drizzle-kit` used to:
- Change the column data types from the enum to text
- Drop the old enum
- Add the new enum
- Change the column data types back to the new enum
However, there were a few scenarios that weren’t covered: `PostgreSQL` wasn’t updating default expressions for columns when their data types changed
Therefore, for cases where you either change a column’s data type from an `enum` to some other type, drop an `enum` value, or reorder `enum` values, we now do the following:
- Change the column data types from the enum to text
- Set the default using the ::text expression
- Drop the old enum
- Add the new enum
- Change the column data types back to the new enum
- Set the default using the ::<new_enum> expression
### `esbuild` version upgrade
For `drizzle-kit` we upgraded the version to latest (`0.25.2`), thanks @paulmarsicloud
## Bug fixes
- [[BUG]: Error on Malformed Array Literal](https://github.com/drizzle-team/drizzle-orm/issues/2715) - thanks @Kratious
- [[BUG]: Postgres drizzle-kit: Error while pulling indexes from a table with json/jsonb deep field index](https://github.com/drizzle-team/drizzle-orm/issues/2744) - thanks @Kratious
- [goog-vulnz flags CVE-2024-24790 in esbuild 0.19.7](https://github.com/drizzle-team/drizzle-orm/issues/4045)
================================================
FILE: changelogs/drizzle-kit/0.31.1.md
================================================
### Fixed `drizzle-kit pull` bugs when using Gel extensions.
Because Gel extensions create schema names containing `::` (for example, `ext::auth`), Drizzle previously handled these names incorrectly. Starting with this release, you can use Gel extensions without any problems. Here’s what you should do:
1. Enable extensions schemas in `drizzle.config.ts`
```ts
import { defineConfig } from "drizzle-kit";
export default defineConfig({
dialect: 'gel',
schemaFilter: ['ext::auth', 'public']
});
```
2. Run `drizzle-kit pull`
3. Done!
================================================
FILE: changelogs/drizzle-kit/0.31.10.md
================================================
- Updated to `hanji@0.0.8` - native bun `stringWidth`, `stripANSI` support, errors for non-TTY environments
- We've migrated away from `esbuild-register` to `tsx` loader, it will now allow to use `drizzle-kit` seamlessly with both `ESM` and `CJS` modules
- We've also added native `Bun` and `Deno` launch support, which will not trigger `tsx` loader and utilise native `bun` and `deno` imports capabilities and faster startup times
================================================
FILE: changelogs/drizzle-kit/0.31.2.md
================================================
### Bug fixes
- Fixed relations extraction to not interfere with Drizzle Studio.
================================================
FILE: changelogs/drizzle-kit/0.31.3.md
================================================
- Internal changes to Studio context. Added `databaseName` and `packageName` properties for Studio
================================================
FILE: changelogs/drizzle-kit/0.31.4.md
================================================
- Fixed `halfvec`, `bit` and `sparsevec` type generation bug in drizzle-kit
================================================
FILE: changelogs/drizzle-kit/0.31.5.md
================================================
- Add casing support to studio configuration and related functions
================================================
FILE: changelogs/drizzle-kit/0.31.6.md
================================================
### Bug fixes
- [[BUG]: Importing drizzle-kit/api fails in ESM modules](https://github.com/drizzle-team/drizzle-orm/issues/2853)
================================================
FILE: changelogs/drizzle-kit/0.31.7.md
================================================
### Bug fixes
- [[BUG]: Drizzle Kit push to Postgres 18 produces unecessary DROP SQL when the schema was NOT changed](https://github.com/drizzle-team/drizzle-orm/issues/4944)
================================================
FILE: changelogs/drizzle-kit/0.31.8.md
================================================
### Bug fixes
- Fixed `algorythm` => `algorithm` typo.
- Fixed external dependencies in build configuration.
================================================
FILE: changelogs/drizzle-kit/0.31.9.md
================================================
- drizzle-kit api improvements for D1 connections
================================================
FILE: changelogs/drizzle-orm/0.12.0-beta.23.md
================================================
# drizzle-orm 0.12.0-beta.23
- Added new row mapping mechanism as `mapResultRowV2`, `mapResultRow` will be replaced by it in the future.
================================================
FILE: changelogs/drizzle-orm/0.12.0-beta.24.md
================================================
# drizzle-orm 0.12.0-beta.24
- Made `.execute()` method public in query builders.
- Added `name()` function for escaping entity names inside queries.
- (internal) Removed old row mapper implementation.
================================================
FILE: changelogs/drizzle-orm/0.13.0.md
================================================
# drizzle-orm 0.13.0
- Release 🎉
================================================
FILE: changelogs/drizzle-orm/0.13.1.md
================================================
# drizzle-orm 0.13.1
- Fix mysql peer dependency range
================================================
FILE: changelogs/drizzle-orm/0.14.1.md
================================================
# drizzle-orm 0.14.1
- Bumped everything to 0.14.1.
================================================
FILE: changelogs/drizzle-orm/0.14.2.md
================================================
# drizzle-orm 0.14.2
- Bumped everything to 0.14.2
================================================
FILE: changelogs/drizzle-orm/0.15.0.md
================================================
# drizzle-orm 0.15.0
- Minor upgrade for all modules, due to adding version for api
- Add internal version for ORM api and npm version
================================================
FILE: changelogs/drizzle-orm/0.15.1.md
================================================
# drizzle-orm 0.15.1
- Add schema symbol to table
- Append schema before table name in SQLWrapper if it exists
================================================
FILE: changelogs/drizzle-orm/0.15.2.md
================================================
# drizzle-orm 0.15.2
Internal release
================================================
FILE: changelogs/drizzle-orm/0.15.3.md
================================================
# drizzle-orm 0.15.3
Internal release
================================================
FILE: changelogs/drizzle-orm/0.16.0.md
================================================
# drizzle-orm 0.16.0
- Bump all packages to 0.16.0
================================================
FILE: changelogs/drizzle-orm/0.16.1.md
================================================
# drizzle-orm 0.16.0
- Fix peer dependency error for >=0.16 drizzle packages
================================================
FILE: changelogs/drizzle-orm/0.17.0.md
================================================
## ❗ All ORM packages are now merged into `drizzle-orm`
Starting from release `0.17.0` and onwards, all dialect-specific packages are merged into `drizzle-orm`. Legacy ORM packages will be archived.
### Import paths changes
#### PostgreSQL
- `import { ... } from 'drizzle-orm-pg'` -> `import { ... } from 'drizzle-orm/pg-core'`
- `import { ... } from 'drizzle-orm-pg/node'` -> `import { ... } from 'drizzle-orm/node-postgres'`
- `import { ... } from 'drizzle-orm-pg/neondb'` -> `import { ... } from 'drizzle-orm/neon'`
- `import { ... } from 'drizzle-orm-pg/postgres.js'` -> `import { ... } from 'drizzle-orm/postgres.js'`
#### MySQL
- `import { ... } from 'drizzle-orm-mysql'` -> `import { ... } from 'drizzle-orm/mysql-core'`
- `import { ... } from 'drizzle-orm-mysql/mysql2'` -> `import { ... } from 'drizzle-orm/mysql2'`
#### SQLite
- `import { ... } from 'drizzle-orm-sqlite'` -> `import { ... } from 'drizzle-orm/sqlite-core'`
- `import { ... } from 'drizzle-orm-sqlite/better-sqlite3'` -> `import { ... } from 'drizzle-orm/better-sqlite3'`
- `import { ... } from 'drizzle-orm-sqlite/d1'` -> `import { ... } from 'drizzle-orm/d1'`
- `import { ... } from 'drizzle-orm-sqlite/bun'` -> `import { ... } from 'drizzle-orm/bun-sqlite'`
- `import { ... } from 'drizzle-orm-sqlite/sql.js'` -> `import { ... } from 'drizzle-orm/sql.js'`
================================================
FILE: changelogs/drizzle-orm/0.17.1.md
================================================
- Added feature showcase section to README
================================================
FILE: changelogs/drizzle-orm/0.17.2.md
================================================
- Fixed package.json require path in 'drizzle-orm/version'
================================================
FILE: changelogs/drizzle-orm/0.17.3.md
================================================
We have released [AWS Data API support](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) for PostgreSQL
---
Connection example
```typescript
import { drizzle, migrate } from 'drizzle-orm/aws-data-api/pg';
const rdsClient = new RDSDataClient({});
const db = drizzle(rdsClient, {
database: '',
secretArn: '',
resourceArn: '',
});
await migrate(db, { migrationsFolder: '' });
```
> **Note**:
> All drizzle pg data types are working well with data api, except of `interval`. This type is not yet mapped in proper way
================================================
FILE: changelogs/drizzle-orm/0.17.4.md
================================================
We have released [SQLite Proxy Driver](https://github.com/drizzle-team/drizzle-orm/tree/main/examples/sqlite-proxy)
---
Perfect way to setup custom logic for database calls instead of predefined drivers
Should work well with serverless apps 🚀
```typescript
// Custom Proxy HTTP driver
const db = drizzle(async (sql, params, method) => {
try {
const rows = await axios.post('http://localhost:3000/query', { sql, params, method });
return { rows: rows.data };
} catch (e: any) {
console.error('Error from sqlite proxy server: ', e.response.data)
return { rows: [] };
}
});
```
> For more example you can check [full documentation](https://github.com/drizzle-team/drizzle-orm/tree/main/examples/sqlite-proxy)
================================================
FILE: changelogs/drizzle-orm/0.17.5.md
================================================
We have released [Planetscale Serverless](https://github.com/planetscale/database-js) driver support
---
Usage example:
```typescript
import { drizzle } from 'drizzle-orm/planetscale-serverless';
import { connect } from '@planetscale/database';
// create the connection
const connection = connect({
host: process.env['DATABASE_HOST'],
username: process.env['DATABASE_USERNAME'],
password: process.env['DATABASE_PASSWORD'],
});
const db = drizzle(connection);
```
================================================
FILE: changelogs/drizzle-orm/0.17.6.md
================================================
Fix circular dependency for query building on all pg and mysql drivers
Moved all aws data api typings specific logic to dialect from sql to prevent circular dependency issues
================================================
FILE: changelogs/drizzle-orm/0.17.7.md
================================================
- Fix [#158](https://github.com/drizzle-team/drizzle-orm/issues/158) issue. Method `.returning()` was working incorrectly with `.get()` method in sqlite dialect
- Fix SQLite Proxy driver mapping bug
- Add test cases for SQLite Proxy driver
- Add additional example for SQLite Proxy Server setup to handle `.get()` as well
================================================
FILE: changelogs/drizzle-orm/0.18.0.md
================================================
- Improved join result types for partial selects (refer to the [docs](/docs/joins.md) page for more information)
- Renamed import paths for Postgres.js and SQL.js drivers to avoid bundling errors:
- `drizzle-orm/postgres.js` -> `drizzle-orm/postgres-js`
- `drizzle-orm/sql.js` -> `drizzle-orm/sql-js`
================================================
FILE: changelogs/drizzle-orm/0.19.0.md
================================================
- Implemented selecting and joining a subquery. Example usage:
```ts
const sq = db
.select({
categoryId: courseCategoriesTable.id,
category: courseCategoriesTable.name,
total: sql`count(${courseCategoriesTable.id})`.as<number>(),
})
.from(courseCategoriesTable)
.groupBy(courseCategoriesTable.id, courseCategoriesTable.name)
.subquery('sq');
```
After that, just use the subquery instead of a table as usual.
- ❗ Replaced `db.select(table).fields({ ... })` syntax with `db.select({ ... }).from(table)` to look more like its SQL counterpart.
================================================
FILE: changelogs/drizzle-orm/0.19.1.md
================================================
## Changelog
---
- Add `char` data type support for postgresql by @AlexandrLi in [#177](https://github.com/drizzle-team/drizzle-orm/pull/177)
- Adding new section with `New Contributors` for release notes. Took this template from [bun](https://github.com/oven-sh/bun) release notes pattern
## New Contributors
---
- @AlexandrLi made their first contribution in [#177](https://github.com/drizzle-team/drizzle-orm/pull/177)
================================================
FILE: changelogs/drizzle-orm/0.20.0.md
================================================
- 🎉 **Implemented support for WITH clause ([docs](/drizzle-orm/src/pg-core/README.md#with-clause)). Example usage:**
```ts
const sq = db
.select()
.from(users)
.prepareWithSubquery('sq');
const result = await db
.with(sq)
.select({
id: sq.id,
name: sq.name,
total: sql<number>`count(${sq.id})::int`(),
})
.from(sq)
.groupBy(sq.id, sq.name);
```
- 🐛 Fixed various bugs with selecting/joining of subqueries.
- ❗ Renamed `.subquery('alias')` to `.as('alias')`.
- ❗ ``sql`query`.as<type>()`` is now ``sql<type>`query`()``. Old syntax is still supported, but is deprecated and will be removed in one of the next releases.
================================================
FILE: changelogs/drizzle-orm/0.20.1.md
================================================
- 🎉 Added `{ logger: true }` shorthand to `drizzle()` to enable query logging. See [logging docs](/drizzle-orm/src/pg-core/README.md#logging) for detailed logging configuration.
================================================
FILE: changelogs/drizzle-orm/0.20.2.md
================================================
- 🎉 Added PostgreSQL network data types:
- `inet`
- `cidr`
- `macaddr`
- `macaddr8`
================================================
FILE: changelogs/drizzle-orm/0.20.3.md
================================================
- 🎉 Added support for locking clauses in SELECT (`SELECT ... FOR UPDATE`):
PostgreSQL
```ts
await db
.select()
.from(users)
.for('update')
.for('no key update', { of: users })
.for('no key update', { of: users, skipLocked: true })
.for('share', { of: users, noWait: true });
```
MySQL
```ts
await db.select().from(users).for('update');
await db.select().from(users).for('share', { skipLocked: true });
await db.select().from(users).for('update', { noWait: true });
```
- 🎉🐛 Custom column types now support returning `SQL` from `toDriver()` method in addition to the `driverData` type from generic.
================================================
FILE: changelogs/drizzle-orm/0.21.0.md
================================================
## Drizzle ORM 0.21.0 was released 🎉
- Added support for new migration folder structure and breakpoints feature, described in drizzle-kit release section
- Fix `onUpdateNow()` expression generation for default migration statement
</br>
### Support for PostgreSQL array types
---
```ts
export const salEmp = pgTable('sal_emp', {
name: text('name').notNull(),
payByQuarter: integer('pay_by_quarter').array(),
schedule: text('schedule').array().array(),
});
export const tictactoe = pgTable('tictactoe', {
squares: integer('squares').array(3).array(3),
});
```
drizzle kit will generate
```sql
CREATE TABLE sal_emp (
name text,
pay_by_quarter integer[],
schedule text[][]
);
CREATE TABLE tictactoe (
squares integer[3][3]
);
```
</br>
### Added composite primary key support to PostgreSQL and MySQL
---
PostgreSQL
```ts
import { primaryKey } from 'drizzle-orm/pg-core';
export const cpkTable = pgTable('table', {
column1: integer('column1').default(10).notNull(),
column2: integer('column2'),
column3: integer('column3'),
}, (table) => ({
cpk: primaryKey(table.column1, table.column2),
}));
```
MySQL
```ts
import { primaryKey } from 'drizzle-orm/mysql-core';
export const cpkTable = mysqlTable('table', {
simple: int('simple'),
columnNotNull: int('column_not_null').notNull(),
columnDefault: int('column_default').default(100),
}, (table) => ({
cpk: primaryKey(table.simple, table.columnDefault),
}));
```
---
## Drizzle Kit 0.17.0 was released 🎉
## Breaking changes
### Folder structure was migrated to newer version
Before running any new migrations `drizzle-kit` will ask you to upgrade in a first place
Migration file structure < 0.17.0
```plaintext
📦 <project root>
└ 📂 migrations
└ 📂 20221207174503
├ 📜 migration.sql
├ 📜 snapshot.json
└ 📂 20230101104503
├ 📜 migration.sql
├ 📜 snapshot.json
```
Migration file structure >= 0.17.0
```plaintext
📦 <project root>
└ 📂 migrations
└ 📂 meta
├ 📜 _journal.json
├ 📜 0000_snapshot.json
├ 📜 0001_snapshot.json
└ 📜 0000_icy_stranger.sql
└ 📜 0001_strange_avengers.sql
```
## Upgrading to 0.17.0
---

To easily migrate from previous folder structure to new you need to run `up` command in drizzle kit. It's a great helper to upgrade your migrations to new format on each drizzle kit major update
```bash
drizzle-kit up:<dialect> # dialects: `pg`, `mysql`, `sqlite`
# example for pg
drizzle-kit up:pg
```
</br>
## New Features
### New `drizzle-kit` command called `drop`
</br>
In a case you think some of migrations were generated in a wrong way or you have made migration simultaneously with other developers you can easily rollback it by running simple command
> **Warning**:
> Make sure you are dropping migrations that were not applied to your database
```bash
drizzle-kit drop
```
This command will show you a list of all migrations you have and you'll need just to choose migration you want to drop. After that `drizzle-kit` will do all the hard work on deleting migration files

</br>
### New `drizzle-kit` option `--breakpoints` for `generate` and `introspect` commands
If particular driver doesn't support running multiple quries in 1 execution you can use `--breakpoints`.
`drizzle-kit` will generate current sql
```sql
CREATE TABLE `users` (
`id` int PRIMARY KEY NOT NULL,
`full_name` text NOT NULL,
);
--> statement-breakpoint
CREATE TABLE `table` (
`id` int PRIMARY KEY NOT NULL,
`phone` int,
);
```
Using it `drizzle-orm` will split all sql files by statements and execute them separately
</br>
### Add `drizzle-kit introspect` for MySQL dialect
You can introspect your mysql database using `introspect:mysql` command
```bash
drizzle-kit introspect:mysql --out ./migrations --connectionString mysql://user:password@127.0.0.1:3306/database
```

</br>
### Support for glob patterns for schema path
Usage example in `cli`
```bash
drizzle-kit generate:pg --out ./migrations --schema ./core/**/*.ts ./database/schema.ts
```
Usage example in `drizzle.config`
```text
{
"out: "./migrations",
"schema": ["./core/**/*.ts", "./database/schema.ts"]
}
```
## Bug Fixes and improvements
### Postgres dialect
---
**GitHub issue fixes**
- [pg] char is undefined during introspection [#9](https://github.com/drizzle-team/drizzle-kit-mirror/issues/9)
- when unknown type is detected, would be nice to emit a TODO comment instead of undefined [#8](https://github.com/drizzle-team/drizzle-kit-mirror/issues/8)
- "post_id" integer DEFAULT currval('posts_id_seq'::regclass) generates invalid TS [#7](https://github.com/drizzle-team/drizzle-kit-mirror/issues/7)
- "ip" INET NOT NULL is not supported [#6](https://github.com/drizzle-team/drizzle-kit-mirror/issues/6)
- "id" UUID NOT NULL DEFAULT uuid_generate_v4() type is not supported [#5](https://github.com/drizzle-team/drizzle-kit-mirror/issues/5)
- array fields end up as "undefined" in the schema [#4](https://github.com/drizzle-team/drizzle-kit-mirror/issues/4)
- timestamp is not in the import statement in schema.ts [#3](https://github.com/drizzle-team/drizzle-kit-mirror/issues/3)
- generated enums are not camel cased [#2](https://github.com/drizzle-team/drizzle-kit-mirror/issues/2)
**Introspect improvements**
- Add support for composite PK's generation;
- Add support for `cidr`, `inet`, `macaddr`, `macaddr8`, `smallserial`
- Add interval fields generation in schema, such as `minute to second`, `day to hour`, etc.
- Add default values for `numerics`
- Add default values for `enums`
### MySQL dialect
---
**Migration generation improvements**
- Add `autoincrement` create, delete and update handling
- Add `on update current_timestamp` handling for timestamps
- Add data type changing, using `modify`
- Add `not null` changing, using `modify`
- Add `default` drop and create statements
- Fix `defaults` generation bugs, such as escaping, date strings, expressions, etc
**Introspect improvements**
- Add `autoincrement` to all supported types
- Add `fsp` for time based data types
- Add precision and scale for `double`
- Make time `{ mode: "string" }` by default
- Add defaults to `json`, `decimal` and `binary` datatypes
- Add `enum` data type generation
================================================
FILE: changelogs/drizzle-orm/0.21.1.md
================================================
- 🎉 Added support for `HAVING` clause
- 🎉 Added support for referencing selected fields in `.where()`, `.having()`, `.groupBy()` and `.orderBy()` using an optional callback:
```ts
await db
.select({
id: citiesTable.id,
name: sql<string>`upper(${citiesTable.name})`.as('upper_name'),
usersCount: sql<number>`count(${users2Table.id})::int`.as('users_count'),
})
.from(citiesTable)
.leftJoin(users2Table, eq(users2Table.cityId, citiesTable.id))
.where(({ name }) => sql`length(${name}) >= 3`)
.groupBy(citiesTable.id)
.having(({ usersCount }) => sql`${usersCount} > 0`)
.orderBy(({ name }) => name);
```
================================================
FILE: changelogs/drizzle-orm/0.22.0.md
================================================
- 🎉 Introduced a standalone query builder that can be used without a DB connection:
```ts
import { queryBuilder as qb } from 'drizzle-orm/pg-core';
const query = qb.select().from(users).where(eq(users.name, 'Dan'));
const { sql, params } = query.toSQL();
```
- 🎉 Improved `WITH ... SELECT` subquery creation syntax to more resemble SQL:
**Before**:
```ts
const regionalSales = db
.select({
region: orders.region,
totalSales: sql`sum(${orders.amount})`.as<number>('total_sales'),
})
.from(orders)
.groupBy(orders.region)
.prepareWithSubquery('regional_sales');
await db.with(regionalSales).select(...).from(...);
```
**After**:
```ts
const regionalSales = db
.$with('regional_sales')
.as(
db
.select({
region: orders.region,
totalSales: sql<number>`sum(${orders.amount})`.as('total_sales'),
})
.from(orders)
.groupBy(orders.region),
);
await db.with(regionalSales).select(...).from(...);
```
================================================
FILE: changelogs/drizzle-orm/0.23.0.md
================================================
- 🎉 Added Knex and Kysely adapters! They allow you to manage the schemas and migrations with Drizzle and query the data with your favorite query builder. See documentation for more details:
- [Knex adapter](https://github.com/drizzle-team/drizzle-knex)
- [Kysely adapter](https://github.com/drizzle-team/drizzle-kysely)
- 🎉 Added "type maps" to all entities. You can access them via the special `_` property. For example:
```ts
const users = mysqlTable('users', {
id: int('id').primaryKey(),
name: text('name').notNull(),
});
type UserFields = typeof users['_']['columns'];
type InsertUser = typeof users['_']['model']['insert'];
```
Full documentation on the type maps is coming soon.
- 🎉 Added `.$type()` method to all column builders to allow overriding the data type. It also replaces the optional generics on columns.
```ts
// Before
const test = mysqlTable('test', {
jsonField: json<Data>('json_field'),
});
// After
const test = mysqlTable('test', {
jsonField: json('json_field').$type<Data>(),
});
```
- ❗ Changed syntax for text-based enum columns:
```ts
// Before
const test = mysqlTable('test', {
role: text<'admin' | 'user'>('role'),
});
// After
const test = mysqlTable('test', {
role: text('role', { enum: ['admin', 'user'] }),
});
```
- 🎉 Allowed passing an array of values into `.insert().values()` directly without spreading:
```ts
const users = mysqlTable('users', {
id: int('id').primaryKey(),
name: text('name').notNull(),
});
await users.insert().values([
{ name: 'John' },
{ name: 'Jane' },
]);
```
The spread syntax is now deprecated and will be removed in one of the next releases.
- 🎉 Added "table creators" to allow for table name customization:
```ts
import { mysqlTableCreator } from 'drizzle-orm/mysql-core';
const mysqlTable = mysqlTableCreator((name) => `myprefix_${name}`);
const users = mysqlTable('users', {
id: int('id').primaryKey(),
name: text('name').notNull(),
});
// Users table is a normal table, but its name is `myprefix_users` in runtime
```
- 🎉 Implemented support for selecting/joining raw SQL expressions:
```ts
// select current_date + s.a as dates from generate_series(0,14,7) as s(a);
const result = await db
.select({
dates: sql`current_date + s.a`,
})
.from(sql`generate_series(0,14,7) as s(a)`);
```
- 🐛 Fixed a lot of bugs from user feedback on GitHub and Discord (thank you! ❤). Fixes #293 #301 #276 #269 #253 #311 #312
================================================
FILE: changelogs/drizzle-orm/0.23.1.md
================================================
- 🐛 Re-export `InferModel` from `drizzle-orm`
================================================
FILE: changelogs/drizzle-orm/0.23.10.md
================================================
- 🐛 Add missing config argument to transactions API
- 🐛 Fix Postgres and MySQL schema declaration (#427)
================================================
FILE: changelogs/drizzle-orm/0.23.11.md
================================================
- 🐛 Fix migrator function for PostgreSQL
> Would suggest to upgrade to this version anyone who is using postgres dialect. `0.23.9` and `0.23.10` are broken for postgresql migrations
================================================
FILE: changelogs/drizzle-orm/0.23.12.md
================================================
- 🐛 Fixed multi-level join results (e.g. joining a subquery with a nested join)
================================================
FILE: changelogs/drizzle-orm/0.23.13.md
================================================
- 🎉 All enum and text enum columns now have a properly typed `enumValues` property
================================================
FILE: changelogs/drizzle-orm/0.23.2.md
================================================
- 🐛 Rolled back some breaking changes for drizzle-kit
================================================
FILE: changelogs/drizzle-orm/0.23.3.md
================================================
- 🎉 Added [libSQL](https://libsql.org/) support
================================================
FILE: changelogs/drizzle-orm/0.23.4.md
================================================
- 🐛 Fixed broken types in Kysely and Knex adapters
================================================
FILE: changelogs/drizzle-orm/0.23.5.md
================================================
- 🐛 Various minor bugfixes
================================================
FILE: changelogs/drizzle-orm/0.23.6.md
================================================
- 🐛 Fixed referencing the selected aliased field in the same query
- 🐛 Fixed decimal column data type in MySQL
- 🐛 Fixed mode autocompletion for integer column in SQLite
- 🐛 Fixed extra parentheses in the generated SQL for the `IN` operator (#382)
- 🐛 Fixed regression in `pgEnum.enumValues` type (#358)
- 🎉 Allowed readonly arrays to be passed to `pgEnum`
================================================
FILE: changelogs/drizzle-orm/0.23.7.md
================================================
- 🎉 Added `INSERT IGNORE` support for MySQL (#305)
================================================
FILE: changelogs/drizzle-orm/0.23.8.md
================================================
- 🎉 Fixed dates timezone differences for timestamps in Postgres and MySQL (contributed by @AppelBoomHD via #288)
================================================
FILE: changelogs/drizzle-orm/0.23.9.md
================================================
# Transactions support 🎉
You can now use transactions with all the supported databases and drivers.
`node-postgres` example:
```ts
await db.transaction(async (tx) => {
await tx.insert(users).values(newUser);
await tx.update(users).set({ name: 'Mr. Dan' }).where(eq(users.name, 'Dan'));
await tx.delete(users).where(eq(users.name, 'Dan'));
});
```
For more information, see transactions docs:
- [PostgreSQL](/drizzle-orm/src/pg-core/README.md#transactions)
- [MySQL](/drizzle-orm/src/mysql-core/README.md#transactions)
- [SQLite](/drizzle-orm/src/sqlite-core/README.md#transactions)
================================================
FILE: changelogs/drizzle-orm/0.24.0.md
================================================
- 🎉 Added iterator support to `mysql2` (sponsored by @rizen ❤)
- ❗ `.prepare()` in MySQL no longer requires a name argument
================================================
FILE: changelogs/drizzle-orm/0.24.1.md
================================================
### Bugs
🐛 Fix onConflict targets in [#475](https://github.com/drizzle-team/drizzle-orm/pull/475) - thanks @wkunert ❤️
### Documentation
> Thanks to @tmcw we have started our way to get JSDoc documentation
📄 JSDoc for conditions in [#467](https://github.com/drizzle-team/drizzle-orm/pull/467) - thanks @tmcw ❤️
================================================
FILE: changelogs/drizzle-orm/0.24.2.md
================================================
- 🐛 Pool connections opened for transactions are now closed after the transaction is committed or rolled back
================================================
FILE: changelogs/drizzle-orm/0.24.3.md
================================================
- 🐛 Fixed query generation when selecting from alias
================================================
FILE: changelogs/drizzle-orm/0.24.4.md
================================================
- 🐛 Added verbose error when .values() is called without values (#441)
- 🐛 Fixed nested PG arrays mapping (#460)
- ❗ Removed spread syntax in .values() (#269)
- 🐛 Fixed passing undefined as field value to insert/update (#375)
================================================
FILE: changelogs/drizzle-orm/0.24.5.md
================================================
- Add possibility to have placeholders in `.limit()` and `.offset()`
```ts
const stmt = db
.select({
id: usersTable.id,
name: usersTable.name,
})
.from(usersTable)
.limit(placeholder('limit'))
.offset(placeholder('offset'))
.prepare('stmt');
const result = await stmt.execute({ limit: 1, offset: 1 });
```
================================================
FILE: changelogs/drizzle-orm/0.25.0.md
================================================
# ESM support
- 🎉 Added ESM support! You can now use `drizzle-orm` in both ESM and CJS environments.
- 🎉 Added code minification and source maps.
- ❗ Removed several nested import paths. Most notably, everything from `drizzle-orm/sql` and `drizzle-orm/expressions` should now be imported from `drizzle-orm` instead.
================================================
FILE: changelogs/drizzle-orm/0.25.1.md
================================================
- 🐛 Fix package.json `exports` field
================================================
FILE: changelogs/drizzle-orm/0.25.2.md
================================================
- 🎉 Documentation improvements (#495, #507)
- 🎉 Added `"sideEffects": false` to package.json (#515)
- 🐛 Fixed AWS Data API driver migrations (#510)
================================================
FILE: changelogs/drizzle-orm/0.25.3.md
================================================
- 🐛 Fix `pg` imports in ESM mode (#505)
- 🐛 Add "types" and "default" fields to "exports" entries in package.json (#511)
================================================
FILE: changelogs/drizzle-orm/0.25.4.md
================================================
- 🎉 Added support for [Vercel Postgres](https://vercel.com/docs/storage/vercel-postgres/quickstart)
```typescript
import { drizzle } from 'drizzle-orm/vercel-postgres';
import { sql } from "@vercel/postgres";
const db = drizzle(sql);
db.select(...)
```
================================================
FILE: changelogs/drizzle-orm/0.26.0.md
================================================
# Drizzle ORM 0.26.0 is here 🎉
## README docs are fully tranferred to web
The documentation has been completely reworked and updated with additional examples and explanations. You can find it here: https://orm.drizzle.team.
Furthermore, the entire documentation has been made open source, allowing you to edit and add any information you deem important for the community.
Visit https://github.com/drizzle-team/drizzle-orm-docs to access the open-sourced documentation.
Additionally, you can create specific documentation issues in this repository
## New Features
Introducing our first helper built on top of Drizzle Core API syntax: **the Relational Queries!** 🎉
With Drizzle RQ you can do:
1. Any amount of relations that will be mapped for you
2. Including or excluding! specific columns. You can also combine these options
3. Harness the flexibility of the `where` statements, allowing you to define custom conditions beyond the predefined ones available in the Drizzle Core API.
4. Expand the functionality by incorporating additional extras columns using SQL templates. For more examples, refer to the documentation.
Most importantly, regardless of the size of your query, Drizzle will always generate a **SINGLE optimized query**.
This efficiency extends to the usage of **Prepared Statements**, which are fully supported within the Relational Query Builder.
For more info: [Prepared Statements in Relational Query Builder](https://orm.drizzle.team/rqb#prepared-statements)
**Example of setting one-to-many relations**
> As you can observe, `relations` are a distinct concept that coexists alongside the main Drizzle schema. You have the flexibility to opt-in or opt-out of them at any time without affecting the `drizzle-kit` migrations or the logic for Core API's types and runtime.
```ts
import { integer, serial, text, pgTable } from 'drizzle-orm/pg-core';
import { relations } from 'drizzle-orm';
export const users = pgTable('users', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
});
export const usersConfig = relations(users, ({ many }) => ({
posts: many(posts),
}));
export const posts = pgTable('posts', {
id: serial('id').primaryKey(),
content: text('content').notNull(),
authorId: integer('author_id').notNull(),
});
export const postsConfig = relations(posts, ({ one }) => ({
author: one(users, { fields: [posts.authorId], references: [users.id] }),
}));
```
**Example of querying you database**
Step 1: Provide all tables and relations to `drizzle` function
> `drizzle` import depends on the database driver you're using
```ts
import * as schema from './schema';
import { drizzle } from 'drizzle-orm/...';
const db = drizzle(client, { schema });
await db.query.users.findMany(...);
```
If you have schema in multiple files
```ts
import * as schema1 from './schema1';
import * as schema2 from './schema2';
import { drizzle } from 'drizzle-orm/...';
const db = drizzle(client, { schema: { ...schema1, ...schema2 } });
await db.query.users.findMany(...);
```
Step 2: Query your database with Relational Query Builder
**Select all users**
```ts
const users = await db.query.users.findMany();
```
**Select first users**
> `.findFirst()` will add limit 1 to the query
```ts
const user = await db.query.users.findFirst();
```
**Select all users**
Get all posts with just `id`, `content` and include `comments`
```ts
const posts = await db.query.posts.findMany({
columns: {
id: true,
content: true,
},
with: {
comments: true,
}
});
```
**Select all posts excluding `content` column**
```ts
const posts = await db.query.posts.findMany({
columns: {
content: false,
},
});
```
For more examples you can check [full docs](https://orm.drizzle.team/rqb) for Relational Queries
## Bug fixes
- 🐛 Fixed partial joins with prefixed tables (#542)
## Drizzle Kit updates
### New ways to define drizzle config file
You can now specify the configuration not only in the `.json` format but also in `.ts` and `.js` formats.
</br>
**TypeScript example**
```ts
import { Config } from "drizzle-kit";
export default {
schema: "",
connectionString: process.env.DB_URL,
out: "",
breakpoints: true
} satisfies Config;
```
**JavaScript example**
```js
/** @type { import("drizzle-kit").Config } */
export default {
schema: "",
connectionString: "",
out: "",
breakpoints: true
};
```
## New commands 🎉
### `drizzle-kit push:mysql`
You can now push your MySQL schema directly to the database without the need to create and manage migration files. This feature proves to be particularly useful for rapid local development and when working with PlanetScale databases.
By pushing the MySQL schema directly to the database, you can streamline the development process and avoid the overhead of managing migration files. This allows for more efficient iteration and quick deployment of schema changes during local development.
### How to setup your codebase for drizzle-kit push feature?
1. For this feature, you need to create a `drizzle.config.[ts|js|json]` file. We recommend using `.ts` or `.js` files as they allow you to easily provide the database connection information as secret variables
You'll need to specify `schema` and `connectionString`(or `db`, `port`, `host`, `password`, etc.) to make `drizzle-kit push:mysql` work
`drizzle.config.ts` example
```ts copy
import { Config } from "src";
export default {
schema: "./schema.ts",
connectionString: process.env.DB_URL,
} satisfies Config;
```
2. Run `drizzle-kit push:mysql`
3. If Drizzle detects any potential `data-loss` issues during a migration, it will prompt you to approve whether the data should be truncated or not in order to ensure a successful migration
4. Approve or reject the action that Drizzle needs to perform in order to push your schema changes to the database.
5. Done ✅
================================================
FILE: changelogs/drizzle-orm/0.26.1.md
================================================
- 🐛 Fixed including multiple relations on the same level in RQB (#599)
- 🐛 Updated migrators for relational queries support (#601)
- 🐛 Fixed invoking .findMany() without arguments
================================================
FILE: changelogs/drizzle-orm/0.26.2.md
================================================
- 🐛 Fixed upsert targeting composite keys for SQLite (#521)
- 🐛 AWS Data API+Postgres: fixed adding of typings when merging queries (#517)
- 🐛 Fixed "on conflict" with "where" clause for Postgres (#651)
- 🐛 Various GitHub docs community fixes and improvements ♥ (#547, #548, #587, #606, #609, #625)
- **Experimental**: added OpenTelemetry support for Postgres
================================================
FILE: changelogs/drizzle-orm/0.26.3.md
================================================
- Disabled OTEL integration due to the top-level await issues
================================================
FILE: changelogs/drizzle-orm/0.26.4.md
================================================
- 🐛 Fixed AWS Data API mapping in relational queries (#677, #681)
- 🐛 Allowed using named self-relations (#678)
- 🐛 Fixed querying relations with composite FKs (#683)
================================================
FILE: changelogs/drizzle-orm/0.26.5.md
================================================
- 🎉 Added bigint mode to SQLite (#558)
================================================
FILE: changelogs/drizzle-orm/0.27.0.md
================================================
## Correct behavior when installed in a monorepo (multiple Drizzle instances)
Replacing all `instanceof` statements with a custom `is()` function allowed us to handle multiple Drizzle packages interacting properly.
**It also fixes one of our biggest Discord tickets: `maximum call stack exceeded` 🎉**
You should now use `is()` instead of `instanceof` to check if specific objects are instances of specific Drizzle types. It might be useful if you are building something on top of the Drizzle API.
```ts
import { is, Column } from 'drizzle-orm'
if (is(value, Column)) {
// value's type is narrowed to Column
}
```
## `distinct` clause support
```ts
await db.selectDistinct().from(usersDistinctTable).orderBy(
usersDistinctTable.id,
usersDistinctTable.name,
);
```
Also, `distinct on` clause is available for PostgreSQL:
```ts
await db.selectDistinctOn([usersDistinctTable.id]).from(usersDistinctTable).orderBy(
usersDistinctTable.id,
);
await db.selectDistinctOn([usersDistinctTable.name], { name: usersDistinctTable.name }).from(
usersDistinctTable,
).orderBy(usersDistinctTable.name);
```
## `bigint` and `boolean` support for SQLite
Contributed by @MrRahulRamkumar (#558), @raducristianpopa (#411) and @meech-ward (#725)
```ts
const users = sqliteTable('users', {
bigintCol: blob('bigint', { mode: 'bigint' }).notNull(),
boolCol: integer('bool', { mode: 'boolean' }).notNull(),
});
```
## DX improvements
- Added verbose type error when relational queries are used on a database type without a schema generic
- Fix `where` callback in RQB for tables without relations
## Various docs improvements
- Fix joins docs typo (#522) by @arjunyel
- Add Supabase guide to readme (#690) by @saltcod
- Make the column type in sqlite clearer (#717) by @shairez
================================================
FILE: changelogs/drizzle-orm/0.27.1.md
================================================
- 🎉 Added support for [Neon HTTP driver](https://neon.tech/docs/serverless/serverless-driver)
```typescript
import { neon, neonConfig } from '@neondatabase/serverless';
import { drizzle } from 'drizzle-orm/neon-http';
neonConfig.fetchConnectionCache = true;
const sql = neon(process.env.DRIZZLE_DATABASE_URL!);
const db = drizzle(sql);
db.select(...)
```
================================================
FILE: changelogs/drizzle-orm/0.27.2.md
================================================
## 🎉 Added support for `UNIQUE` constraints in PostgreSQL, MySQL, SQLite
For PostgreSQL, unique constraints can be defined at the column level for single-column constraints, and in the third parameter for multi-column constraints. In both cases, it will be possible to define a custom name for the constraint. Additionally, PostgreSQL will receive the `NULLS NOT DISTINCT` option to restrict having more than one NULL value in a table. [Reference](https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-UNIQUE-CONSTRAINTS)
Examples that just shows a different `unique` usage. Please don't search a real usage for those tables
```ts
// single column
const table = pgTable('table', {
id: serial('id').primaryKey(),
name: text('name').notNull().unique(),
state: char('state', { length: 2 }).unique('custom'),
field: char('field', { length: 2 }).unique('custom_field', { nulls: 'not distinct' }),
});
// multiple columns
const table = pgTable('table', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
state: char('state', { length: 2 }),
}, (t) => ({
first: unique('custom_name').on(t.name, t.state).nullsNotDistinct(),
second: unique('custom_name1').on(t.name, t.state),
}));
```
For MySQL, everything will be the same except for the `NULLS NOT DISTINCT` option. It appears that MySQL does not support it
Examples that just shows a different `unique` usage. Please don't search a real usage for those tables
```ts
// single column
const table = mysqlTable('table', {
id: serial('id').primaryKey(),
name: text('name').notNull().unique(),
state: text('state').unique('custom'),
field: text('field').unique('custom_field'),
});
// multiple columns
const table = mysqlTable('cities1', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
state: text('state'),
}, (t) => ({
first: unique().on(t.name, t.state),
second: unique('custom_name1').on(t.name, t.state),
}));
```
In SQLite unique constraints are the same as unique indexes. As long as you can specify a name for the unique index in SQLite - we will treat all unique constraints as unique indexes in internal implementation
```ts
// single column
const table = sqliteTable('table', {
id: int('id').primaryKey(),
name: text('name').notNull().unique(),
state: text('state').unique('custom'),
field: text('field').unique(),
});
// multiple columns
const table = sqliteTable('table', {
id: int('id').primaryKey(),
name: text('name').notNull(),
state: text('state'),
}, (t) => ({
first: unique().on(t.name, t.state),
second: unique('custom').on(t.name, t.state),
}));
```
================================================
FILE: changelogs/drizzle-orm/0.28.0.md
================================================
## Breaking changes
### Removed support for filtering by nested relations
Current example won't work in `0.28.0`:
```ts
const usersWithPosts = await db.query.users.findMany({
where: (table, { sql }) => (sql`json_array_length(${table.posts}) > 0`),
with: {
posts: true,
},
});
```
The `table` object in the `where` callback won't have fields from `with` and `extras`. We removed them to be able to build more efficient relational queries, which improved row reads and performance.
If you have used those fields in the `where` callback before, there are several workarounds:
1. Applying those filters manually on the code level after the rows are fetched;
2. Using the core API.
### Added Relational Queries `mode` config for `mysql2` driver
Drizzle relational queries always generate exactly one SQL statement to run on the database and it has certain caveats. To have best in class support for every database out there we've introduced modes.
Drizzle relational queries use lateral joins of subqueries under the hood and for now PlanetScale does not support them.
When using `mysql2` driver with regular MySQL database - you should specify mode: "default".
When using `mysql2` driver with PlanetScale - you need to specify mode: "planetscale".
```ts
import { drizzle } from 'drizzle-orm/mysql2';
import mysql from 'mysql2/promise';
import * as schema from './schema';
const connection = await mysql.createConnection({
uri: process.env.PLANETSCALE_DATABASE_URL,
});
const db = drizzle(connection, { schema, mode: 'planetscale' });
```
## Improved IntelliSense performance for large schemas
We've run the diagnostics on a database schema with 85 tables, 666 columns, 26 enums, 172 indexes and 133 foreign keys. We've optimized internal types which resulted in **430%** speed up in IntelliSense.
## Improved Relational Queries Permormance and Read Usage
In this release we've fully changed a way query is generated for Relational Queri API.
As a summary we've made current set of changes in query generation startegy:
1. Lateral Joins: In the new version we're utilizing lateral joins, denoted by the "LEFT JOIN LATERAL" clauses, to retrieve specific data from related tables efficiently For MySQL in PlanetScale and SQLite, we've used simple subquery selects, which improved a query plan and overall performance
2. Selective Data Retrieval: In the new version we're retrieving only the necessary data from tables. This targeted data retrieval reduces the amount of unnecessary information fetched, resulting in a smaller dataset to process and faster execution.
3. Reduced Aggregations: In the new version we've reduced the number of aggregation functions (e.g., COUNT, json_agg). By using json_build_array directly within the lateral joins, drizzle is aggregating the data in a more streamlined manner, leading to improved query performance.
4. Simplified Grouping: In the new version the GROUP BY clause is removed, as the lateral joins and subqueries already handle data aggregation more efficiently.
For this drizzle query
```ts
const items = await db.query.comments.findMany({
limit,
orderBy: comments.id,
with: {
user: {
columns: { name: true },
},
post: {
columns: { title: true },
with: {
user: {
columns: { name: true },
},
},
},
},
});
```
Query that Drizzle generates now
```sql
select "comments"."id",
"comments"."user_id",
"comments"."post_id",
"comments"."content",
"comments_user"."data" as "user",
"comments_post"."data" as "post"
from "comments"
left join lateral (select json_build_array("comments_user"."name") as "data"
from (select *
from "users" "comments_user"
where "comments_user"."id" = "comments"."user_id"
limit 1) "comments_user") "comments_user" on true
left join lateral (select json_build_array("comments_post"."title", "comments_post_user"."data") as "data"
from (select *
from "posts" "comments_post"
where "comments_post"."id" = "comments"."post_id"
limit 1) "comments_post"
left join lateral (select json_build_array("comments_post_user"."name") as "data"
from (select *
from "users" "comments_post_user"
where "comments_post_user"."id" = "comments_post"."user_id"
limit 1) "comments_post_user") "comments_post_user"
on true) "comments_post" on true
order by "comments"."id"
limit 1
```
Query generated before:
```sql
SELECT "id",
"user_id",
"post_id",
"content",
"user"::JSON,
"post"::JSON
FROM
(SELECT "comments".*,
CASE
WHEN count("comments_post"."id") = 0 THEN '[]'
ELSE json_agg(json_build_array("comments_post"."title", "comments_post"."user"::JSON))::text
END AS "post"
FROM
(SELECT "comments".*,
CASE
WHEN count("comments_user"."id") = 0 THEN '[]'
ELSE json_agg(json_build_array("comments_user"."name"))::text
END AS "user"
FROM "comments"
LEFT JOIN
(SELECT "comments_user".*
FROM "users" "comments_user") "comments_user" ON "comments"."user_id" = "comments_user"."id"
GROUP BY "comments"."id",
"comments"."user_id",
"comments"."post_id",
"comments"."content") "comments"
LEFT JOIN
(SELECT "comments_post".*
FROM
(SELECT "comments_post".*,
CASE
WHEN count("comments_post_user"."id") = 0 THEN '[]'
ELSE json_agg(json_build_array("comments_post_user"."name"))
END AS "user"
FROM "posts" "comments_post"
LEFT JOIN
(SELECT "comments_post_user".*
FROM "users" "comments_post_user") "comments_post_user" ON "comments_post"."user_id" = "comments_post_user"."id"
GROUP BY "comments_post"."id") "comments_post") "comments_post" ON "comments"."post_id" = "comments_post"."id"
GROUP BY "comments"."id",
"comments"."user_id",
"comments"."post_id",
"comments"."content",
"comments"."user") "comments"
LIMIT 1
```
## Possibility to insert rows with default values for all columns
You can now provide an empty object or an array of empty objects, and Drizzle will insert all defaults into the database.
```ts
// Insert 1 row with all defaults
await db.insert(usersTable).values({});
// Insert 2 rows with all defaults
await db.insert(usersTable).values([{}, {}]);
```
================================================
FILE: changelogs/drizzle-orm/0.28.1.md
================================================
- 🐛 Fixed Postgres array-related issues introduced by 0.28.0 (#983, #992)
================================================
FILE: changelogs/drizzle-orm/0.28.2.md
================================================
## The community contributions release 🎉
### Internal Features and Changes
1. Added a set of tests for d1. Thanks to @AdiRishi!
2. Fixed issues in internal documentation. Thanks to @balazsorban44 and @pyk!
### Bug Fixes
1. Resolved the issue of truncating timestamp milliseconds for MySQL. Thanks to @steviec!
2. Corrected the type of the get() method for sqlite-based dialects. Issue #565 has been closed. Thanks to @stefanmaric!
3. Rectified the sqlite-proxy bug that caused the query to execute twice. Thanks to @mosch!
### New packages 🎉
Added a support for [Typebox](https://github.com/sinclairzx81/typebox) in [drizzle-typebox](https://orm.drizzle.team/docs/typebox) package. Thanks to @Bulbang!
Please check documentation page for more usage examples: https://orm.drizzle.team/docs/typebox
================================================
FILE: changelogs/drizzle-orm/0.28.3.md
================================================
- 🎉 Added SQLite simplified query API
- 🎉 Added `.$defaultFn()` / `.$default()` methods to column builders
You can specify any logic and any implementation for a function like `cuid()` for runtime defaults. Drizzle won't limit you in the number of implementations you can add.
> Note: This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`
```ts
import { varchar, mysqlTable } from "drizzle-orm/mysql-core";
import { createId } from '@paralleldrive/cuid2';
const table = mysqlTable('table', {
id: varchar('id', { length: 128 }).$defaultFn(() => createId()),
});
```
- 🎉 Added `table.$inferSelect` / `table._.inferSelect` and `table.$inferInsert` / `table._.inferInsert` for more convenient table model type inference
- 🛠 Deprecated `InferModel` type in favor of more explicit `InferSelectModel` and `InferInsertModel`
```ts
import { InferSelectModel, InferInsertModel } from 'drizzle-orm'
const usersTable = pgTable('users', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
verified: boolean('verified').notNull().default(false),
jsonb: jsonb('jsonb').$type<string[]>(),
createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
});
type SelectUser = typeof usersTable.$inferSelect;
type InsertUser = typeof usersTable.$inferInsert;
type SelectUser2 = InferSelectModel<typeof usersTable>;
type InsertUser2 = InferInsertModel<typeof usersTable>;
```
- 🛠 Disabled `.d.ts` files bundling
- 🐛 Fixed sqlite-proxy and SQL.js response from `.get()` when the result is empty
================================================
FILE: changelogs/drizzle-orm/0.28.4.md
================================================
- 🐛 Fixed imports in ESM-based projects (#1088)
- 🐛 Fixed type error on Postgres table definitions (#1089)
================================================
FILE: changelogs/drizzle-orm/0.28.5.md
================================================
- 🐛 Fixed incorrect OpenTelemetry type import that caused a runtime error
================================================
FILE: changelogs/drizzle-orm/0.28.6.md
================================================
## Changes
> **Note**:
> MySQL `datetime` with `mode: 'date'` will now store dates in UTC strings and retrieve data in UTC as well to align with MySQL behavior for `datetime`. If you need a different behavior and want to handle `datetime` mapping in a different way, please use `mode: 'string'` or [Custom Types](https://orm.drizzle.team/docs/custom-types) implementation
Check [Fix Datetime mapping for MySQL](https://github.com/drizzle-team/drizzle-orm/pull/1082) for implementation details
## New Features
### 🎉 `LibSQL` batch api support
Reference: https://docs.turso.tech/reference/client-access/javascript-typescript-sdk#execute-a-batch-of-statements
Batch API usage example:
```ts
const batchResponse = await db.batch([
db.insert(usersTable).values({ id: 1, name: 'John' }).returning({
id: usersTable.id,
}),
db.update(usersTable).set({ name: 'Dan' }).where(eq(usersTable.id, 1)),
db.query.usersTable.findMany({}),
db.select().from(usersTable).where(eq(usersTable.id, 1)),
db.select({ id: usersTable.id, invitedBy: usersTable.invitedBy }).from(
usersTable,
),
]);
```
Type for `batchResponse` in this example would be:
```ts
type BatchResponse = [
{
id: number;
}[],
ResultSet,
{
id: number;
name: string;
verified: number;
invitedBy: number | null;
}[],
{
id: number;
name: string;
verified: number;
invitedBy: number | null;
}[],
{
id: number;
invitedBy: number | null;
}[],
];
```
All possible builders that can be used inside `db.batch`:
```ts
`db.all()`,
`db.get()`,
`db.values()`,
`db.run()`,
`db.query.<table>.findMany()`,
`db.query.<table>.findFirst()`,
`db.select()...`,
`db.update()...`,
`db.delete()...`,
`db.insert()...`,
```
More usage examples here: [integration-tests/tests/libsql-batch.test.ts](https://github.com/drizzle-team/drizzle-orm/pull/1161/files#diff-17253895532e520545027dd48dcdbac2d69a5a49d594974e6d55d7502f89b838R248) and in [docs](https://orm.drizzle.team/docs/batch-api)
### 🎉 Add json mode for text in SQLite
Example
```ts
const test = sqliteTable('test', {
dataTyped: text('data_typed', { mode: 'json' }).$type<{ a: 1 }>().notNull(),
});
```
### 🎉 Add `.toSQL()` to Relational Query API calls
Example
```ts
const query = db.query.usersTable.findFirst().toSQL();
```
### 🎉 Added new PostgreSQL operators for Arrays - thanks @L-Mario564
List of operators and usage examples
`arrayContains`, `arrayContained`, `arrayOverlaps`
```ts
const contains = await db.select({ id: posts.id }).from(posts)
.where(arrayContains(posts.tags, ['Typescript', 'ORM']));
const contained = await db.select({ id: posts.id }).from(posts)
.where(arrayContained(posts.tags, ['Typescript', 'ORM']));
const overlaps = await db.select({ id: posts.id }).from(posts)
.where(arrayOverlaps(posts.tags, ['Typescript', 'ORM']));
const withSubQuery = await db.select({ id: posts.id }).from(posts)
.where(arrayContains(
posts.tags,
db.select({ tags: posts.tags }).from(posts).where(eq(posts.id, 1)),
));
```
### 🎉 Add more SQL operators for where filter function in Relational Queries - thanks @cayter!
**Before**
```ts
import { inArray } from "drizzle-orm/pg-core";
await db.users.findFirst({
where: (table, _) => inArray(table.id, [ ... ])
})
```
**After**
```ts
await db.users.findFirst({
where: (table, { inArray }) => inArray(table.id, [ ... ])
})
```
## Bug Fixes
- 🐛 [Correct where in on conflict in sqlite](https://github.com/drizzle-team/drizzle-orm/pull/1076) - Thanks @hanssonduck!
- 🐛 [Fix libsql/client type import](https://github.com/drizzle-team/drizzle-orm/pull/1122) - Thanks @luisfvieirasilva!
- 🐛 [Fix: raw sql query not being mapped properly on RDS](https://github.com/drizzle-team/drizzle-orm/pull/1071) - Thanks @boian-ivanov
- 🐛 [Fix Datetime mapping for MySQL](https://github.com/drizzle-team/drizzle-orm/pull/1082) - thanks @Angelelz
- 🐛 [Fix smallserial generating as serial](https://github.com/drizzle-team/drizzle-orm/pull/1127) - thanks @L-Mario564
================================================
FILE: changelogs/drizzle-orm/0.29.0.md
================================================
> Drizzle ORM version `0.29.0` will require a minimum Drizzle Kit version of `0.20.0`, and vice versa. Therefore, when upgrading to a newer version of Drizzle ORM, you will also need to upgrade Drizzle Kit. This may result in some breaking changes throughout the versions, especially if you need to upgrade Drizzle Kit and your Drizzle ORM version is older than `<0.28.0`
## New Features
### 🎉 MySQL `unsigned` option for bigint
You can now specify `bigint unsigned` type
```ts
const table = mysqlTable('table', {
id: bigint('id', { mode: 'number', unsigned: true }),
});
```
Read more in [docs](https://orm.drizzle.team/docs/column-types/mysql#bigint)
### 🎉 Improved query builder types
Starting from `0.29.0` by default, as all the query builders in Drizzle try to conform to SQL as much as possible, you can only invoke most of the methods once. For example, in a SELECT statement there might only be one WHERE clause, so you can only invoke .where() once:
```ts
const query = db
.select()
.from(users)
.where(eq(users.id, 1))
.where(eq(users.name, 'John')); // ❌ Type error - where() can only be invoked once
```
This behavior is useful for conventional query building, i.e. when you create the whole query at once. However, it becomes a problem when you want to build a query dynamically, i.e. if you have a shared function that takes a query builder and enhances it. To solve this problem, Drizzle provides a special 'dynamic' mode for query builders, which removes the restriction of invoking methods only once. To enable it, you need to call .$dynamic() on a query builder.
Let's see how it works by implementing a simple withPagination function that adds LIMIT and OFFSET clauses to a query based on the provided page number and an optional page size:
```ts
function withPagination<T extends PgSelect>(
qb: T,
page: number,
pageSize: number = 10,
) {
return qb.limit(pageSize).offset(page * pageSize);
}
const query = db.select().from(users).where(eq(users.id, 1));
withPagination(query, 1); // ❌ Type error - the query builder is not in dynamic mode
const dynamicQuery = query.$dynamic();
withPagination(dynamicQuery, 1); // ✅ OK
```
Note that the withPagination function is generic, which allows you to modify the result type of the query builder inside it, for example by adding a join:
```ts
function withFriends<T extends PgSelect>(qb: T) {
return qb.leftJoin(friends, eq(friends.userId, users.id));
}
let query = db.select().from(users).where(eq(users.id, 1)).$dynamic();
query = withFriends(query);
```
Read more in [docs](https://orm.drizzle.team/docs/dynamic-query-building)
### 🎉 Possibility to specify name for primary keys and foreign keys
There is an issue when constraint names exceed the 64-character limit of the database. This causes the database engine to truncate the name, potentially leading to issues. Starting from `0.29.0`, you have the option to specify custom names for both `primaryKey()` and `foreignKey()`. We have also deprecated the old `primaryKey()` syntax, which can still be used but will be removed in future releases
```ts
const table = pgTable('table', {
id: integer('id'),
name: text('name'),
}, (table) => ({
cpk: primaryKey({ name: 'composite_key', columns: [table.id, table.name] }),
cfk: foreignKey({
name: 'fkName',
columns: [table.id],
foreignColumns: [table.name],
}),
}));
```
Read more in [docs](https://orm.drizzle.team/docs/indexes-constraints#composite-primary-key)
### 🎉 Read Replicas Support
You can now use the Drizzle `withReplica` function to specify different database connections for read replicas and the main instance for write operations. By default, `withReplicas` will use a random read replica for read operations and the main instance for all other data modification operations. You can also specify custom logic for choosing which read replica connection to use. You have the freedom to make any weighted, custom decision for that. Here are some usage examples:
```ts
const primaryDb = drizzle(client);
const read1 = drizzle(client);
const read2 = drizzle(client);
const db = withReplicas(primaryDb, [read1, read2]);
// read from primary
db.$primary.select().from(usersTable);
// read from either read1 connection or read2 connection
db.select().from(usersTable)
// use primary database for delete operation
db.delete(usersTable).where(eq(usersTable.id, 1))
```
Implementation example of custom logic for selecting read replicas, where the first replica has a 70% chance of being chosen, and the second replica has a 30% chance of being chosen. Note that you can implement any type of random selection for read replicas
```ts
const db = withReplicas(primaryDb, [read1, read2], (replicas) => {
const weight = [0.7, 0.3];
let cumulativeProbability = 0;
const rand = Math.random();
for (const [i, replica] of replicas.entries()) {
cumulativeProbability += weight[i]!;
if (rand < cumulativeProbability) return replica;
}
return replicas[0]!
});
```
`withReplicas` function is available for all dialects in Drizzle ORM
Read more in [docs](https://orm.drizzle.team/docs/read-replicas)
### 🎉 Set operators support (UNION, UNION ALL, INTERSECT, INTERSECT ALL, EXCEPT, EXCEPT ALL)
Huge thanks to @Angelelz for the significant contribution he made, from API discussions to proper type checks and runtime logic, along with an extensive set of tests. This greatly assisted us in delivering this feature in this release
Usage examples:
All set operators can be used in a two ways: `import approach` or `builder approach`
##### Import approach
```ts
import { union } from 'drizzle-orm/pg-core'
const allUsersQuery = db.select().from(users);
const allCustomersQuery = db.select().from(customers);
const result = await union(allUsersQuery, allCustomersQuery)
```
##### Builder approach
```ts
const result = await db.select().from(users).union(db.select().from(customers));
```
Read more in [docs](https://orm.drizzle.team/docs/set-operations)
### 🎉 New MySQL Proxy Driver
A new driver has been released, allowing you to create your own implementation for an HTTP driver using a MySQL database. You can find usage examples in the `./examples/mysql-proxy` folder
You need to implement two endpoints on your server that will be used for queries and migrations(Migrate endpoint is optional and only if you want to use drizzle migrations). Both the server and driver implementation are up to you, so you are not restricted in any way. You can add custom mappings, logging, and much more
You can find both server and driver implementation examples in the `./examples/mysql-proxy` folder
```ts
// Driver
import axios from 'axios';
import { eq } from 'drizzle-orm/expressions';
import { drizzle } from 'drizzle-orm/mysql-proxy';
import { migrate } from 'drizzle-orm/mysql-proxy/migrator';
import { cities, users } from './schema';
async function main() {
const db = drizzle(async (sql, params, method) => {
try {
const rows = await axios.post(`${process.env.REMOTE_DRIVER}/query`, {
sql,
params,
method,
});
return { rows: rows.data };
} catch (e: any) {
console.error('Error from pg proxy server:', e.response.data);
return { rows: [] };
}
});
await migrate(db, async (queries) => {
try {
await axios.post(`${process.env.REMOTE_DRIVER}/migrate`, { queries });
} catch (e) {
console.log(e);
throw new Error('Proxy server cannot run migrations');
}
}, { migrationsFolder: 'drizzle' });
await db.insert(cities).values({ id: 1, name: 'name' });
await db.insert(users).values({
id: 1,
name: 'name',
email: 'email',
cityId: 1,
});
const usersToCityResponse = await db.select().from(users).leftJoin(
cities,
eq(users.cityId, cities.id),
);
}
```
### 🎉 New PostgreSQL Proxy Driver
Same as MySQL you can now implement your own http driver for PostgreSQL database. You can find usage examples in the `./examples/pg-proxy` folder
You need to implement two endpoints on your server that will be used for queries and migrations (Migrate endpoint is optional and only if you want to use drizzle migrations). Both the server and driver implementation are up to you, so you are not restricted in any way. You can add custom mappings, logging, and much more
You can find both server and driver implementation examples in the `./examples/pg-proxy` folder
```ts
import axios from 'axios';
import { eq } from 'drizzle-orm/expressions';
import { drizzle } from 'drizzle-orm/pg-proxy';
import { migrate } from 'drizzle-orm/pg-proxy/migrator';
import { cities, users } from './schema';
async function main() {
const db = drizzle(async (sql, params, method) => {
try {
const rows = await axios.post(`${process.env.REMOTE_DRIVER}/query`, { sql, params, method });
return { rows: rows.data };
} catch (e: any) {
console.error('Error from pg proxy server:', e.response.data);
return { rows: [] };
}
});
await migrate(db, async (queries) => {
try {
await axios.post(`${process.env.REMOTE_DRIVER}/query`, { queries });
} catch (e) {
console.log(e);
throw new Error('Proxy server cannot run migrations');
}
}, { migrationsFolder: 'drizzle' });
const insertedCity = await db.insert(cities).values({ id: 1, name: 'name' }).returning();
const insertedUser = await db.insert(users).values({ id: 1, name: 'name', email: 'email', cityId: 1 });
const usersToCityResponse = await db.select().from(users).leftJoin(cities, eq(users.cityId, cities.id));
}
```
### 🎉 `D1` Batch API support
Reference: https://developers.cloudflare.com/d1/platform/client-api/#dbbatch
Batch API usage example:
```ts
const batchResponse = await db.batch([
db.insert(usersTable).values({ id: 1, name: 'John' }).returning({
id: usersTable.id,
}),
db.update(usersTable).set({ name: 'Dan' }).where(eq(usersTable.id, 1)),
db.query.usersTable.findMany({}),
db.select().from(usersTable).where(eq(usersTable.id, 1)),
db.select({ id: usersTable.id, invitedBy: usersTable.invitedBy }).from(
usersTable,
),
]);
```
Type for `batchResponse` in this example would be:
```ts
type BatchResponse = [
{
id: number;
}[],
D1Result,
{
id: number;
name: string;
verified: number;
invitedBy: number | null;
}[],
{
id: number;
name: string;
verified: number;
invitedBy: number | null;
}[],
{
id: number;
invitedBy: number | null;
}[],
];
```
All possible builders that can be used inside `db.batch`:
```ts
`db.all()`,
`db.get()`,
`db.values()`,
`db.run()`,
`db.query.<table>.findMany()`,
`db.query.<table>.findFirst()`,
`db.select()...`,
`db.update()...`,
`db.delete()...`,
`db.insert()...`,
```
More usage examples here: [integration-tests/tests/d1-batch.test.ts](https://github.com/drizzle-team/drizzle-orm/blob/beta/integration-tests/tests/d1-batch.test.ts) and in [docs](https://orm.drizzle.team/docs/batch-api)
---
## Drizzle Kit 0.20.0
1. New way to define drizzle.config using `defineConfig` function
2. Possibility to access Cloudflare D1 with Drizzle Studio using wrangler.toml file
3. Drizzle Studio is migrating to https://local.drizzle.studio/
4. `bigint unsigned` support
5. `primaryKeys` and `foreignKeys` now can have custom names
6. Environment variables are now automatically fetched
7. Some bug fixes and improvements
You can read more about drizzle-kit updates [here](https://github.com/drizzle-team/drizzle-kit-mirror/releases/tag/v0.20.0)
================================================
FILE: changelogs/drizzle-orm/0.29.1.md
================================================
# Fixes
- Forward args correctly when using withReplica feature #1536. Thanks @Angelelz
- Fix selectDistinctOn not working with multiple columns #1466. Thanks @L-Mario564
# New Features/Helpers
## 🎉 Detailed JSDoc for all query builders in all dialects - thanks @realmikesolo
You can now access more information, hints, documentation links, etc. while developing and using JSDoc right in your IDE. Previously, we had them only for filter expressions, but now you can see them for all parts of the Drizzle query builder
## 🎉 New helpers for aggregate functions in SQL - thanks @L-Mario564
> Remember, aggregation functions are often used with the GROUP BY clause of the SELECT statement. So if you are selecting using aggregating functions and other columns in one query,
be sure to use the `.groupBy` clause
Here is a list of functions and equivalent using `sql` template
**count**
```ts
await db.select({ value: count() }).from(users);
await db.select({ value: count(users.id) }).from(users);
// It's equivalent to writing
await db.select({
value: sql`count('*'))`.mapWith(Number)
}).from(users);
await db.select({
value: sql`count(${users.id})`.mapWith(Number)
}).from(users);
```
**countDistinct**
```ts
await db.select({ value: countDistinct(users.id) }).from(users);
// It's equivalent to writing
await db.select({
value: sql`count(${users.id})`.mapWith(Number)
}).from(users);
```
**avg**
```ts
await db.select({ value: avg(users.id) }).from(users);
// It's equivalent to writing
await db.select({
value: sql`avg(${users.id})`.mapWith(String)
}).from(users);
```
**avgDistinct**
```ts
await db.select({ value: avgDistinct(users.id) }).from(users);
// It's equivalent to writing
await db.select({
value: sql`avg(distinct ${users.id})`.mapWith(String)
}).from(users);
```
**sum**
```ts
await db.select({ value: sum(users.id) }).from(users);
// It's equivalent to writing
await db.select({
value: sql`sum(${users.id})`.mapWith(String)
}).from(users);
```
**sumDistinct**
```ts
await db.select({ value: sumDistinct(users.id) }).from(users);
// It's equivalent to writing
await db.select({
value: sql`sum(distinct ${users.id})`.mapWith(String)
}).from(users);
```
**max**
```ts
await db.select({ value: max(users.id) }).from(users);
// It's equivalent to writing
await db.select({
value: sql`max(${expression})`.mapWith(users.id)
}).from(users);
```
**min**
```ts
await db.select({ value: min(users.id) }).from(users);
// It's equivalent to writing
await db.select({
value: sql`min(${users.id})`.mapWith(users.id)
}).from(users);
```
# New Packages
## 🎉 ESLint Drizzle Plugin
For cases where it's impossible to perform type checks for specific scenarios, or where it's possible but error messages would be challenging to understand, we've decided to create an ESLint package with recommended rules. This package aims to assist developers in handling crucial scenarios during development
> Big thanks to @Angelelz for initiating the development of this package and transferring it to the Drizzle Team's npm
## Install
```sh
[ npm | yarn | pnpm | bun ] install eslint eslint-plugin-drizzle
```
You can install those packages for typescript support in your IDE
```sh
[ npm | yarn | pnpm | bun ] install @typescript-eslint/eslint-plugin @typescript-eslint/parser
```
## Usage
Create a `.eslintrc.yml` file, add `drizzle` to the `plugins`, and specify the rules you want to use. You can find a list of all existing rules below
```yml
root: true
parser: '@typescript-eslint/parser'
parserOptions:
project: './tsconfig.json'
plugins:
- drizzle
rules:
'drizzle/enforce-delete-with-where': "error"
'drizzle/enforce-update-with-where': "error"
```
### All config
This plugin exports an [`all` config](src/configs/all.js) that makes use of all rules (except for deprecated ones).
```yml
root: true
extends:
- "plugin:drizzle/all"
parser: '@typescript-eslint/parser'
parserOptions:
project: './tsconfig.json'
plugins:
- drizzle
```
At the moment, `all` is equivalent to `recommended`
```yml
root: true
extends:
- "plugin:drizzle/recommended"
parser: '@typescript-eslint/parser'
parserOptions:
project: './tsconfig.json'
plugins:
- drizzle
```
## Rules
**enforce-delete-with-where**: Enforce using `delete` with the`.where()` clause in the `.delete()` statement. Most of the time, you don't need to delete all rows in the table and require some kind of `WHERE` statements.
**Error Message**:
```
Without `.where(...)` you will delete all the rows in a table. If you didn't want to do it, please use `db.delete(...).where(...)` instead. Otherwise you can ignore this rule here
```
Optionally, you can define a `drizzleObjectName` in the plugin options that accept a `string` or `string[]`. This is useful when you have objects or classes with a delete method that's not from Drizzle. Such a `delete` method will trigger the ESLint rule. To avoid that, you can define the name of the Drizzle object that you use in your codebase (like db) so that the rule would only trigger if the delete
gitextract_jk7qoxoz/ ├── .eslintignore ├── .eslintrc.yaml ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── bug-template.yaml │ │ ├── config.yml │ │ ├── docs-template.yaml │ │ └── feature-template.yaml │ └── workflows/ │ ├── codeql.yml │ ├── release-feature-branch.yaml │ ├── release-latest.yaml │ ├── router.yaml │ └── unpublish-release-feature-branch.yaml ├── .gitignore ├── .markdownlint.yaml ├── .npmrc ├── .nvmrc ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── changelogs/ │ ├── README.md │ ├── drizzle-arktype/ │ │ ├── 0.1.2.md │ │ └── 0.1.3.md │ ├── drizzle-kit/ │ │ ├── 0.23.2.md │ │ ├── 0.24.0.md │ │ ├── 0.24.1.md │ │ ├── 0.24.2.md │ │ ├── 0.25.0.md │ │ ├── 0.26.0.md │ │ ├── 0.26.1.md │ │ ├── 0.26.2.md │ │ ├── 0.27.0.md │ │ ├── 0.27.1.md │ │ ├── 0.27.2.md │ │ ├── 0.28.0.md │ │ ├── 0.28.1.md │ │ ├── 0.29.0.md │ │ ├── 0.29.1.md │ │ ├── 0.30.0.md │ │ ├── 0.30.1.md │ │ ├── 0.30.2.md │ │ ├── 0.30.3.md │ │ ├── 0.30.4.md │ │ ├── 0.30.5.md │ │ ├── 0.30.6.md │ │ ├── 0.31.0.md │ │ ├── 0.31.1.md │ │ ├── 0.31.10.md │ │ ├── 0.31.2.md │ │ ├── 0.31.3.md │ │ ├── 0.31.4.md │ │ ├── 0.31.5.md │ │ ├── 0.31.6.md │ │ ├── 0.31.7.md │ │ ├── 0.31.8.md │ │ └── 0.31.9.md │ ├── drizzle-orm/ │ │ ├── 0.12.0-beta.23.md │ │ ├── 0.12.0-beta.24.md │ │ ├── 0.13.0.md │ │ ├── 0.13.1.md │ │ ├── 0.14.1.md │ │ ├── 0.14.2.md │ │ ├── 0.15.0.md │ │ ├── 0.15.1.md │ │ ├── 0.15.2.md │ │ ├── 0.15.3.md │ │ ├── 0.16.0.md │ │ ├── 0.16.1.md │ │ ├── 0.17.0.md │ │ ├── 0.17.1.md │ │ ├── 0.17.2.md │ │ ├── 0.17.3.md │ │ ├── 0.17.4.md │ │ ├── 0.17.5.md │ │ ├── 0.17.6.md │ │ ├── 0.17.7.md │ │ ├── 0.18.0.md │ │ ├── 0.19.0.md │ │ ├── 0.19.1.md │ │ ├── 0.20.0.md │ │ ├── 0.20.1.md │ │ ├── 0.20.2.md │ │ ├── 0.20.3.md │ │ ├── 0.21.0.md │ │ ├── 0.21.1.md │ │ ├── 0.22.0.md │ │ ├── 0.23.0.md │ │ ├── 0.23.1.md │ │ ├── 0.23.10.md │ │ ├── 0.23.11.md │ │ ├── 0.23.12.md │ │ ├── 0.23.13.md │ │ ├── 0.23.2.md │ │ ├── 0.23.3.md │ │ ├── 0.23.4.md │ │ ├── 0.23.5.md │ │ ├── 0.23.6.md │ │ ├── 0.23.7.md │ │ ├── 0.23.8.md │ │ ├── 0.23.9.md │ │ ├── 0.24.0.md │ │ ├── 0.24.1.md │ │ ├── 0.24.2.md │ │ ├── 0.24.3.md │ │ ├── 0.24.4.md │ │ ├── 0.24.5.md │ │ ├── 0.25.0.md │ │ ├── 0.25.1.md │ │ ├── 0.25.2.md │ │ ├── 0.25.3.md │ │ ├── 0.25.4.md │ │ ├── 0.26.0.md │ │ ├── 0.26.1.md │ │ ├── 0.26.2.md │ │ ├── 0.26.3.md │ │ ├── 0.26.4.md │ │ ├── 0.26.5.md │ │ ├── 0.27.0.md │ │ ├── 0.27.1.md │ │ ├── 0.27.2.md │ │ ├── 0.28.0.md │ │ ├── 0.28.1.md │ │ ├── 0.28.2.md │ │ ├── 0.28.3.md │ │ ├── 0.28.4.md │ │ ├── 0.28.5.md │ │ ├── 0.28.6.md │ │ ├── 0.29.0.md │ │ ├── 0.29.1.md │ │ ├── 0.29.2.md │ │ ├── 0.29.3.md │ │ ├── 0.29.4.md │ │ ├── 0.29.5.md │ │ ├── 0.30.0.md │ │ ├── 0.30.1.md │ │ ├── 0.30.10.md │ │ ├── 0.30.2.md │ │ ├── 0.30.3.md │ │ ├── 0.30.4.md │ │ ├── 0.30.5.md │ │ ├── 0.30.6.md │ │ ├── 0.30.7-preview.md │ │ ├── 0.30.7.md │ │ ├── 0.30.8.md │ │ ├── 0.30.9.md │ │ ├── 0.31.0-beta.md │ │ ├── 0.31.0.md │ │ ├── 0.31.1.md │ │ ├── 0.31.2.md │ │ ├── 0.31.3.md │ │ ├── 0.31.4.md │ │ ├── 0.32.0-beta.md │ │ ├── 0.32.0.md │ │ ├── 0.32.1.md │ │ ├── 0.32.2.md │ │ ├── 0.33.0.md │ │ ├── 0.34.0.md │ │ ├── 0.34.1.md │ │ ├── 0.35.0.md │ │ ├── 0.35.1.md │ │ ├── 0.35.2.md │ │ ├── 0.35.3.md │ │ ├── 0.36.0.md │ │ ├── 0.36.1.md │ │ ├── 0.36.2.md │ │ ├── 0.36.3.md │ │ ├── 0.36.4.md │ │ ├── 0.37.0.md │ │ ├── 0.38.0.md │ │ ├── 0.38.1.md │ │ ├── 0.38.2.md │ │ ├── 0.38.3.md │ │ ├── 0.38.4.md │ │ ├── 0.39.0.md │ │ ├── 0.39.1.md │ │ ├── 0.39.2.md │ │ ├── 0.39.3.md │ │ ├── 0.40.0.md │ │ ├── 0.40.1.md │ │ ├── 0.41.0.md │ │ ├── 0.42.0.md │ │ ├── 0.43.0.md │ │ ├── 0.43.1.md │ │ ├── 0.44.0.md │ │ ├── 0.44.1.md │ │ ├── 0.44.2.md │ │ ├── 0.44.3.md │ │ ├── 0.44.4.md │ │ ├── 0.44.5.md │ │ ├── 0.44.6.md │ │ ├── 0.44.7.md │ │ ├── 0.45.0.md │ │ └── 0.45.1.md │ ├── drizzle-orm-mysql/ │ │ ├── 0.14.1.md │ │ ├── 0.14.2.md │ │ ├── 0.14.3.md │ │ ├── 0.15.0.md │ │ ├── 0.15.1.md │ │ ├── 0.15.2.md │ │ ├── 0.15.3.md │ │ ├── 0.16.0.md │ │ ├── 0.16.1.md │ │ └── 0.16.2.md │ ├── drizzle-orm-pg/ │ │ ├── 0.12.0-beta.40.md │ │ ├── 0.13.0.md │ │ ├── 0.13.1.md │ │ ├── 0.13.2.md │ │ ├── 0.13.3.md │ │ ├── 0.13.4.md │ │ ├── 0.14.0.md │ │ ├── 0.14.1.md │ │ ├── 0.14.2.md │ │ ├── 0.14.3.md │ │ ├── 0.14.4.md │ │ ├── 0.15.0.md │ │ ├── 0.15.1.md │ │ ├── 0.15.2.md │ │ ├── 0.15.3.md │ │ ├── 0.16.0.md │ │ ├── 0.16.1.md │ │ ├── 0.16.2.md │ │ └── 0.16.3.md │ ├── drizzle-orm-sqlite/ │ │ ├── 0.12.0-beta.17.md │ │ ├── 0.12.0-beta.18.md │ │ ├── 0.12.0-beta.19.md │ │ ├── 0.12.0-beta.20.md │ │ ├── 0.12.0-beta.21.md │ │ ├── 0.13.0.md │ │ ├── 0.14.1.md │ │ ├── 0.14.2.md │ │ ├── 0.14.3.md │ │ ├── 0.14.4.md │ │ ├── 0.14.5.md │ │ ├── 0.15.0.md │ │ ├── 0.15.2.md │ │ ├── 0.15.3.md │ │ ├── 0.15.4.md │ │ ├── 0.16.0.md │ │ └── 0.16.1.md │ ├── drizzle-seed/ │ │ ├── 0.1.1.md │ │ ├── 0.1.2.md │ │ ├── 0.1.3.md │ │ ├── 0.2.1.md │ │ ├── 0.3.0.md │ │ └── 0.3.1.md │ ├── drizzle-typebox/ │ │ ├── 0.1.0.md │ │ ├── 0.1.1.md │ │ ├── 0.2.0.md │ │ ├── 0.2.1.md │ │ ├── 0.3.0.md │ │ ├── 0.3.1.md │ │ ├── 0.3.2.md │ │ └── 0.3.3.md │ ├── drizzle-valibot/ │ │ ├── 0.1.0.md │ │ ├── 0.1.1.md │ │ ├── 0.2.0.md │ │ ├── 0.3.0.md │ │ ├── 0.3.1.md │ │ ├── 0.4.0.md │ │ ├── 0.4.1.md │ │ └── 0.4.2.md │ ├── drizzle-zod/ │ │ ├── 0.1.0.md │ │ ├── 0.1.1.md │ │ ├── 0.1.2.md │ │ ├── 0.1.3.md │ │ ├── 0.1.4.md │ │ ├── 0.2.0.md │ │ ├── 0.2.1.md │ │ ├── 0.3.0.md │ │ ├── 0.3.1.md │ │ ├── 0.3.2.md │ │ ├── 0.4.0.md │ │ ├── 0.4.1.md │ │ ├── 0.4.2.md │ │ ├── 0.4.3.md │ │ ├── 0.4.4.md │ │ ├── 0.5.0.md │ │ ├── 0.5.1.md │ │ ├── 0.6.0.md │ │ ├── 0.6.1.md │ │ ├── 0.7.0.md │ │ ├── 0.7.1.md │ │ ├── 0.8.0.md │ │ ├── 0.8.1.md │ │ ├── 0.8.2.md │ │ └── 0.8.3.md │ └── eslint-plugin-drizzle/ │ ├── 0.2.0.md │ ├── 0.2.1.md │ ├── 0.2.2.md │ └── 0.2.3.md ├── docs/ │ ├── custom-types.lite.md │ ├── custom-types.md │ ├── joins.md │ └── table-introspect-api.md ├── dprint.json ├── drizzle-arktype/ │ ├── README.md │ ├── benchmarks/ │ │ └── types.ts │ ├── package.json │ ├── rollup.config.ts │ ├── scripts/ │ │ ├── build.ts │ │ └── fix-imports.ts │ ├── src/ │ │ ├── column.ts │ │ ├── column.types.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── schema.ts │ │ ├── schema.types.internal.ts │ │ ├── schema.types.ts │ │ └── utils.ts │ ├── tests/ │ │ ├── mysql.test.ts │ │ ├── pg.test.ts │ │ ├── singlestore.test.ts │ │ ├── sqlite.test.ts │ │ ├── tsconfig.json │ │ └── utils.ts │ ├── tsconfig.build.json │ ├── tsconfig.json │ └── vitest.config.ts ├── drizzle-kit/ │ ├── .gitignore │ ├── README.md │ ├── build.dev.ts │ ├── build.ts │ ├── imports-checker/ │ │ ├── analyze.ts │ │ ├── checker.ts │ │ ├── grammar/ │ │ │ ├── grammar.ohm │ │ │ ├── grammar.ohm-bundle.d.ts │ │ │ └── grammar.ohm-bundle.js │ │ └── index.ts │ ├── package.json │ ├── patches/ │ │ └── difflib@0.2.4.patch │ ├── src/ │ │ ├── @types/ │ │ │ └── utils.ts │ │ ├── api.ts │ │ ├── cli/ │ │ │ ├── commands/ │ │ │ │ ├── _es5.ts │ │ │ │ ├── check.ts │ │ │ │ ├── drop.ts │ │ │ │ ├── introspect.ts │ │ │ │ ├── libSqlPushUtils.ts │ │ │ │ ├── migrate.ts │ │ │ │ ├── mysqlIntrospect.ts │ │ │ │ ├── mysqlPushUtils.ts │ │ │ │ ├── mysqlUp.ts │ │ │ │ ├── pgIntrospect.ts │ │ │ │ ├── pgPushUtils.ts │ │ │ │ ├── pgUp.ts │ │ │ │ ├── push.ts │ │ │ │ ├── singlestoreIntrospect.ts │ │ │ │ ├── singlestorePushUtils.ts │ │ │ │ ├── singlestoreUp.ts │ │ │ │ ├── sqliteIntrospect.ts │ │ │ │ ├── sqlitePushUtils.ts │ │ │ │ ├── sqliteUp.ts │ │ │ │ └── utils.ts │ │ │ ├── connections.ts │ │ │ ├── index.ts │ │ │ ├── schema.ts │ │ │ ├── selector-ui.ts │ │ │ ├── utils.ts │ │ │ ├── validations/ │ │ │ │ ├── cli.ts │ │ │ │ ├── common.ts │ │ │ │ ├── gel.ts │ │ │ │ ├── libsql.ts │ │ │ │ ├── mysql.ts │ │ │ │ ├── outputs.ts │ │ │ │ ├── postgres.ts │ │ │ │ ├── singlestore.ts │ │ │ │ ├── sqlite.ts │ │ │ │ └── studio.ts │ │ │ └── views.ts │ │ ├── extensions/ │ │ │ ├── getTablesFilterByExtensions.ts │ │ │ └── vector.ts │ │ ├── global.ts │ │ ├── index.ts │ │ ├── introspect-gel.ts │ │ ├── introspect-mysql.ts │ │ ├── introspect-pg.ts │ │ ├── introspect-singlestore.ts │ │ ├── introspect-sqlite.ts │ │ ├── jsonDiffer.js │ │ ├── jsonStatements.ts │ │ ├── loader.mjs │ │ ├── migrationPreparator.ts │ │ ├── schemaValidator.ts │ │ ├── serializer/ │ │ │ ├── gelSchema.ts │ │ │ ├── gelSerializer.ts │ │ │ ├── index.ts │ │ │ ├── mysqlImports.ts │ │ │ ├── mysqlSchema.ts │ │ │ ├── mysqlSerializer.ts │ │ │ ├── pgImports.ts │ │ │ ├── pgSchema.ts │ │ │ ├── pgSerializer.ts │ │ │ ├── singlestoreImports.ts │ │ │ ├── singlestoreSchema.ts │ │ │ ├── singlestoreSerializer.ts │ │ │ ├── sqliteImports.ts │ │ │ ├── sqliteSchema.ts │ │ │ ├── sqliteSerializer.ts │ │ │ ├── studio.ts │ │ │ └── utils.ts │ │ ├── simulator.ts │ │ ├── snapshotsDiffer.ts │ │ ├── sqlgenerator.ts │ │ ├── statementCombiner.ts │ │ ├── utils/ │ │ │ ├── certs.ts │ │ │ └── words.ts │ │ └── utils.ts │ ├── tests/ │ │ ├── bin.test.ts │ │ ├── cli/ │ │ │ ├── d1http.config.ts │ │ │ ├── drizzle.config.ts │ │ │ ├── durable-sqlite.config.ts │ │ │ ├── expo.config.ts │ │ │ ├── postgres.config.ts │ │ │ ├── postgres2.config.ts │ │ │ ├── schema.ts │ │ │ └── turso.config.ts │ │ ├── cli-export.test.ts │ │ ├── cli-generate.test.ts │ │ ├── cli-migrate.test.ts │ │ ├── cli-push.test.ts │ │ ├── common.ts │ │ ├── indexes/ │ │ │ ├── common.ts │ │ │ └── pg.test.ts │ │ ├── introspect/ │ │ │ ├── gel.ext.test.ts │ │ │ ├── gel.test.ts │ │ │ ├── libsql.test.ts │ │ │ ├── mysql.test.ts │ │ │ ├── pg.test.ts │ │ │ ├── singlestore.test.ts │ │ │ └── sqlite.test.ts │ │ ├── libsql-checks.test.ts │ │ ├── libsql-statements.test.ts │ │ ├── libsql-views.test.ts │ │ ├── migrate/ │ │ │ ├── libsq-schema.ts │ │ │ ├── libsql-migrate.test.ts │ │ │ └── migrations/ │ │ │ ├── 0000_little_blizzard.sql │ │ │ ├── 0001_nebulous_storm.sql │ │ │ └── meta/ │ │ │ ├── 0000_snapshot.json │ │ │ ├── 0001_snapshot.json │ │ │ └── _journal.json │ │ ├── mysql-checks.test.ts │ │ ├── mysql-generated.test.ts │ │ ├── mysql-schemas.test.ts │ │ ├── mysql-views.test.ts │ │ ├── mysql.test.ts │ │ ├── pg-array.test.ts │ │ ├── pg-checks.test.ts │ │ ├── pg-columns.test.ts │ │ ├── pg-enums.test.ts │ │ ├── pg-generated.test.ts │ │ ├── pg-identity.test.ts │ │ ├── pg-schemas.test.ts │ │ ├── pg-sequences.test.ts │ │ ├── pg-tables.test.ts │ │ ├── pg-views.test.ts │ │ ├── push/ │ │ │ ├── common.ts │ │ │ ├── libsql.test.ts │ │ │ ├── mysql-push.test.ts │ │ │ ├── mysql.test.ts │ │ │ ├── pg.test.ts │ │ │ ├── singlestore-push.test.ts │ │ │ ├── singlestore.test.ts │ │ │ └── sqlite.test.ts │ │ ├── rls/ │ │ │ ├── pg-policy.test.ts │ │ │ └── pg-role.test.ts │ │ ├── schemaDiffer.ts │ │ ├── singlestore-generated.test.ts │ │ ├── singlestore-schemas.test.ts │ │ ├── singlestore.test.ts │ │ ├── sqlite-checks.test.ts │ │ ├── sqlite-columns.test.ts │ │ ├── sqlite-generated.test.ts │ │ ├── sqlite-tables.test.ts │ │ ├── sqlite-views.test.ts │ │ ├── statements-combiner/ │ │ │ ├── libsql-statements-combiner.test.ts │ │ │ ├── singlestore-statements-combiner.test.ts │ │ │ └── sqlite-statements-combiner.test.ts │ │ ├── test/ │ │ │ └── sqlite.test.ts │ │ ├── testsinglestore.ts │ │ ├── validations.test.ts │ │ └── wrap-param.test.ts │ ├── tsconfig.build.json │ ├── tsconfig.cli-types.json │ ├── tsconfig.json │ └── vitest.config.ts ├── drizzle-orm/ │ ├── .madgerc │ ├── package.json │ ├── scripts/ │ │ ├── build.ts │ │ └── fix-imports.ts │ ├── src/ │ │ ├── alias.ts │ │ ├── aws-data-api/ │ │ │ ├── common/ │ │ │ │ └── index.ts │ │ │ └── pg/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── batch.ts │ │ ├── better-sqlite3/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── bun-sql/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── bun-sqlite/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── cache/ │ │ │ ├── core/ │ │ │ │ ├── cache.ts │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ │ ├── readme.md │ │ │ └── upstash/ │ │ │ ├── cache.ts │ │ │ └── index.ts │ │ ├── casing.ts │ │ ├── column-builder.ts │ │ ├── column.ts │ │ ├── d1/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── durable-sqlite/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── entity.ts │ │ ├── errors.ts │ │ ├── expo-sqlite/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ ├── query.ts │ │ │ └── session.ts │ │ ├── gel/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── gel-core/ │ │ │ ├── alias.ts │ │ │ ├── checks.ts │ │ │ ├── columns/ │ │ │ │ ├── all.ts │ │ │ │ ├── bigint.ts │ │ │ │ ├── bigintT.ts │ │ │ │ ├── boolean.ts │ │ │ │ ├── bytes.ts │ │ │ │ ├── common.ts │ │ │ │ ├── custom.ts │ │ │ │ ├── date-duration.ts │ │ │ │ ├── date.common.ts │ │ │ │ ├── decimal.ts │ │ │ │ ├── double-precision.ts │ │ │ │ ├── duration.ts │ │ │ │ ├── index.ts │ │ │ │ ├── int.common.ts │ │ │ │ ├── integer.ts │ │ │ │ ├── json.ts │ │ │ │ ├── localdate.ts │ │ │ │ ├── localtime.ts │ │ │ │ ├── real.ts │ │ │ │ ├── relative-duration.ts │ │ │ │ ├── smallint.ts │ │ │ │ ├── text.ts │ │ │ │ ├── timestamp.ts │ │ │ │ ├── timestamptz.ts │ │ │ │ └── uuid.ts │ │ │ ├── db.ts │ │ │ ├── dialect.ts │ │ │ ├── expressions.ts │ │ │ ├── foreign-keys.ts │ │ │ ├── index.ts │ │ │ ├── indexes.ts │ │ │ ├── policies.ts │ │ │ ├── primary-keys.ts │ │ │ ├── query-builders/ │ │ │ │ ├── count.ts │ │ │ │ ├── delete.ts │ │ │ │ ├── index.ts │ │ │ │ ├── insert.ts │ │ │ │ ├── query-builder.ts │ │ │ │ ├── query.ts │ │ │ │ ├── raw.ts │ │ │ │ ├── refresh-materialized-view.ts │ │ │ │ ├── select.ts │ │ │ │ ├── select.types.ts │ │ │ │ └── update.ts │ │ │ ├── roles.ts │ │ │ ├── schema.ts │ │ │ ├── sequence.ts │ │ │ ├── session.ts │ │ │ ├── subquery.ts │ │ │ ├── table.ts │ │ │ ├── unique-constraint.ts │ │ │ ├── utils.ts │ │ │ ├── view-base.ts │ │ │ ├── view-common.ts │ │ │ └── view.ts │ │ ├── index.ts │ │ ├── knex/ │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── kysely/ │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── libsql/ │ │ │ ├── driver-core.ts │ │ │ ├── driver.ts │ │ │ ├── http/ │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ ├── node/ │ │ │ │ └── index.ts │ │ │ ├── session.ts │ │ │ ├── sqlite3/ │ │ │ │ └── index.ts │ │ │ ├── wasm/ │ │ │ │ └── index.ts │ │ │ ├── web/ │ │ │ │ └── index.ts │ │ │ └── ws/ │ │ │ └── index.ts │ │ ├── logger.ts │ │ ├── migrator.ts │ │ ├── mysql-core/ │ │ │ ├── alias.ts │ │ │ ├── checks.ts │ │ │ ├── columns/ │ │ │ │ ├── all.ts │ │ │ │ ├── bigint.ts │ │ │ │ ├── binary.ts │ │ │ │ ├── boolean.ts │ │ │ │ ├── char.ts │ │ │ │ ├── common.ts │ │ │ │ ├── custom.ts │ │ │ │ ├── date.common.ts │ │ │ │ ├── date.ts │ │ │ │ ├── datetime.ts │ │ │ │ ├── decimal.ts │ │ │ │ ├── double.ts │ │ │ │ ├── enum.ts │ │ │ │ ├── float.ts │ │ │ │ ├── index.ts │ │ │ │ ├── int.ts │ │ │ │ ├── json.ts │ │ │ │ ├── mediumint.ts │ │ │ │ ├── real.ts │ │ │ │ ├── serial.ts │ │ │ │ ├── smallint.ts │ │ │ │ ├── text.ts │ │ │ │ ├── time.ts │ │ │ │ ├── timestamp.ts │ │ │ │ ├── tinyint.ts │ │ │ │ ├── varbinary.ts │ │ │ │ ├── varchar.ts │ │ │ │ └── year.ts │ │ │ ├── db.ts │ │ │ ├── dialect.ts │ │ │ ├── expressions.ts │ │ │ ├── foreign-keys.ts │ │ │ ├── index.ts │ │ │ ├── indexes.ts │ │ │ ├── primary-keys.ts │ │ │ ├── query-builders/ │ │ │ │ ├── count.ts │ │ │ │ ├── delete.ts │ │ │ │ ├── index.ts │ │ │ │ ├── insert.ts │ │ │ │ ├── query-builder.ts │ │ │ │ ├── query.ts │ │ │ │ ├── select.ts │ │ │ │ ├── select.types.ts │ │ │ │ └── update.ts │ │ │ ├── schema.ts │ │ │ ├── session.ts │ │ │ ├── subquery.ts │ │ │ ├── table.ts │ │ │ ├── unique-constraint.ts │ │ │ ├── utils.ts │ │ │ ├── view-base.ts │ │ │ ├── view-common.ts │ │ │ └── view.ts │ │ ├── mysql-proxy/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── mysql2/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── neon/ │ │ │ ├── index.ts │ │ │ ├── neon-auth.ts │ │ │ └── rls.ts │ │ ├── neon-http/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── neon-serverless/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── node-postgres/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── op-sqlite/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── operations.ts │ │ ├── pg-core/ │ │ │ ├── alias.ts │ │ │ ├── checks.ts │ │ │ ├── columns/ │ │ │ │ ├── all.ts │ │ │ │ ├── bigint.ts │ │ │ │ ├── bigserial.ts │ │ │ │ ├── boolean.ts │ │ │ │ ├── char.ts │ │ │ │ ├── cidr.ts │ │ │ │ ├── common.ts │ │ │ │ ├── custom.ts │ │ │ │ ├── date.common.ts │ │ │ │ ├── date.ts │ │ │ │ ├── double-precision.ts │ │ │ │ ├── enum.ts │ │ │ │ ├── index.ts │ │ │ │ ├── inet.ts │ │ │ │ ├── int.common.ts │ │ │ │ ├── integer.ts │ │ │ │ ├── interval.ts │ │ │ │ ├── json.ts │ │ │ │ ├── jsonb.ts │ │ │ │ ├── line.ts │ │ │ │ ├── macaddr.ts │ │ │ │ ├── macaddr8.ts │ │ │ │ ├── numeric.ts │ │ │ │ ├── point.ts │ │ │ │ ├── postgis_extension/ │ │ │ │ │ ├── geometry.ts │ │ │ │ │ └── utils.ts │ │ │ │ ├── real.ts │ │ │ │ ├── serial.ts │ │ │ │ ├── smallint.ts │ │ │ │ ├── smallserial.ts │ │ │ │ ├── text.ts │ │ │ │ ├── time.ts │ │ │ │ ├── timestamp.ts │ │ │ │ ├── uuid.ts │ │ │ │ ├── varchar.ts │ │ │ │ └── vector_extension/ │ │ │ │ ├── bit.ts │ │ │ │ ├── halfvec.ts │ │ │ │ ├── sparsevec.ts │ │ │ │ └── vector.ts │ │ │ ├── db.ts │ │ │ ├── dialect.ts │ │ │ ├── expressions.ts │ │ │ ├── foreign-keys.ts │ │ │ ├── index.ts │ │ │ ├── indexes.ts │ │ │ ├── policies.ts │ │ │ ├── primary-keys.ts │ │ │ ├── query-builders/ │ │ │ │ ├── count.ts │ │ │ │ ├── delete.ts │ │ │ │ ├── index.ts │ │ │ │ ├── insert.ts │ │ │ │ ├── query-builder.ts │ │ │ │ ├── query.ts │ │ │ │ ├── raw.ts │ │ │ │ ├── refresh-materialized-view.ts │ │ │ │ ├── select.ts │ │ │ │ ├── select.types.ts │ │ │ │ └── update.ts │ │ │ ├── roles.ts │ │ │ ├── schema.ts │ │ │ ├── sequence.ts │ │ │ ├── session.ts │ │ │ ├── subquery.ts │ │ │ ├── table.ts │ │ │ ├── unique-constraint.ts │ │ │ ├── utils/ │ │ │ │ ├── array.ts │ │ │ │ └── index.ts │ │ │ ├── utils.ts │ │ │ ├── view-base.ts │ │ │ ├── view-common.ts │ │ │ └── view.ts │ │ ├── pg-proxy/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── pglite/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── planetscale-serverless/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── postgres-js/ │ │ │ ├── README.md │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── primary-key.ts │ │ ├── prisma/ │ │ │ ├── mysql/ │ │ │ │ ├── driver.ts │ │ │ │ ├── index.ts │ │ │ │ └── session.ts │ │ │ ├── pg/ │ │ │ │ ├── driver.ts │ │ │ │ ├── index.ts │ │ │ │ └── session.ts │ │ │ ├── schema.prisma │ │ │ └── sqlite/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ └── session.ts │ │ ├── query-builders/ │ │ │ ├── query-builder.ts │ │ │ └── select.types.ts │ │ ├── query-promise.ts │ │ ├── relations.ts │ │ ├── runnable-query.ts │ │ ├── selection-proxy.ts │ │ ├── session.ts │ │ ├── singlestore/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── singlestore-core/ │ │ │ ├── alias.ts │ │ │ ├── columns/ │ │ │ │ ├── all.ts │ │ │ │ ├── bigint.ts │ │ │ │ ├── binary.ts │ │ │ │ ├── boolean.ts │ │ │ │ ├── char.ts │ │ │ │ ├── common.ts │ │ │ │ ├── custom.ts │ │ │ │ ├── date.common.ts │ │ │ │ ├── date.ts │ │ │ │ ├── datetime.ts │ │ │ │ ├── decimal.ts │ │ │ │ ├── double.ts │ │ │ │ ├── enum.ts │ │ │ │ ├── float.ts │ │ │ │ ├── index.ts │ │ │ │ ├── int.ts │ │ │ │ ├── json.ts │ │ │ │ ├── mediumint.ts │ │ │ │ ├── real.ts │ │ │ │ ├── serial.ts │ │ │ │ ├── smallint.ts │ │ │ │ ├── text.ts │ │ │ │ ├── time.ts │ │ │ │ ├── timestamp.ts │ │ │ │ ├── tinyint.ts │ │ │ │ ├── varbinary.ts │ │ │ │ ├── varchar.ts │ │ │ │ ├── vector.ts │ │ │ │ └── year.ts │ │ │ ├── db.ts │ │ │ ├── dialect.ts │ │ │ ├── expressions.ts │ │ │ ├── index.ts │ │ │ ├── indexes.ts │ │ │ ├── primary-keys.ts │ │ │ ├── query-builders/ │ │ │ │ ├── count.ts │ │ │ │ ├── delete.ts │ │ │ │ ├── index.ts │ │ │ │ ├── insert.ts │ │ │ │ ├── query-builder.ts │ │ │ │ ├── query.ts │ │ │ │ ├── select.ts │ │ │ │ ├── select.types.ts │ │ │ │ └── update.ts │ │ │ ├── schema.ts │ │ │ ├── session.ts │ │ │ ├── subquery.ts │ │ │ ├── table.ts │ │ │ ├── unique-constraint.ts │ │ │ ├── utils.ts │ │ │ ├── view-base.ts │ │ │ ├── view-common.ts │ │ │ └── view.ts │ │ ├── singlestore-proxy/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── sql/ │ │ │ ├── expressions/ │ │ │ │ ├── conditions.ts │ │ │ │ ├── index.ts │ │ │ │ └── select.ts │ │ │ ├── functions/ │ │ │ │ ├── aggregate.ts │ │ │ │ ├── index.ts │ │ │ │ └── vector.ts │ │ │ ├── index.ts │ │ │ └── sql.ts │ │ ├── sql-js/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── sqlite-core/ │ │ │ ├── README.md │ │ │ ├── alias.ts │ │ │ ├── checks.ts │ │ │ ├── columns/ │ │ │ │ ├── all.ts │ │ │ │ ├── blob.ts │ │ │ │ ├── common.ts │ │ │ │ ├── custom.ts │ │ │ │ ├── index.ts │ │ │ │ ├── integer.ts │ │ │ │ ├── numeric.ts │ │ │ │ ├── real.ts │ │ │ │ └── text.ts │ │ │ ├── db.ts │ │ │ ├── dialect.ts │ │ │ ├── expressions.ts │ │ │ ├── foreign-keys.ts │ │ │ ├── index.ts │ │ │ ├── indexes.ts │ │ │ ├── primary-keys.ts │ │ │ ├── query-builders/ │ │ │ │ ├── count.ts │ │ │ │ ├── delete.ts │ │ │ │ ├── index.ts │ │ │ │ ├── insert.ts │ │ │ │ ├── query-builder.ts │ │ │ │ ├── query.ts │ │ │ │ ├── raw.ts │ │ │ │ ├── select.ts │ │ │ │ ├── select.types.ts │ │ │ │ └── update.ts │ │ │ ├── session.ts │ │ │ ├── subquery.ts │ │ │ ├── table.ts │ │ │ ├── unique-constraint.ts │ │ │ ├── utils.ts │ │ │ ├── view-base.ts │ │ │ ├── view-common.ts │ │ │ └── view.ts │ │ ├── sqlite-proxy/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── subquery.ts │ │ ├── supabase/ │ │ │ ├── index.ts │ │ │ └── rls.ts │ │ ├── table.ts │ │ ├── table.utils.ts │ │ ├── tidb-serverless/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── tracing-utils.ts │ │ ├── tracing.ts │ │ ├── utils.ts │ │ ├── vercel-postgres/ │ │ │ ├── driver.ts │ │ │ ├── index.ts │ │ │ ├── migrator.ts │ │ │ └── session.ts │ │ ├── version.ts │ │ ├── view-common.ts │ │ └── xata-http/ │ │ ├── driver.ts │ │ ├── index.ts │ │ ├── migrator.ts │ │ └── session.ts │ ├── tests/ │ │ ├── casing/ │ │ │ ├── casing.test.ts │ │ │ ├── mysql-to-camel.test.ts │ │ │ ├── mysql-to-snake.test.ts │ │ │ ├── pg-to-camel.test.ts │ │ │ ├── pg-to-snake.test.ts │ │ │ ├── sqlite-to-camel.test.ts │ │ │ └── sqlite-to-snake.test.ts │ │ ├── exports.test.ts │ │ ├── is.test.ts │ │ ├── makePgArray.test.ts │ │ ├── parsePgArray.test.ts │ │ ├── relation.test.ts │ │ ├── tsconfig.json │ │ └── type-hints.test.ts │ ├── tsconfig.build.json │ ├── tsconfig.dts.json │ ├── tsconfig.json │ ├── tsup.config.ts │ ├── type-tests/ │ │ ├── common/ │ │ │ └── aliased-table.ts │ │ ├── geldb/ │ │ │ ├── 1-to-1-fk.ts │ │ │ ├── array.ts │ │ │ ├── count.ts │ │ │ ├── db-rel.ts │ │ │ ├── db.ts │ │ │ ├── delete.ts │ │ │ ├── generated-columns.ts │ │ │ ├── insert.ts │ │ │ ├── no-strict-null-checks/ │ │ │ │ ├── test.ts │ │ │ │ └── tsconfig.json │ │ │ ├── other.ts │ │ │ ├── select.ts │ │ │ ├── set-operators.ts │ │ │ ├── subquery.ts │ │ │ ├── tables-rel.ts │ │ │ ├── tables.ts │ │ │ ├── update.ts │ │ │ └── with.ts │ │ ├── knex/ │ │ │ └── index.ts │ │ ├── kysely/ │ │ │ └── index.ts │ │ ├── mysql/ │ │ │ ├── 1-to-1-fk.ts │ │ │ ├── 1000columns.ts │ │ │ ├── count.ts │ │ │ ├── db-rel.ts │ │ │ ├── db.ts │ │ │ ├── delete.ts │ │ │ ├── generated-columns.ts │ │ │ ├── insert.ts │ │ │ ├── no-strict-null-checks/ │ │ │ │ ├── test.ts │ │ │ │ └── tsconfig.json │ │ │ ├── select.ts │ │ │ ├── set-operators.ts │ │ │ ├── subquery.ts │ │ │ ├── tables-rel.ts │ │ │ ├── tables.ts │ │ │ ├── update.ts │ │ │ └── with.ts │ │ ├── pg/ │ │ │ ├── 1-to-1-fk.ts │ │ │ ├── array.ts │ │ │ ├── count.ts │ │ │ ├── db-rel.ts │ │ │ ├── db.ts │ │ │ ├── delete.ts │ │ │ ├── generated-columns.ts │ │ │ ├── insert.ts │ │ │ ├── no-strict-null-checks/ │ │ │ │ ├── test.ts │ │ │ │ └── tsconfig.json │ │ │ ├── other.ts │ │ │ ├── select.ts │ │ │ ├── set-operators.ts │ │ │ ├── subquery.ts │ │ │ ├── tables-rel.ts │ │ │ ├── tables.ts │ │ │ ├── update.ts │ │ │ └── with.ts │ │ ├── singlestore/ │ │ │ ├── 1000columns.ts │ │ │ ├── count.ts │ │ │ ├── db.ts │ │ │ ├── delete.ts │ │ │ ├── insert.ts │ │ │ ├── no-strict-null-checks/ │ │ │ │ ├── test.ts │ │ │ │ └── tsconfig.json │ │ │ ├── select.ts │ │ │ ├── set-operators.ts │ │ │ ├── subquery.ts │ │ │ ├── tables.ts │ │ │ ├── update.ts │ │ │ └── with.ts │ │ ├── sqlite/ │ │ │ ├── .gitignore │ │ │ ├── count.ts │ │ │ ├── db.ts │ │ │ ├── delete.ts │ │ │ ├── generated-columns.ts │ │ │ ├── insert.ts │ │ │ ├── no-strict-null-checks/ │ │ │ │ ├── test.ts │ │ │ │ └── tsconfig.json │ │ │ ├── other.ts │ │ │ ├── select.ts │ │ │ ├── set-operators.ts │ │ │ ├── subquery.ts │ │ │ ├── tables.ts │ │ │ ├── update.ts │ │ │ └── with.ts │ │ ├── tsconfig.json │ │ ├── utils/ │ │ │ └── neon-auth-token.ts │ │ └── utils.ts │ └── vitest.config.ts ├── drizzle-seed/ │ ├── README.md │ ├── package.json │ ├── rollup.config.ts │ ├── scripts/ │ │ └── build.ts │ ├── src/ │ │ ├── datasets/ │ │ │ ├── adjectives.ts │ │ │ ├── cityNames.ts │ │ │ ├── companyNameSuffixes.ts │ │ │ ├── countries.ts │ │ │ ├── emailDomains.ts │ │ │ ├── firstNames.ts │ │ │ ├── jobsTitles.ts │ │ │ ├── lastNames.ts │ │ │ ├── loremIpsumSentences.ts │ │ │ ├── phonesInfo.ts │ │ │ ├── states.ts │ │ │ └── streetSuffix.ts │ │ ├── index.ts │ │ ├── services/ │ │ │ ├── GeneratorFuncs.ts │ │ │ ├── Generators.ts │ │ │ ├── SeedService.ts │ │ │ ├── apiVersion.ts │ │ │ ├── utils.ts │ │ │ └── versioning/ │ │ │ └── v2.ts │ │ └── types/ │ │ ├── drizzleStudio.ts │ │ ├── seedService.ts │ │ └── tables.ts │ ├── tests/ │ │ ├── benchmarks/ │ │ │ └── generatorsBenchmark.ts │ │ ├── mysql/ │ │ │ ├── allDataTypesTest/ │ │ │ │ ├── mysqlSchema.ts │ │ │ │ └── mysql_all_data_types.test.ts │ │ │ ├── cyclicTables/ │ │ │ │ ├── cyclicTables.test.ts │ │ │ │ └── mysqlSchema.ts │ │ │ ├── generatorsTest/ │ │ │ │ ├── generators.test.ts │ │ │ │ └── mysqlSchema.ts │ │ │ ├── mysql.test.ts │ │ │ ├── mysqlSchema.ts │ │ │ └── softRelationsTest/ │ │ │ ├── mysqlSchema.ts │ │ │ └── softRelations.test.ts │ │ ├── northwind/ │ │ │ ├── mysqlSchema.ts │ │ │ ├── mysqlTest.ts │ │ │ ├── pgSchema.ts │ │ │ ├── pgTest.ts │ │ │ ├── sqliteSchema.ts │ │ │ └── sqliteTest.ts │ │ ├── pg/ │ │ │ ├── allDataTypesTest/ │ │ │ │ ├── pgSchema.ts │ │ │ │ └── pg_all_data_types.test.ts │ │ │ ├── cyclicTables/ │ │ │ │ ├── cyclicTables.test.ts │ │ │ │ └── pgSchema.ts │ │ │ ├── generatorsTest/ │ │ │ │ ├── generators.test.ts │ │ │ │ └── pgSchema.ts │ │ │ ├── pg.test.ts │ │ │ ├── pgSchema.ts │ │ │ └── softRelationsTest/ │ │ │ ├── pgSchema.ts │ │ │ └── softRelations.test.ts │ │ └── sqlite/ │ │ ├── allDataTypesTest/ │ │ │ ├── sqliteSchema.ts │ │ │ └── sqlite_all_data_types.test.ts │ │ ├── cyclicTables/ │ │ │ ├── cyclicTables.test.ts │ │ │ └── sqliteSchema.ts │ │ ├── softRelationsTest/ │ │ │ ├── softRelations.test.ts │ │ │ └── sqliteSchema.ts │ │ ├── sqlite.test.ts │ │ └── sqliteSchema.ts │ ├── tsconfig.build.json │ ├── tsconfig.json │ ├── type-tests/ │ │ ├── mysql.ts │ │ ├── pg.ts │ │ ├── sqlite.ts │ │ └── tsconfig.json │ └── vitest.config.ts ├── drizzle-typebox/ │ ├── README.md │ ├── package.json │ ├── rollup.config.ts │ ├── scripts/ │ │ ├── build.ts │ │ └── fix-imports.ts │ ├── src/ │ │ ├── column.ts │ │ ├── column.types.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── schema.ts │ │ ├── schema.types.internal.ts │ │ ├── schema.types.ts │ │ └── utils.ts │ ├── tests/ │ │ ├── mysql.test.ts │ │ ├── pg.test.ts │ │ ├── singlestore.test.ts │ │ ├── sqlite.test.ts │ │ ├── tsconfig.json │ │ └── utils.ts │ ├── tsconfig.build.json │ ├── tsconfig.json │ └── vitest.config.ts ├── drizzle-valibot/ │ ├── README.md │ ├── package.json │ ├── rollup.config.ts │ ├── scripts/ │ │ ├── build.ts │ │ └── fix-imports.ts │ ├── src/ │ │ ├── column.ts │ │ ├── column.types.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── schema.ts │ │ ├── schema.types.internal.ts │ │ ├── schema.types.ts │ │ └── utils.ts │ ├── tests/ │ │ ├── mysql.test.ts │ │ ├── pg.test.ts │ │ ├── singlestore.test.ts │ │ ├── sqlite.test.ts │ │ ├── tsconfig.json │ │ └── utils.ts │ ├── tsconfig.build.json │ ├── tsconfig.json │ └── vitest.config.ts ├── drizzle-zod/ │ ├── README.md │ ├── package.json │ ├── rollup.config.ts │ ├── scripts/ │ │ ├── build.ts │ │ └── fix-imports.ts │ ├── src/ │ │ ├── column.ts │ │ ├── column.types.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── schema.ts │ │ ├── schema.types.internal.ts │ │ ├── schema.types.ts │ │ └── utils.ts │ ├── tests/ │ │ ├── mysql.test.ts │ │ ├── pg.test.ts │ │ ├── singlestore.test.ts │ │ ├── sqlite.test.ts │ │ ├── tsconfig.json │ │ └── utils.ts │ ├── tsconfig.build.json │ ├── tsconfig.json │ └── vitest.config.ts ├── eslint/ │ └── eslint-plugin-drizzle-internal/ │ └── index.js ├── eslint-plugin-drizzle/ │ ├── .gitignore │ ├── package.json │ ├── readme.md │ ├── src/ │ │ ├── configs/ │ │ │ ├── all.ts │ │ │ └── recommended.ts │ │ ├── enforce-delete-with-where.ts │ │ ├── enforce-update-with-where.ts │ │ ├── index.ts │ │ └── utils/ │ │ ├── ast.ts │ │ └── options.ts │ ├── tests/ │ │ ├── delete.test.ts │ │ └── update.test.ts │ ├── tsconfig.json │ └── vitest.config.ts ├── integration-tests/ │ ├── .gitignore │ ├── .xata/ │ │ ├── migrations/ │ │ │ └── .ledger │ │ └── version/ │ │ └── compatibility.json │ ├── .xatarc │ ├── docker-neon.yml │ ├── drizzle2/ │ │ ├── mysql/ │ │ │ ├── 0000_nostalgic_carnage.sql │ │ │ └── meta/ │ │ │ ├── 0000_snapshot.json │ │ │ └── _journal.json │ │ ├── mysql-proxy/ │ │ │ ├── first/ │ │ │ │ ├── 0000_nostalgic_carnage.sql │ │ │ │ └── meta/ │ │ │ │ ├── 0000_snapshot.json │ │ │ │ └── _journal.json │ │ │ └── second/ │ │ │ ├── 0000_nostalgic_carnage.sql │ │ │ ├── 0001_test.sql │ │ │ └── meta/ │ │ │ ├── 0000_snapshot.json │ │ │ ├── 0001_snapshot.json │ │ │ └── _journal.json │ │ ├── pg/ │ │ │ ├── 0000_puzzling_flatman.sql │ │ │ ├── 0001_test.sql │ │ │ └── meta/ │ │ │ ├── 0000_snapshot.json │ │ │ └── _journal.json │ │ ├── pg-proxy/ │ │ │ ├── first/ │ │ │ │ ├── 0000_puzzling_flatman.sql │ │ │ │ └── meta/ │ │ │ │ ├── 0000_snapshot.json │ │ │ │ └── _journal.json │ │ │ └── second/ │ │ │ ├── 0000_puzzling_flatman.sql │ │ │ ├── 0001_test.sql │ │ │ └── meta/ │ │ │ ├── 0000_snapshot.json │ │ │ ├── 0001_snapshot.json │ │ │ └── _journal.json │ │ ├── planetscale/ │ │ │ ├── 0000_nostalgic_carnage.sql │ │ │ └── meta/ │ │ │ ├── 0000_snapshot.json │ │ │ └── _journal.json │ │ ├── singlestore/ │ │ │ ├── 0000_nostalgic_carnage.sql │ │ │ └── meta/ │ │ │ ├── 0000_snapshot.json │ │ │ └── _journal.json │ │ └── sqlite/ │ │ ├── 0000_fancy_bug.sql │ │ └── meta/ │ │ ├── 0000_snapshot.json │ │ └── _journal.json │ ├── js-tests/ │ │ └── driver-init/ │ │ ├── commonjs/ │ │ │ ├── better-sqlite3.test.cjs │ │ │ ├── libsql.test.cjs │ │ │ ├── mysql2.test.cjs │ │ │ ├── neon-http.test.cjs │ │ │ ├── neon-ws.test.cjs │ │ │ ├── node-pg.test.cjs │ │ │ ├── pglite.test.cjs │ │ │ ├── planetscale.test.cjs │ │ │ ├── postgres-js.test.cjs │ │ │ ├── schema.cjs │ │ │ ├── tidb.test.cjs │ │ │ └── vercel.test.cjs │ │ └── module/ │ │ ├── better-sqlite3.test.mjs │ │ ├── libsql.test.mjs │ │ ├── mysql2.test.mjs │ │ ├── neon-http.test.mjs │ │ ├── neon-ws.test.mjs │ │ ├── node-pg.test.mjs │ │ ├── pglite.test.mjs │ │ ├── planetscale.test.mjs │ │ ├── postgres-js.test.mjs │ │ ├── schema.mjs │ │ ├── tidb.test.mjs │ │ └── vercel.test.mjs │ ├── package.json │ ├── sst-env.d.ts │ ├── sst.config.ts │ ├── tests/ │ │ ├── awsdatapi.alltypes.test.ts │ │ ├── bun/ │ │ │ ├── bun-sql.test.ts │ │ │ ├── sqlite-nw.test.ts │ │ │ └── sqlite.test.ts │ │ ├── common.ts │ │ ├── extensions/ │ │ │ ├── postgis/ │ │ │ │ ├── pg.test.ts │ │ │ │ └── postgres.test.ts │ │ │ └── vectors/ │ │ │ ├── pg.test.ts │ │ │ └── postgres.test.ts │ │ ├── gel/ │ │ │ ├── cache.ts │ │ │ ├── createInstance.ts │ │ │ ├── gel-custom.test.ts │ │ │ ├── gel-ext.test.ts │ │ │ └── gel.test.ts │ │ ├── imports/ │ │ │ └── index.test.ts │ │ ├── mysql/ │ │ │ ├── mysql-common-cache.ts │ │ │ ├── mysql-common.ts │ │ │ ├── mysql-custom.test.ts │ │ │ ├── mysql-planetscale.test.ts │ │ │ ├── mysql-prefixed.test.ts │ │ │ ├── mysql-proxy.test.ts │ │ │ ├── mysql.test.ts │ │ │ └── tidb-serverless.test.ts │ │ ├── mysql-returning.test.ts │ │ ├── pg/ │ │ │ ├── awsdatapi.test.ts │ │ │ ├── neon-http-batch.test.ts │ │ │ ├── neon-http-batch.ts │ │ │ ├── neon-http.test.ts │ │ │ ├── neon-serverless.test.ts │ │ │ ├── node-postgres.test.ts │ │ │ ├── pg-common-cache.ts │ │ │ ├── pg-common.ts │ │ │ ├── pg-custom.test.ts │ │ │ ├── pg-proxy.test.ts │ │ │ ├── pglite.test.ts │ │ │ ├── postgres-js.test.ts │ │ │ ├── rls/ │ │ │ │ └── rls.definition.test.ts │ │ │ ├── vercel-pg.test.ts │ │ │ └── xata-http.test.ts │ │ ├── relational/ │ │ │ ├── bettersqlite.test.ts │ │ │ ├── db.ts │ │ │ ├── issues-schemas/ │ │ │ │ ├── duplicates/ │ │ │ │ │ ├── mysql/ │ │ │ │ │ │ ├── mysql.duplicates.test.ts │ │ │ │ │ │ └── mysql.duplicates.ts │ │ │ │ │ └── pg/ │ │ │ │ │ ├── pg.duplicates.test.ts │ │ │ │ │ └── pg.duplicates.ts │ │ │ │ └── wrong-mapping/ │ │ │ │ ├── pg.schema.ts │ │ │ │ └── pg.test.ts │ │ │ ├── mysql.planetscale.test.ts │ │ │ ├── mysql.schema.ts │ │ │ ├── mysql.test.ts │ │ │ ├── pg.postgresjs.test.ts │ │ │ ├── pg.schema.ts │ │ │ ├── pg.test.ts │ │ │ ├── singlestore.schema.ts │ │ │ ├── singlestore.test.ts │ │ │ ├── sqlite.schema.ts │ │ │ ├── tables.ts │ │ │ ├── turso.test.ts │ │ │ └── vercel.test.ts │ │ ├── replicas/ │ │ │ ├── mysql.test.ts │ │ │ ├── postgres.test.ts │ │ │ ├── singlestore.test.ts │ │ │ └── sqlite.test.ts │ │ ├── seeder/ │ │ │ ├── mysql.test.ts │ │ │ ├── mysqlSchema.ts │ │ │ ├── pg.test.ts │ │ │ ├── pgSchema.ts │ │ │ ├── sqlite.test.ts │ │ │ └── sqliteSchema.ts │ │ ├── singlestore/ │ │ │ ├── singlestore-cache.ts │ │ │ ├── singlestore-common.ts │ │ │ ├── singlestore-custom.test.ts │ │ │ ├── singlestore-prefixed.test.ts │ │ │ ├── singlestore-proxy.test.ts │ │ │ └── singlestore.test.ts │ │ ├── sqlite/ │ │ │ ├── better-sqlite.test.ts │ │ │ ├── d1-batch.test.ts │ │ │ ├── d1.test.ts │ │ │ ├── durable-objects/ │ │ │ │ ├── drizzle/ │ │ │ │ │ ├── 0000_cuddly_black_bolt.sql │ │ │ │ │ ├── meta/ │ │ │ │ │ │ ├── 0000_snapshot.json │ │ │ │ │ │ └── _journal.json │ │ │ │ │ └── migrations.js │ │ │ │ ├── index.ts │ │ │ │ ├── worker-configuration.d.ts │ │ │ │ └── wrangler.toml │ │ │ ├── libsql-batch.test.ts │ │ │ ├── libsql-http.test.ts │ │ │ ├── libsql-node.test.ts │ │ │ ├── libsql-sqlite3.test.ts │ │ │ ├── libsql-ws.test.ts │ │ │ ├── libsql.test.ts │ │ │ ├── sql-js.test.ts │ │ │ ├── sqlite-common-cache.ts │ │ │ ├── sqlite-common.ts │ │ │ ├── sqlite-proxy-batch.test.ts │ │ │ └── sqlite-proxy.test.ts │ │ ├── utils/ │ │ │ └── is-config.test.ts │ │ ├── utils.ts │ │ ├── version.test.ts │ │ └── xata/ │ │ └── xata.ts │ ├── tsconfig.json │ ├── type-tests/ │ │ └── join-nodenext/ │ │ ├── gel.ts │ │ ├── mysql.ts │ │ ├── package.json │ │ ├── pg.ts │ │ ├── singlestore.ts │ │ ├── sqlite.ts │ │ └── tsconfig.json │ ├── vitest-ci.config.ts │ └── vitest.config.ts ├── package.json ├── patches/ │ └── typescript@5.6.3.patch ├── pnpm-workspace.yaml ├── tsconfig.json └── turbo.json
Showing preview only (522K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5785 symbols across 620 files)
FILE: drizzle-arktype/scripts/fix-imports.ts
function resolvePathAlias (line 8) | function resolvePathAlias(importPath: string, file: string) {
function fixImportPath (line 17) | function fixImportPath(importPath: string, file: string, ext: string) {
method visitImportDeclaration (line 33) | visitImportDeclaration(path) {
method visitExportAllDeclaration (line 37) | visitExportAllDeclaration(path) {
method visitExportNamedDeclaration (line 41) | visitExportNamedDeclaration(path) {
method visitCallExpression (line 47) | visitCallExpression(path) {
method visitTSImportType (line 53) | visitTSImportType(path) {
method visitAwaitExpression (line 57) | visitAwaitExpression(path) {
method visitImportDeclaration (line 74) | visitImportDeclaration(path) {
method visitExportAllDeclaration (line 78) | visitExportAllDeclaration(path) {
method visitExportNamedDeclaration (line 82) | visitExportNamedDeclaration(path) {
method visitTSImportType (line 88) | visitTSImportType(path) {
method visitAwaitExpression (line 92) | visitAwaitExpression(path) {
method visitImportDeclaration (line 109) | visitImportDeclaration(path) {
method visitExportAllDeclaration (line 113) | visitExportAllDeclaration(path) {
method visitExportNamedDeclaration (line 117) | visitExportNamedDeclaration(path) {
method visitTSImportType (line 123) | visitTSImportType(path) {
method visitAwaitExpression (line 127) | visitAwaitExpression(path) {
FILE: drizzle-arktype/src/column.ts
function columnToSchema (line 66) | function columnToSchema(column: Column): Type {
function numberColumnToSchema (line 128) | function numberColumnToSchema(column: Column): Type<number, any> {
function bigintColumnToSchema (line 239) | function bigintColumnToSchema(column: Column): Type {
function stringColumnToSchema (line 244) | function stringColumnToSchema(column: Column): Type {
FILE: drizzle-arktype/src/column.types.ts
type ArktypeNullable (line 5) | type ArktypeNullable<TSchema> = Type<type.infer<TSchema> | null>;
type ArktypeOptional (line 7) | type ArktypeOptional<TSchema> = [Type<type.infer<TSchema>>, '?'];
type GetArktypeType (line 9) | type GetArktypeType<
type HandleSelectColumn (line 16) | type HandleSelectColumn<
type HandleInsertColumn (line 22) | type HandleInsertColumn<
type HandleUpdateColumn (line 29) | type HandleUpdateColumn<
type HandleColumn (line 35) | type HandleColumn<
FILE: drizzle-arktype/src/constants.ts
constant CONSTANTS (line 1) | const CONSTANTS = {
FILE: drizzle-arktype/src/schema.ts
function getColumns (line 10) | function getColumns(tableLike: Table | View) {
function handleColumns (line 14) | function handleColumns(
FILE: drizzle-arktype/src/schema.types.internal.ts
type Conditions (line 6) | interface Conditions {
type GenericSchema (line 12) | type GenericSchema = type.cast<unknown> | [type.cast<unknown>, '?'];
type BuildRefineField (line 14) | type BuildRefineField<T> = T extends GenericSchema ? ((schema: T) => Gen...
type BuildRefine (line 16) | type BuildRefine<
type HandleRefinement (line 24) | type HandleRefinement<
type IsRefinementDefined (line 36) | type IsRefinementDefined<
type BuildSchema (line 43) | type BuildSchema<
type NoUnknownKeys (line 65) | type NoUnknownKeys<
FILE: drizzle-arktype/src/schema.types.ts
type CreateSelectSchema (line 6) | interface CreateSelectSchema {
type CreateInsertSchema (line 28) | interface CreateInsertSchema {
type CreateUpdateSchema (line 39) | interface CreateUpdateSchema {
FILE: drizzle-arktype/src/utils.ts
function isColumnType (line 6) | function isColumnType<T extends Column>(column: Column, columnTypes: str...
function isWithEnum (line 10) | function isWithEnum(column: Column): column is typeof column & { enumVal...
type Literal (line 16) | type Literal = type.infer<typeof literalSchema>;
type Json (line 17) | type Json = Literal | Record<string, any> | any[];
type ColumnIsGeneratedAlwaysAs (line 19) | type ColumnIsGeneratedAlwaysAs<TColumn> = TColumn extends Column
type GetSelection (line 25) | type GetSelection<T extends SelectedFieldsFlat<Column> | Table | View> =...
FILE: drizzle-arktype/tests/utils.ts
function expectSchemaShape (line 4) | function expectSchemaShape<T extends Type<any, any>>(t: TaskContext, exp...
function Expect (line 15) | function Expect<_ extends true>() {}
FILE: drizzle-kit/imports-checker/analyze.ts
type CollectionItem (line 5) | type CollectionItem = {
function recursiveRun (line 10) | function recursiveRun(...args: Node[]): boolean {
function init (line 38) | function init(collection: CollectionItem[]) {
function analyze (line 69) | function analyze(path: string) {
FILE: drizzle-kit/imports-checker/checker.ts
type External (line 6) | type External = {
type Issue (line 12) | type Issue = {
type IssueImport (line 18) | type IssueImport = {
type ChainLink (line 23) | type ChainLink = {
type ListMode (line 28) | type ListMode = 'whitelist' | 'blacklist';
class ImportAnalyzer (line 30) | class ImportAnalyzer {
method constructor (line 39) | constructor(
type CustomLocalPathResolver (line 239) | type CustomLocalPathResolver = (
type AnalyzeImportsConfig (line 245) | type AnalyzeImportsConfig =
type AnyAnalyzeImportsConfig (line 262) | type AnyAnalyzeImportsConfig = {
function analyzeImports (line 272) | function analyzeImports(cfg: AnalyzeImportsConfig) {
FILE: drizzle-kit/imports-checker/grammar/grammar.ohm-bundle.d.ts
type JSImportsActionDict (line 6) | interface JSImportsActionDict<T> extends BaseActionDict<T> {
type JSImportsSemantics (line 151) | interface JSImportsSemantics extends Semantics {
type JSImportsGrammar (line 158) | interface JSImportsGrammar extends Grammar {
FILE: drizzle-kit/src/@types/utils.ts
type String (line 2) | interface String {
type Array (line 12) | interface Array<T> {
FILE: drizzle-kit/src/api.ts
type DrizzleSnapshotJSON (line 59) | type DrizzleSnapshotJSON = PgSchemaKit;
type DrizzleSQLiteSnapshotJSON (line 60) | type DrizzleSQLiteSnapshotJSON = SQLiteSchemaKit;
type DrizzleMySQLSnapshotJSON (line 61) | type DrizzleMySQLSnapshotJSON = MySQLSchemaKit;
type DrizzleSingleStoreSnapshotJSON (line 62) | type DrizzleSingleStoreSnapshotJSON = SingleStoreSchemaKit;
FILE: drizzle-kit/src/cli/commands/migrate.ts
type Named (line 59) | type Named = {
type NamedWithSchema (line 63) | type NamedWithSchema = {
function mysqlSchemaSuggestions (line 440) | function mysqlSchemaSuggestions(
function singleStoreSchemaSuggestions (line 589) | function singleStoreSchemaSuggestions(
constant BREAKPOINT (line 1354) | const BREAKPOINT = '--> statement-breakpoint\n';
FILE: drizzle-kit/src/cli/commands/pgPushUtils.ts
function concatSchemaAndTableName (line 40) | function concatSchemaAndTableName(schema: string | undefined, table: str...
function tableNameWithSchemaFrom (line 44) | function tableNameWithSchemaFrom(
FILE: drizzle-kit/src/cli/commands/singlestorePushUtils.ts
function findColumnTypeAlternations (line 109) | function findColumnTypeAlternations(
FILE: drizzle-kit/src/cli/commands/utils.ts
class InMemoryMutex (line 54) | class InMemoryMutex {
method withLock (line 57) | async withLock<T>(fn: () => Promise<T>): Promise<T> {
type GenerateConfig (line 150) | type GenerateConfig = {
type ExportConfig (line 163) | type ExportConfig = {
FILE: drizzle-kit/src/cli/connections.ts
type D1Credentials (line 923) | type D1Credentials = {
type D1Response (line 1015) | type D1Response =
type Transaction (line 1168) | type Transaction = Awaited<ReturnType<typeof client.transaction>>;
type Transaction (line 1317) | type Transaction = Awaited<ReturnType<typeof client.transaction>>;
FILE: drizzle-kit/src/cli/selector-ui.ts
class Select (line 4) | class Select extends Prompt<{ index: number; value: string }> {
method constructor (line 7) | constructor(items: string[]) {
method render (line 18) | render(status: 'idle' | 'submitted' | 'aborted'): string {
method result (line 32) | result() {
FILE: drizzle-kit/src/cli/validations/cli.ts
type CliConfigGenerate (line 16) | type CliConfigGenerate = TypeOf<typeof cliConfigGenerate>;
type PushParams (line 38) | type PushParams = TypeOf<typeof pushParams>;
type Entities (line 63) | type Entities = TypeOf<typeof pullParams>['entities'];
type PullParams (line 65) | type PullParams = TypeOf<typeof pullParams>;
type CliCheckConfig (line 79) | type CliCheckConfig = TypeOf<typeof cliConfigCheck>;
FILE: drizzle-kit/src/cli/validations/common.ts
type Commands (line 7) | type Commands =
type Expand (line 16) | type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
type IsUnion (line 17) | type IsUnion<T> = [T] extends [UnionToIntersection<T>] ? false : true;
type LastTupleElement (line 18) | type LastTupleElement<TArr extends any[]> = TArr extends [
type UniqueArrayOfUnion (line 24) | type UniqueArrayOfUnion<TUnion, TArray extends TUnion[]> = Exclude<
type Prefix (line 83) | type Prefix = (typeof prefixes)[number];
type CasingType (line 91) | type CasingType = (typeof casingTypes)[number];
type IntrospectParams (line 133) | type IntrospectParams = TypeOf<typeof introspectParams>;
type Casing (line 134) | type Casing = TypeOf<typeof casing>;
type GenerateSchema (line 153) | type GenerateSchema = TypeOf<typeof configGenerateSchema>;
type CliConfig (line 165) | type CliConfig = TypeOf<typeof configCommonSchema>;
type Driver (line 167) | type Driver = (typeof drivers)[number];
FILE: drizzle-kit/src/cli/validations/gel.ts
type GelCredentials (line 50) | type GelCredentials = TypeOf<typeof gelCredentials>;
FILE: drizzle-kit/src/cli/validations/libsql.ts
type LibSQLCredentials (line 11) | type LibSQLCredentials = {
FILE: drizzle-kit/src/cli/validations/mysql.ts
type MysqlCredentials (line 32) | type MysqlCredentials = TypeOf<typeof mysqlCredentials>;
FILE: drizzle-kit/src/cli/validations/postgres.ts
type PostgresCredentials (line 44) | type PostgresCredentials = TypeOf<typeof postgresCredentials>;
FILE: drizzle-kit/src/cli/validations/singlestore.ts
type SingleStoreCredentials (line 32) | type SingleStoreCredentials = TypeOf<typeof singlestoreCredentials>;
FILE: drizzle-kit/src/cli/validations/sqlite.ts
type SqliteCredentials (line 27) | type SqliteCredentials =
FILE: drizzle-kit/src/cli/validations/studio.ts
type Credentials (line 14) | type Credentials = TypeOf<typeof credentials>;
FILE: drizzle-kit/src/cli/views.ts
type TableEntry (line 26) | type TableEntry = (typeof schema)['tables'][keyof (typeof schema)['table...
type RenamePropmtItem (line 78) | interface RenamePropmtItem<T> {
class ResolveColumnSelect (line 89) | class ResolveColumnSelect<T extends Named> extends Prompt<
method constructor (line 94) | constructor(
method render (line 105) | render(status: 'idle' | 'submitted' | 'aborted'): string {
method result (line 156) | result(): RenamePropmtItem<T> | T {
class ResolveSelectNamed (line 167) | class ResolveSelectNamed<T extends Named> extends Prompt<
method constructor (line 172) | constructor(
method render (line 183) | render(status: 'idle' | 'submitted' | 'aborted'): string {
method result (line 232) | result(): RenamePropmtItem<T> | T {
class ResolveSelect (line 237) | class ResolveSelect<T extends NamedWithSchema> extends Prompt<
method constructor (line 242) | constructor(
method render (line 254) | render(status: 'idle' | 'submitted' | 'aborted'): string {
method result (line 303) | result(): RenamePropmtItem<T> | T {
class ResolveSchemasSelect (line 308) | class ResolveSchemasSelect<T extends Named> extends Prompt<
method constructor (line 313) | constructor(private readonly base: Named, data: (RenamePropmtItem<T> |...
method render (line 321) | render(status: 'idle' | 'submitted' | 'aborted'): string {
method result (line 366) | result(): RenamePropmtItem<T> | T {
class Spinner (line 371) | class Spinner {
method constructor (line 375) | constructor(private readonly frames: string[]) {
type ValueOf (line 402) | type ValueOf<T> = T[keyof T];
type IntrospectStatus (line 403) | type IntrospectStatus = 'fetching' | 'done';
type IntrospectStage (line 404) | type IntrospectStage =
type IntrospectState (line 414) | type IntrospectState = {
class IntrospectProgress (line 422) | class IntrospectProgress extends TaskView {
method constructor (line 469) | constructor(private readonly hasEnums: boolean = false) {
method update (line 479) | public update(
method render (line 512) | render(): string {
class MigrateProgress (line 528) | class MigrateProgress extends TaskView {
method constructor (line 532) | constructor() {
method render (line 542) | render(status: 'pending' | 'done' | 'rejected'): string {
class ProgressView (line 551) | class ProgressView extends TaskView {
method constructor (line 555) | constructor(
method render (line 568) | render(status: 'pending' | 'done' | 'rejected'): string {
class DropMigrationView (line 577) | class DropMigrationView<T extends { tag: string }> extends Prompt<T> {
method constructor (line 580) | constructor(data: T[]) {
method render (line 588) | render(status: 'idle' | 'submitted' | 'aborted'): string {
method result (line 621) | result(): T {
FILE: drizzle-kit/src/global.ts
function assertUnreachable (line 4) | function assertUnreachable(x: never | undefined): never {
function softAssertUnreachable (line 9) | function softAssertUnreachable(x: never) {
FILE: drizzle-kit/src/index.ts
type SslOptions (line 6) | type SslOptions = {
type Verify (line 17) | type Verify<T, U extends T> = U;
type Config (line 109) | type Config =
function defineConfig (line 347) | function defineConfig(config: Config) {
FILE: drizzle-kit/src/introspect-gel.ts
function generateIdentityParams (line 179) | function generateIdentityParams(identity: Column['identity']) {
function reverseLogic (line 963) | function reverseLogic(mappedWith: Record<string, string>): string {
FILE: drizzle-kit/src/introspect-pg.ts
function findColumnKey (line 214) | function findColumnKey(table: AnyPgTable, columnName: string) {
function generateIdentityParams (line 277) | function generateIdentityParams(identity: Column['identity']) {
function reverseLogic (line 1241) | function reverseLogic(mappedWith: Record<string, string>): string {
FILE: drizzle-kit/src/jsonDiffer.js
function diffForRenamedTables (line 4) | function diffForRenamedTables(pairs) {
function diffForRenamedTable (line 21) | function diffForRenamedTable(t1, t2) {
function diffForRenamedColumn (line 29) | function diffForRenamedColumn(t1, t2) {
function diffSchemasOrTables (line 90) | function diffSchemasOrTables(left, right) {
function diffIndPolicies (line 106) | function diffIndPolicies(left, right) {
function diffColumns (line 122) | function diffColumns(left, right) {
function diffPolicies (line 165) | function diffPolicies(left, right) {
function applyJsonDiff (line 208) | function applyJsonDiff(json1, json2) {
FILE: drizzle-kit/src/jsonStatements.ts
type JsonSqliteCreateTableStatement (line 27) | interface JsonSqliteCreateTableStatement {
type JsonCreateTableStatement (line 45) | interface JsonCreateTableStatement {
type JsonRecreateTableStatement (line 59) | interface JsonRecreateTableStatement {
type JsonRecreateSingleStoreTableStatement (line 77) | interface JsonRecreateSingleStoreTableStatement {
type JsonDropTableStatement (line 85) | interface JsonDropTableStatement {
type JsonRenameTableStatement (line 92) | interface JsonRenameTableStatement {
type JsonCreateEnumStatement (line 100) | interface JsonCreateEnumStatement {
type JsonDropEnumStatement (line 107) | interface JsonDropEnumStatement {
type JsonMoveEnumStatement (line 113) | interface JsonMoveEnumStatement {
type JsonRenameEnumStatement (line 120) | interface JsonRenameEnumStatement {
type JsonAddValueToEnumStatement (line 127) | interface JsonAddValueToEnumStatement {
type JsonCreateRoleStatement (line 137) | interface JsonCreateRoleStatement {
type JsonDropRoleStatement (line 147) | interface JsonDropRoleStatement {
type JsonRenameRoleStatement (line 151) | interface JsonRenameRoleStatement {
type JsonAlterRoleStatement (line 157) | interface JsonAlterRoleStatement {
type JsonDropValueFromEnumStatement (line 169) | interface JsonDropValueFromEnumStatement {
type JsonCreateSequenceStatement (line 178) | interface JsonCreateSequenceStatement {
type JsonDropSequenceStatement (line 192) | interface JsonDropSequenceStatement {
type JsonMoveSequenceStatement (line 198) | interface JsonMoveSequenceStatement {
type JsonRenameSequenceStatement (line 205) | interface JsonRenameSequenceStatement {
type JsonAlterSequenceStatement (line 212) | interface JsonAlterSequenceStatement {
type JsonDropColumnStatement (line 226) | interface JsonDropColumnStatement {
type JsonAddColumnStatement (line 233) | interface JsonAddColumnStatement {
type JsonSqliteAddColumnStatement (line 240) | interface JsonSqliteAddColumnStatement {
type JsonCreatePolicyStatement (line 247) | interface JsonCreatePolicyStatement {
type JsonCreateIndPolicyStatement (line 254) | interface JsonCreateIndPolicyStatement {
type JsonDropPolicyStatement (line 260) | interface JsonDropPolicyStatement {
type JsonDropIndPolicyStatement (line 267) | interface JsonDropIndPolicyStatement {
type JsonRenamePolicyStatement (line 273) | interface JsonRenamePolicyStatement {
type JsonIndRenamePolicyStatement (line 281) | interface JsonIndRenamePolicyStatement {
type JsonEnableRLSStatement (line 288) | interface JsonEnableRLSStatement {
type JsonDisableRLSStatement (line 294) | interface JsonDisableRLSStatement {
type JsonAlterPolicyStatement (line 300) | interface JsonAlterPolicyStatement {
type JsonAlterIndPolicyStatement (line 308) | interface JsonAlterIndPolicyStatement {
type JsonCreateIndexStatement (line 314) | interface JsonCreateIndexStatement {
type JsonPgCreateIndexStatement (line 322) | interface JsonPgCreateIndexStatement {
type JsonReferenceStatement (line 329) | interface JsonReferenceStatement {
type JsonCreateUniqueConstraint (line 347) | interface JsonCreateUniqueConstraint {
type JsonDeleteUniqueConstraint (line 355) | interface JsonDeleteUniqueConstraint {
type JsonAlterUniqueConstraint (line 363) | interface JsonAlterUniqueConstraint {
type JsonCreateCheckConstraint (line 373) | interface JsonCreateCheckConstraint {
type JsonDeleteCheckConstraint (line 380) | interface JsonDeleteCheckConstraint {
type JsonCreateCompositePK (line 387) | interface JsonCreateCompositePK {
type JsonDeleteCompositePK (line 395) | interface JsonDeleteCompositePK {
type JsonAlterCompositePK (line 403) | interface JsonAlterCompositePK {
type JsonAlterTableSetSchema (line 413) | interface JsonAlterTableSetSchema {
type JsonAlterTableRemoveFromSchema (line 420) | interface JsonAlterTableRemoveFromSchema {
type JsonAlterTableSetNewSchema (line 426) | interface JsonAlterTableSetNewSchema {
type JsonCreateReferenceStatement (line 433) | interface JsonCreateReferenceStatement extends JsonReferenceStatement {
type JsonAlterReferenceStatement (line 437) | interface JsonAlterReferenceStatement extends JsonReferenceStatement {
type JsonDeleteReferenceStatement (line 442) | interface JsonDeleteReferenceStatement extends JsonReferenceStatement {
type JsonDropIndexStatement (line 446) | interface JsonDropIndexStatement {
type JsonRenameColumnStatement (line 453) | interface JsonRenameColumnStatement {
type JsonAlterColumnTypeStatement (line 461) | interface JsonAlterColumnTypeStatement {
type JsonAlterColumnPgTypeStatement (line 476) | interface JsonAlterColumnPgTypeStatement {
type JsonAlterColumnSetPrimaryKeyStatement (line 492) | interface JsonAlterColumnSetPrimaryKeyStatement {
type JsonAlterColumnDropPrimaryKeyStatement (line 499) | interface JsonAlterColumnDropPrimaryKeyStatement {
type JsonAlterColumnSetDefaultStatement (line 506) | interface JsonAlterColumnSetDefaultStatement {
type JsonAlterColumnDropDefaultStatement (line 520) | interface JsonAlterColumnDropDefaultStatement {
type JsonAlterColumnSetNotNullStatement (line 533) | interface JsonAlterColumnSetNotNullStatement {
type JsonAlterColumnDropNotNullStatement (line 546) | interface JsonAlterColumnDropNotNullStatement {
type JsonAlterColumnSetGeneratedStatement (line 559) | interface JsonAlterColumnSetGeneratedStatement {
type JsonAlterColumnSetIdentityStatement (line 572) | interface JsonAlterColumnSetIdentityStatement {
type JsonAlterColumnDropIdentityStatement (line 580) | interface JsonAlterColumnDropIdentityStatement {
type JsonAlterColumnAlterIdentityStatement (line 587) | interface JsonAlterColumnAlterIdentityStatement {
type JsonAlterColumnDropGeneratedStatement (line 596) | interface JsonAlterColumnDropGeneratedStatement {
type JsonAlterColumnAlterGeneratedStatement (line 611) | interface JsonAlterColumnAlterGeneratedStatement {
type JsonAlterColumnSetOnUpdateStatement (line 625) | interface JsonAlterColumnSetOnUpdateStatement {
type JsonAlterColumnDropOnUpdateStatement (line 638) | interface JsonAlterColumnDropOnUpdateStatement {
type JsonAlterColumnSetAutoincrementStatement (line 651) | interface JsonAlterColumnSetAutoincrementStatement {
type JsonAlterColumnDropAutoincrementStatement (line 664) | interface JsonAlterColumnDropAutoincrementStatement {
type JsonCreateSchema (line 677) | interface JsonCreateSchema {
type JsonDropSchema (line 682) | interface JsonDropSchema {
type JsonRenameSchema (line 687) | interface JsonRenameSchema {
type JsonCreatePgViewStatement (line 693) | type JsonCreatePgViewStatement = {
type JsonCreateMySqlViewStatement (line 697) | type JsonCreateMySqlViewStatement = {
type JsonCreateSqliteViewStatement (line 707) | type JsonCreateSqliteViewStatement = {
type JsonDropViewStatement (line 711) | interface JsonDropViewStatement {
type JsonRenameViewStatement (line 718) | interface JsonRenameViewStatement {
type JsonRenameMySqlViewStatement (line 726) | interface JsonRenameMySqlViewStatement {
type JsonAlterViewAlterSchemaStatement (line 734) | interface JsonAlterViewAlterSchemaStatement {
type JsonAlterViewAddWithOptionStatement (line 742) | type JsonAlterViewAddWithOptionStatement =
type JsonAlterViewDropWithOptionStatement (line 756) | type JsonAlterViewDropWithOptionStatement =
type JsonAlterViewAlterTablespaceStatement (line 770) | interface JsonAlterViewAlterTablespaceStatement {
type JsonAlterViewAlterUsingStatement (line 778) | interface JsonAlterViewAlterUsingStatement {
type JsonAlterMySqlViewStatement (line 786) | type JsonAlterMySqlViewStatement = {
type JsonAlterViewStatement (line 794) | type JsonAlterViewStatement =
type JsonAlterColumnStatement (line 801) | type JsonAlterColumnStatement =
type JsonStatement (line 822) | type JsonStatement =
FILE: drizzle-kit/src/loader.mjs
function resolve (line 16) | function resolve(specifier, context, nextResolve) {
function load (line 38) | async function load(url, context, defaultLoad) {
FILE: drizzle-kit/src/schemaValidator.ts
type Dialect (line 10) | type Dialect = (typeof dialects)[number];
type CommonSquashedSchema (line 22) | type CommonSquashedSchema = TypeOf<typeof commonSquashedSchema>;
type CommonSchema (line 23) | type CommonSchema = TypeOf<typeof commonSchema>;
FILE: drizzle-kit/src/serializer/gelSchema.ts
type IndexColumnType (line 24) | type IndexColumnType = TypeOf<typeof indexColumn>;
type Enum (line 274) | type Enum = TypeOf<typeof enumSchema>;
type Sequence (line 275) | type Sequence = TypeOf<typeof sequenceSchema>;
type Role (line 276) | type Role = TypeOf<typeof roleSchema>;
type Column (line 277) | type Column = TypeOf<typeof column>;
type Table (line 278) | type Table = TypeOf<typeof table>;
type GelSchema (line 279) | type GelSchema = TypeOf<typeof gelSchema>;
type GelSchemaInternal (line 280) | type GelSchemaInternal = TypeOf<typeof gelSchemaInternal>;
type GelSchemaExternal (line 281) | type GelSchemaExternal = TypeOf<typeof gelSchemaExternal>;
type GelSchemaSquashed (line 282) | type GelSchemaSquashed = TypeOf<typeof gelSchemaSquashed>;
type Index (line 283) | type Index = TypeOf<typeof index>;
type ForeignKey (line 284) | type ForeignKey = TypeOf<typeof fk>;
type PrimaryKey (line 285) | type PrimaryKey = TypeOf<typeof compositePK>;
type UniqueConstraint (line 286) | type UniqueConstraint = TypeOf<typeof uniqueConstraint>;
type Policy (line 287) | type Policy = TypeOf<typeof policy>;
type View (line 288) | type View = TypeOf<typeof view>;
type MatViewWithOption (line 289) | type MatViewWithOption = TypeOf<typeof matViewWithOption>;
type ViewWithOption (line 290) | type ViewWithOption = TypeOf<typeof viewWithOption>;
type GelKitInternals (line 292) | type GelKitInternals = TypeOf<typeof kitInternals>;
type CheckConstraint (line 293) | type CheckConstraint = TypeOf<typeof checkConstraint>;
FILE: drizzle-kit/src/serializer/gelSerializer.ts
function stringFromIdentityProperty (line 44) | function stringFromIdentityProperty(field: string | number | undefined):...
function maxRangeForIdentityBasedOn (line 48) | function maxRangeForIdentityBasedOn(columnType: string) {
function minRangeForIdentityBasedOn (line 52) | function minRangeForIdentityBasedOn(columnType: string) {
function stringFromDatabaseIdentityProperty (line 56) | function stringFromDatabaseIdentityProperty(field: any): string | undefi...
function buildArrayString (line 66) | function buildArrayString(array: any[], sqlType: string): string {
function prepareRoles (line 912) | function prepareRoles(entities?: {
FILE: drizzle-kit/src/serializer/mysqlSchema.ts
type SquasherViewMeta (line 90) | type SquasherViewMeta = Omit<TypeOf<typeof viewMeta>, 'definer'>;
type Dialect (line 202) | type Dialect = TypeOf<typeof dialect>;
type Column (line 203) | type Column = TypeOf<typeof column>;
type Table (line 204) | type Table = TypeOf<typeof table>;
type TableV4 (line 205) | type TableV4 = TypeOf<typeof tableV4>;
type MySqlSchema (line 206) | type MySqlSchema = TypeOf<typeof schema>;
type MySqlSchemaV3 (line 207) | type MySqlSchemaV3 = TypeOf<typeof schemaV3>;
type MySqlSchemaV4 (line 208) | type MySqlSchemaV4 = TypeOf<typeof schemaV4>;
type MySqlSchemaV5 (line 209) | type MySqlSchemaV5 = TypeOf<typeof schemaV5>;
type MySqlSchemaInternal (line 210) | type MySqlSchemaInternal = TypeOf<typeof schemaInternal>;
type MySqlKitInternals (line 211) | type MySqlKitInternals = TypeOf<typeof kitInternals>;
type MySqlSchemaSquashed (line 212) | type MySqlSchemaSquashed = TypeOf<typeof schemaSquashed>;
type MySqlSchemaSquashedV4 (line 213) | type MySqlSchemaSquashedV4 = TypeOf<typeof schemaSquashedV4>;
type Index (line 214) | type Index = TypeOf<typeof index>;
type ForeignKey (line 215) | type ForeignKey = TypeOf<typeof fk>;
type PrimaryKey (line 216) | type PrimaryKey = TypeOf<typeof compositePK>;
type UniqueConstraint (line 217) | type UniqueConstraint = TypeOf<typeof uniqueConstraint>;
type CheckConstraint (line 218) | type CheckConstraint = TypeOf<typeof checkConstraint>;
type View (line 219) | type View = TypeOf<typeof view>;
type ViewSquashed (line 220) | type ViewSquashed = TypeOf<typeof viewSquashed>;
FILE: drizzle-kit/src/serializer/mysqlSerializer.ts
function clearDefaults (line 543) | function clearDefaults(defaultValue: any, collate: string) {
FILE: drizzle-kit/src/serializer/pgSchema.ts
type IndexColumnType (line 86) | type IndexColumnType = TypeOf<typeof indexColumn>;
type Enum (line 511) | type Enum = TypeOf<typeof enumSchema>;
type Sequence (line 512) | type Sequence = TypeOf<typeof sequenceSchema>;
type Role (line 513) | type Role = TypeOf<typeof roleSchema>;
type Column (line 514) | type Column = TypeOf<typeof column>;
type TableV3 (line 515) | type TableV3 = TypeOf<typeof tableV3>;
type TableV4 (line 516) | type TableV4 = TypeOf<typeof tableV4>;
type TableV5 (line 517) | type TableV5 = TypeOf<typeof tableV5>;
type Table (line 518) | type Table = TypeOf<typeof table>;
type PgSchema (line 519) | type PgSchema = TypeOf<typeof pgSchema>;
type PgSchemaInternal (line 520) | type PgSchemaInternal = TypeOf<typeof pgSchemaInternal>;
type PgSchemaV6Internal (line 521) | type PgSchemaV6Internal = TypeOf<typeof pgSchemaInternalV6>;
type PgSchemaExternal (line 522) | type PgSchemaExternal = TypeOf<typeof pgSchemaExternal>;
type PgSchemaSquashed (line 523) | type PgSchemaSquashed = TypeOf<typeof pgSchemaSquashed>;
type PgSchemaSquashedV4 (line 524) | type PgSchemaSquashedV4 = TypeOf<typeof pgSchemaSquashedV4>;
type PgSchemaSquashedV6 (line 525) | type PgSchemaSquashedV6 = TypeOf<typeof pgSchemaSquashedV6>;
type Index (line 526) | type Index = TypeOf<typeof index>;
type ForeignKey (line 527) | type ForeignKey = TypeOf<typeof fk>;
type PrimaryKey (line 528) | type PrimaryKey = TypeOf<typeof compositePK>;
type UniqueConstraint (line 529) | type UniqueConstraint = TypeOf<typeof uniqueConstraint>;
type Policy (line 530) | type Policy = TypeOf<typeof policy>;
type View (line 531) | type View = TypeOf<typeof view>;
type MatViewWithOption (line 532) | type MatViewWithOption = TypeOf<typeof matViewWithOption>;
type ViewWithOption (line 533) | type ViewWithOption = TypeOf<typeof viewWithOption>;
type PgKitInternals (line 535) | type PgKitInternals = TypeOf<typeof kitInternals>;
type CheckConstraint (line 536) | type CheckConstraint = TypeOf<typeof checkConstraint>;
type PgSchemaV1 (line 538) | type PgSchemaV1 = TypeOf<typeof pgSchemaV1>;
type PgSchemaV2 (line 539) | type PgSchemaV2 = TypeOf<typeof pgSchemaV2>;
type PgSchemaV3 (line 540) | type PgSchemaV3 = TypeOf<typeof pgSchemaV3>;
type PgSchemaV4 (line 541) | type PgSchemaV4 = TypeOf<typeof pgSchemaV4>;
type PgSchemaV5 (line 542) | type PgSchemaV5 = TypeOf<typeof pgSchemaV5>;
type PgSchemaV6 (line 543) | type PgSchemaV6 = TypeOf<typeof pgSchemaV6>;
FILE: drizzle-kit/src/serializer/pgSerializer.ts
function stringFromIdentityProperty (line 50) | function stringFromIdentityProperty(field: string | number | undefined):...
function maxRangeForIdentityBasedOn (line 54) | function maxRangeForIdentityBasedOn(columnType: string) {
function minRangeForIdentityBasedOn (line 58) | function minRangeForIdentityBasedOn(columnType: string) {
function stringFromDatabaseIdentityProperty (line 62) | function stringFromDatabaseIdentityProperty(field: any): string | undefi...
function buildArrayString (line 72) | function buildArrayString(array: any[], sqlType: string): string {
function prepareRoles (line 926) | function prepareRoles(entities?: {
FILE: drizzle-kit/src/serializer/singlestoreSchema.ts
type Dialect (line 124) | type Dialect = TypeOf<typeof dialect>;
type Column (line 125) | type Column = TypeOf<typeof column>;
type Table (line 126) | type Table = TypeOf<typeof table>;
type SingleStoreSchema (line 127) | type SingleStoreSchema = TypeOf<typeof schema>;
type SingleStoreSchemaInternal (line 128) | type SingleStoreSchemaInternal = TypeOf<typeof schemaInternal>;
type SingleStoreKitInternals (line 129) | type SingleStoreKitInternals = TypeOf<typeof kitInternals>;
type SingleStoreSchemaSquashed (line 130) | type SingleStoreSchemaSquashed = TypeOf<typeof schemaSquashed>;
type Index (line 131) | type Index = TypeOf<typeof index>;
type PrimaryKey (line 132) | type PrimaryKey = TypeOf<typeof compositePK>;
type UniqueConstraint (line 133) | type UniqueConstraint = TypeOf<typeof uniqueConstraint>;
FILE: drizzle-kit/src/serializer/singlestoreSerializer.ts
function clearDefaults (line 413) | function clearDefaults(defaultValue: any, collate: string) {
FILE: drizzle-kit/src/serializer/sqliteSchema.ts
type Dialect (line 157) | type Dialect = TypeOf<typeof dialect>;
type Column (line 158) | type Column = TypeOf<typeof column>;
type Table (line 159) | type Table = TypeOf<typeof table>;
type SQLiteSchema (line 160) | type SQLiteSchema = TypeOf<typeof schema>;
type SQLiteSchemaV3 (line 161) | type SQLiteSchemaV3 = TypeOf<typeof schemaV3>;
type SQLiteSchemaV4 (line 162) | type SQLiteSchemaV4 = TypeOf<typeof schemaV4>;
type SQLiteSchemaInternal (line 163) | type SQLiteSchemaInternal = TypeOf<typeof schemaInternal>;
type SQLiteSchemaSquashed (line 164) | type SQLiteSchemaSquashed = TypeOf<typeof schemaSquashed>;
type SQLiteKitInternals (line 165) | type SQLiteKitInternals = TypeOf<typeof kitInternals>;
type Index (line 166) | type Index = TypeOf<typeof index>;
type ForeignKey (line 167) | type ForeignKey = TypeOf<typeof fk>;
type PrimaryKey (line 168) | type PrimaryKey = TypeOf<typeof compositePK>;
type UniqueConstraint (line 169) | type UniqueConstraint = TypeOf<typeof uniqueConstraint>;
type CheckConstraint (line 170) | type CheckConstraint = TypeOf<typeof checkConstraint>;
type View (line 171) | type View = TypeOf<typeof view>;
FILE: drizzle-kit/src/serializer/sqliteSerializer.ts
function mapSqlToSqliteType (line 413) | function mapSqlToSqliteType(sqlType: string): string {
type ColumnInfo (line 461) | interface ColumnInfo {
function extractGeneratedColumns (line 467) | function extractGeneratedColumns(input: string): Record<string, ColumnIn...
function filterIgnoredTablesByField (line 498) | function filterIgnoredTablesByField(fieldName: string) {
FILE: drizzle-kit/src/serializer/studio.ts
type CustomDefault (line 43) | type CustomDefault = {
type SchemaFile (line 50) | type SchemaFile = {
type Setup (line 55) | type Setup = {
type ProxyParams (line 83) | type ProxyParams = {
type D1BindingCredentials (line 367) | type D1BindingCredentials = {
type Relation (line 504) | type Relation = {
type Server (line 676) | type Server = {
FILE: drizzle-kit/src/serializer/utils.ts
function getColumnCasing (line 5) | function getColumnCasing(
FILE: drizzle-kit/src/simulator.ts
type Array (line 2) | interface Array<T> {
type TablesHandler (line 14) | interface TablesHandler<T extends Named> {
type ColumnsHandler (line 19) | interface ColumnsHandler<T extends Named> {
class DryRun (line 28) | class DryRun<T extends Named> implements TablesHandler<T> {
method can (line 29) | can(added: T[], removed: T[]): boolean {
method handle (line 32) | handle(added: T[], _: T[]): { created: T[]; deleted: T[]; renamed: { f...
class Case1 (line 46) | class Case1<T extends Named> implements TablesHandler<T> {
method can (line 47) | can(_: T[], removed: T[]): boolean {
method handle (line 51) | handle(added: T[], removed: T[]): { created: T[]; deleted: T[]; rename...
class Case2 (line 55) | class Case2<T extends Named> implements TablesHandler<T> {
method can (line 57) | can(_: T[], removed: T[]): boolean {
method handle (line 61) | handle(added: T[], removed: T[]): { created: T[]; deleted: T[]; rename...
type Named (line 66) | type Named = { name: string };
class LehaColumnsHandler (line 87) | class LehaColumnsHandler<T extends Named> implements ColumnsHandler<T> {
method can (line 88) | can(tableName: string, _: T[], __: T[]): boolean {
method handle (line 92) | handle(
class DryRunColumnsHandler (line 101) | class DryRunColumnsHandler<T extends Named> implements ColumnsHandler<T> {
method can (line 102) | can(tableName: string, _: T[], __: T[]): boolean {
method handle (line 106) | handle(
class V1V2AuthOtpColumnsHandler (line 115) | class V1V2AuthOtpColumnsHandler<T extends Named> implements ColumnsHandl...
method can (line 116) | can(tableName: string, _: T[], __: T[]): boolean {
method handle (line 120) | handle(
FILE: drizzle-kit/src/snapshotsDiffer.ts
type Column (line 410) | type Column = TypeOf<typeof columnSchema>;
type AlteredColumn (line 411) | type AlteredColumn = TypeOf<typeof alteredColumnSchema>;
type Enum (line 412) | type Enum = TypeOf<typeof enumSchema>;
type Sequence (line 413) | type Sequence = TypeOf<typeof sequenceSquashed>;
type Table (line 414) | type Table = TypeOf<typeof tableScheme>;
type AlteredTable (line 415) | type AlteredTable = TypeOf<typeof alteredTableScheme>;
type DiffResult (line 416) | type DiffResult = TypeOf<typeof diffResultScheme>;
type DiffResultMysql (line 417) | type DiffResultMysql = TypeOf<typeof diffResultSchemeMysql>;
type DiffResultSingleStore (line 418) | type DiffResultSingleStore = TypeOf<typeof diffResultSchemeSingleStore>;
type DiffResultSQLite (line 419) | type DiffResultSQLite = TypeOf<typeof diffResultSchemeSQLite>;
type ResolverInput (line 421) | interface ResolverInput<T extends { name: string }> {
type ResolverOutput (line 426) | interface ResolverOutput<T extends { name: string }> {
type ResolverOutputWithMoved (line 432) | interface ResolverOutputWithMoved<T extends { name: string }> {
type ColumnsResolverInput (line 439) | interface ColumnsResolverInput<T extends { name: string }> {
type TablePolicyResolverInput (line 446) | interface TablePolicyResolverInput<T extends { name: string }> {
type TablePolicyResolverOutput (line 453) | interface TablePolicyResolverOutput<T extends { name: string }> {
type PolicyResolverInput (line 461) | interface PolicyResolverInput<T extends { name: string }> {
type PolicyResolverOutput (line 466) | interface PolicyResolverOutput<T extends { name: string }> {
type RolesResolverInput (line 472) | interface RolesResolverInput<T extends { name: string }> {
type RolesResolverOutput (line 477) | interface RolesResolverOutput<T extends { name: string }> {
type ColumnsResolverOutput (line 483) | interface ColumnsResolverOutput<T extends { name: string }> {
FILE: drizzle-kit/src/sqlgenerator.ts
class PgCreateRoleConvertor (line 163) | class PgCreateRoleConvertor extends Convertor {
method can (line 164) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 167) | override convert(statement: JsonCreateRoleStatement): string | string[] {
class PgDropRoleConvertor (line 178) | class PgDropRoleConvertor extends Convertor {
method can (line 179) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 182) | override convert(statement: JsonDropRoleStatement): string | string[] {
class PgRenameRoleConvertor (line 187) | class PgRenameRoleConvertor extends Convertor {
method can (line 188) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 191) | override convert(statement: JsonRenameRoleStatement): string | string[] {
class PgAlterRoleConvertor (line 196) | class PgAlterRoleConvertor extends Convertor {
method can (line 197) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 200) | override convert(statement: JsonAlterRoleStatement): string | string[] {
class PgCreatePolicyConvertor (line 209) | class PgCreatePolicyConvertor extends Convertor {
method can (line 210) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 213) | override convert(statement: JsonCreatePolicyStatement): string | strin...
class PgDropPolicyConvertor (line 232) | class PgDropPolicyConvertor extends Convertor {
method can (line 233) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 236) | override convert(statement: JsonDropPolicyStatement): string | string[] {
class PgRenamePolicyConvertor (line 247) | class PgRenamePolicyConvertor extends Convertor {
method can (line 248) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 251) | override convert(statement: JsonRenamePolicyStatement): string | strin...
class PgAlterPolicyConvertor (line 260) | class PgAlterPolicyConvertor extends Convertor {
method can (line 261) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 264) | override convert(statement: JsonAlterPolicyStatement, _dialect: any, a...
class PgCreateIndPolicyConvertor (line 294) | class PgCreateIndPolicyConvertor extends Convertor {
method can (line 295) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 298) | override convert(statement: JsonCreateIndPolicyStatement): string | st...
class PgDropIndPolicyConvertor (line 313) | class PgDropIndPolicyConvertor extends Convertor {
method can (line 314) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 317) | override convert(statement: JsonDropIndPolicyStatement): string | stri...
class PgRenameIndPolicyConvertor (line 324) | class PgRenameIndPolicyConvertor extends Convertor {
method can (line 325) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 328) | override convert(statement: JsonIndRenamePolicyStatement): string | st...
class PgAlterIndPolicyConvertor (line 333) | class PgAlterIndPolicyConvertor extends Convertor {
method can (line 334) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 337) | override convert(statement: JsonAlterIndPolicyStatement): string | str...
class PgEnableRlsConvertor (line 359) | class PgEnableRlsConvertor extends Convertor {
method can (line 360) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 363) | override convert(statement: JsonEnableRLSStatement): string {
class PgDisableRlsConvertor (line 372) | class PgDisableRlsConvertor extends Convertor {
method can (line 373) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 376) | override convert(statement: JsonDisableRLSStatement): string {
class PgCreateTableConvertor (line 385) | class PgCreateTableConvertor extends Convertor {
method can (line 386) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 390) | convert(st: JsonCreateTableStatement) {
class MySqlCreateTableConvertor (line 497) | class MySqlCreateTableConvertor extends Convertor {
method can (line 498) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 502) | convert(st: JsonCreateTableStatement) {
class SingleStoreCreateTableConvertor (line 582) | class SingleStoreCreateTableConvertor extends Convertor {
method can (line 583) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 587) | convert(st: JsonCreateTableStatement) {
class SQLiteCreateTableConvertor (line 658) | class SQLiteCreateTableConvertor extends Convertor {
method can (line 659) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 663) | convert(st: JsonSqliteCreateTableStatement) {
class PgCreateViewConvertor (line 753) | class PgCreateViewConvertor extends Convertor {
method can (line 754) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 758) | convert(st: JsonCreatePgViewStatement) {
class SqliteCreateViewConvertor (line 815) | class SqliteCreateViewConvertor extends Convertor {
method can (line 816) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 820) | convert(st: JsonCreateSqliteViewStatement) {
class PgDropViewConvertor (line 827) | class PgDropViewConvertor extends Convertor {
method can (line 828) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 832) | convert(st: JsonDropViewStatement) {
class MySqlDropViewConvertor (line 841) | class MySqlDropViewConvertor extends Convertor {
method can (line 842) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 846) | convert(st: JsonDropViewStatement) {
class SqliteDropViewConvertor (line 853) | class SqliteDropViewConvertor extends Convertor {
method can (line 854) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 858) | convert(st: JsonDropViewStatement) {
class MySqlAlterViewConvertor (line 865) | class MySqlAlterViewConvertor extends Convertor {
method can (line 866) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 870) | convert(st: JsonAlterMySqlViewStatement) {
class PgRenameViewConvertor (line 885) | class PgRenameViewConvertor extends Convertor {
method can (line 886) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 890) | convert(st: JsonRenameViewStatement) {
class MySqlRenameViewConvertor (line 899) | class MySqlRenameViewConvertor extends Convertor {
method can (line 900) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 904) | convert(st: JsonRenameViewStatement) {
class PgAlterViewSchemaConvertor (line 911) | class PgAlterViewSchemaConvertor extends Convertor {
method can (line 912) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 916) | convert(st: JsonAlterViewAlterSchemaStatement) {
class PgAlterViewAddWithOptionConvertor (line 927) | class PgAlterViewAddWithOptionConvertor extends Convertor {
method can (line 928) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 932) | convert(st: JsonAlterViewAddWithOptionStatement) {
class PgAlterViewDropWithOptionConvertor (line 951) | class PgAlterViewDropWithOptionConvertor extends Convertor {
method can (line 952) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 956) | convert(st: JsonAlterViewDropWithOptionStatement) {
class PgAlterViewAlterTablespaceConvertor (line 975) | class PgAlterViewAlterTablespaceConvertor extends Convertor {
method can (line 976) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 980) | convert(st: JsonAlterViewAlterTablespaceStatement) {
class PgAlterViewAlterUsingConvertor (line 989) | class PgAlterViewAlterUsingConvertor extends Convertor {
method can (line 990) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 994) | convert(st: JsonAlterViewAlterUsingStatement) {
class PgAlterTableAlterColumnSetGenerated (line 1003) | class PgAlterTableAlterColumnSetGenerated extends Convertor {
method can (line 1004) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1010) | override convert(
class PgAlterTableAlterColumnDropGenerated (line 1053) | class PgAlterTableAlterColumnDropGenerated extends Convertor {
method can (line 1054) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1060) | override convert(
class PgAlterTableAlterColumnAlterGenerated (line 1073) | class PgAlterTableAlterColumnAlterGenerated extends Convertor {
method can (line 1074) | override can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1080) | override convert(
class PgAlterTableAddUniqueConstraintConvertor (line 1144) | class PgAlterTableAddUniqueConstraintConvertor extends Convertor {
method can (line 1145) | can(statement: JsonCreateUniqueConstraint, dialect: Dialect): boolean {
method convert (line 1150) | convert(statement: JsonCreateUniqueConstraint): string {
class PgAlterTableDropUniqueConstraintConvertor (line 1163) | class PgAlterTableDropUniqueConstraintConvertor extends Convertor {
method can (line 1164) | can(statement: JsonDeleteUniqueConstraint, dialect: Dialect): boolean {
method convert (line 1169) | convert(statement: JsonDeleteUniqueConstraint): string {
class PgAlterTableAddCheckConstraintConvertor (line 1180) | class PgAlterTableAddCheckConstraintConvertor extends Convertor {
method can (line 1181) | can(statement: JsonCreateCheckConstraint, dialect: Dialect): boolean {
method convert (line 1186) | convert(statement: JsonCreateCheckConstraint): string {
class PgAlterTableDeleteCheckConstraintConvertor (line 1197) | class PgAlterTableDeleteCheckConstraintConvertor extends Convertor {
method can (line 1198) | can(statement: JsonDeleteCheckConstraint, dialect: Dialect): boolean {
method convert (line 1203) | convert(statement: JsonDeleteCheckConstraint): string {
class MySQLAlterTableAddUniqueConstraintConvertor (line 1212) | class MySQLAlterTableAddUniqueConstraintConvertor extends Convertor {
method can (line 1213) | can(statement: JsonCreateUniqueConstraint, dialect: Dialect): boolean {
method convert (line 1216) | convert(statement: JsonCreateUniqueConstraint): string {
class MySQLAlterTableDropUniqueConstraintConvertor (line 1225) | class MySQLAlterTableDropUniqueConstraintConvertor extends Convertor {
method can (line 1226) | can(statement: JsonDeleteUniqueConstraint, dialect: Dialect): boolean {
method convert (line 1229) | convert(statement: JsonDeleteUniqueConstraint): string {
class MySqlAlterTableAddCheckConstraintConvertor (line 1236) | class MySqlAlterTableAddCheckConstraintConvertor extends Convertor {
method can (line 1237) | can(statement: JsonCreateCheckConstraint, dialect: Dialect): boolean {
method convert (line 1242) | convert(statement: JsonCreateCheckConstraint): string {
class SingleStoreAlterTableAddUniqueConstraintConvertor (line 1250) | class SingleStoreAlterTableAddUniqueConstraintConvertor extends Convertor {
method can (line 1251) | can(statement: JsonCreateUniqueConstraint, dialect: Dialect): boolean {
method convert (line 1254) | convert(statement: JsonCreateUniqueConstraint): string {
class SingleStoreAlterTableDropUniqueConstraintConvertor (line 1262) | class SingleStoreAlterTableDropUniqueConstraintConvertor extends Convert...
method can (line 1263) | can(statement: JsonDeleteUniqueConstraint, dialect: Dialect): boolean {
method convert (line 1266) | convert(statement: JsonDeleteUniqueConstraint): string {
class MySqlAlterTableDeleteCheckConstraintConvertor (line 1273) | class MySqlAlterTableDeleteCheckConstraintConvertor extends Convertor {
method can (line 1274) | can(statement: JsonDeleteCheckConstraint, dialect: Dialect): boolean {
method convert (line 1279) | convert(statement: JsonDeleteCheckConstraint): string {
class CreatePgSequenceConvertor (line 1286) | class CreatePgSequenceConvertor extends Convertor {
method can (line 1287) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1291) | convert(st: JsonCreateSequenceStatement) {
class DropPgSequenceConvertor (line 1304) | class DropPgSequenceConvertor extends Convertor {
method can (line 1305) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1309) | convert(st: JsonDropSequenceStatement) {
class RenamePgSequenceConvertor (line 1318) | class RenamePgSequenceConvertor extends Convertor {
method can (line 1319) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1323) | convert(st: JsonRenameSequenceStatement) {
class MovePgSequenceConvertor (line 1337) | class MovePgSequenceConvertor extends Convertor {
method can (line 1338) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1342) | convert(st: JsonMoveSequenceStatement) {
class AlterPgSequenceConvertor (line 1355) | class AlterPgSequenceConvertor extends Convertor {
method can (line 1356) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1360) | convert(st: JsonAlterSequenceStatement) {
class CreateTypeEnumConvertor (line 1375) | class CreateTypeEnumConvertor extends Convertor {
method can (line 1376) | can(statement: JsonStatement): boolean {
method convert (line 1380) | convert(st: JsonCreateEnumStatement) {
class DropTypeEnumConvertor (line 1404) | class DropTypeEnumConvertor extends Convertor {
method can (line 1405) | can(statement: JsonStatement): boolean {
method convert (line 1409) | convert(st: JsonDropEnumStatement) {
class AlterTypeAddValueConvertor (line 1420) | class AlterTypeAddValueConvertor extends Convertor {
method can (line 1421) | can(statement: JsonStatement): boolean {
method convert (line 1425) | convert(st: JsonAddValueToEnumStatement) {
class AlterTypeSetSchemaConvertor (line 1434) | class AlterTypeSetSchemaConvertor extends Convertor {
method can (line 1435) | can(statement: JsonStatement): boolean {
method convert (line 1439) | convert(st: JsonMoveEnumStatement) {
class AlterRenameTypeConvertor (line 1448) | class AlterRenameTypeConvertor extends Convertor {
method can (line 1449) | can(statement: JsonStatement): boolean {
method convert (line 1453) | convert(st: JsonRenameEnumStatement) {
class AlterTypeDropValueConvertor (line 1462) | class AlterTypeDropValueConvertor extends Convertor {
method can (line 1463) | can(statement: JsonDropValueFromEnumStatement): boolean {
method convert (line 1467) | convert(st: JsonDropValueFromEnumStatement) {
class PgDropTableConvertor (line 1517) | class PgDropTableConvertor extends Convertor {
method can (line 1518) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1522) | convert(statement: JsonDropTableStatement, _d: any, action?: string) {
class MySQLDropTableConvertor (line 1548) | class MySQLDropTableConvertor extends Convertor {
method can (line 1549) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1553) | convert(statement: JsonDropTableStatement) {
class SingleStoreDropTableConvertor (line 1559) | class SingleStoreDropTableConvertor extends Convertor {
method can (line 1560) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1564) | convert(statement: JsonDropTableStatement) {
class SQLiteDropTableConvertor (line 1570) | class SQLiteDropTableConvertor extends Convertor {
method can (line 1571) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1575) | convert(statement: JsonDropTableStatement) {
class PgRenameTableConvertor (line 1581) | class PgRenameTableConvertor extends Convertor {
method can (line 1582) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1586) | convert(statement: JsonRenameTableStatement) {
class SqliteRenameTableConvertor (line 1596) | class SqliteRenameTableConvertor extends Convertor {
method can (line 1597) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1601) | convert(statement: JsonRenameTableStatement) {
class MySqlRenameTableConvertor (line 1607) | class MySqlRenameTableConvertor extends Convertor {
method can (line 1608) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1612) | convert(statement: JsonRenameTableStatement) {
class SingleStoreRenameTableConvertor (line 1618) | class SingleStoreRenameTableConvertor extends Convertor {
method can (line 1619) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1623) | convert(statement: JsonRenameTableStatement) {
class PgAlterTableRenameColumnConvertor (line 1629) | class PgAlterTableRenameColumnConvertor extends Convertor {
method can (line 1630) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1636) | convert(statement: JsonRenameColumnStatement) {
class MySqlAlterTableRenameColumnConvertor (line 1647) | class MySqlAlterTableRenameColumnConvertor extends Convertor {
method can (line 1648) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1654) | convert(statement: JsonRenameColumnStatement) {
class SingleStoreAlterTableRenameColumnConvertor (line 1660) | class SingleStoreAlterTableRenameColumnConvertor extends Convertor {
method can (line 1661) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1667) | convert(statement: JsonRenameColumnStatement) {
class SQLiteAlterTableRenameColumnConvertor (line 1673) | class SQLiteAlterTableRenameColumnConvertor extends Convertor {
method can (line 1674) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1680) | convert(statement: JsonRenameColumnStatement) {
class PgAlterTableDropColumnConvertor (line 1686) | class PgAlterTableDropColumnConvertor extends Convertor {
method can (line 1687) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1693) | convert(statement: JsonDropColumnStatement) {
class MySqlAlterTableDropColumnConvertor (line 1704) | class MySqlAlterTableDropColumnConvertor extends Convertor {
method can (line 1705) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1709) | convert(statement: JsonDropColumnStatement) {
class SingleStoreAlterTableDropColumnConvertor (line 1715) | class SingleStoreAlterTableDropColumnConvertor extends Convertor {
method can (line 1716) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1720) | convert(statement: JsonDropColumnStatement) {
class SQLiteAlterTableDropColumnConvertor (line 1726) | class SQLiteAlterTableDropColumnConvertor extends Convertor {
method can (line 1727) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1731) | convert(statement: JsonDropColumnStatement) {
class PgAlterTableAddColumnConvertor (line 1737) | class PgAlterTableAddColumnConvertor extends Convertor {
method can (line 1738) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1744) | convert(statement: JsonAddColumnStatement) {
class MySqlAlterTableAddColumnConvertor (line 1802) | class MySqlAlterTableAddColumnConvertor extends Convertor {
method can (line 1803) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1807) | convert(statement: JsonAddColumnStatement) {
class SingleStoreAlterTableAddColumnConvertor (line 1833) | class SingleStoreAlterTableAddColumnConvertor extends Convertor {
method can (line 1834) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1838) | convert(statement: JsonAddColumnStatement) {
class SQLiteAlterTableAddColumnConvertor (line 1864) | class SQLiteAlterTableAddColumnConvertor extends Convertor {
method can (line 1865) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1871) | convert(statement: JsonSqliteAddColumnStatement) {
class PgAlterTableAlterColumnSetTypeConvertor (line 1895) | class PgAlterTableAlterColumnSetTypeConvertor extends Convertor {
method can (line 1896) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1903) | convert(statement: JsonAlterColumnPgTypeStatement) {
class PgAlterTableAlterColumnSetDefaultConvertor (line 1966) | class PgAlterTableAlterColumnSetDefaultConvertor extends Convertor {
method can (line 1967) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1974) | convert(statement: JsonAlterColumnSetDefaultStatement) {
class PgAlterTableAlterColumnDropDefaultConvertor (line 1985) | class PgAlterTableAlterColumnDropDefaultConvertor extends Convertor {
method can (line 1986) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 1993) | convert(statement: JsonAlterColumnDropDefaultStatement) {
class PgAlterTableAlterColumnDropGeneratedConvertor (line 2004) | class PgAlterTableAlterColumnDropGeneratedConvertor extends Convertor {
method can (line 2005) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2012) | convert(statement: JsonAlterColumnDropGeneratedStatement) {
class PgAlterTableAlterColumnSetExpressionConvertor (line 2023) | class PgAlterTableAlterColumnSetExpressionConvertor extends Convertor {
method can (line 2024) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2031) | convert(statement: JsonAlterColumnSetGeneratedStatement) {
class PgAlterTableAlterColumnAlterrGeneratedConvertor (line 2071) | class PgAlterTableAlterColumnAlterrGeneratedConvertor extends Convertor {
method can (line 2072) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2079) | convert(statement: JsonAlterColumnAlterGeneratedStatement) {
class SqliteAlterTableAlterColumnDropGeneratedConvertor (line 2120) | class SqliteAlterTableAlterColumnDropGeneratedConvertor extends Convertor {
method can (line 2121) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2128) | convert(statement: JsonAlterColumnDropGeneratedStatement) {
class SqliteAlterTableAlterColumnSetExpressionConvertor (line 2169) | class SqliteAlterTableAlterColumnSetExpressionConvertor extends Convertor {
method can (line 2170) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2177) | convert(statement: JsonAlterColumnSetGeneratedStatement) {
class SqliteAlterTableAlterColumnAlterGeneratedConvertor (line 2218) | class SqliteAlterTableAlterColumnAlterGeneratedConvertor extends Convert...
method can (line 2219) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2226) | convert(statement: JsonAlterColumnAlterGeneratedStatement) {
class MySqlAlterTableAlterColumnAlterrGeneratedConvertor (line 2269) | class MySqlAlterTableAlterColumnAlterrGeneratedConvertor extends Convert...
method can (line 2270) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2277) | convert(statement: JsonAlterColumnAlterGeneratedStatement) {
class MySqlAlterTableAlterColumnSetDefaultConvertor (line 2317) | class MySqlAlterTableAlterColumnSetDefaultConvertor extends Convertor {
method can (line 2318) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2325) | convert(statement: JsonAlterColumnSetDefaultStatement) {
class MySqlAlterTableAlterColumnDropDefaultConvertor (line 2331) | class MySqlAlterTableAlterColumnDropDefaultConvertor extends Convertor {
method can (line 2332) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2339) | convert(statement: JsonAlterColumnDropDefaultStatement) {
class MySqlAlterTableAddPk (line 2345) | class MySqlAlterTableAddPk extends Convertor {
method can (line 2346) | can(statement: JsonStatement, dialect: string): boolean {
method convert (line 2352) | convert(statement: JsonAlterColumnSetPrimaryKeyStatement): string {
class MySqlAlterTableDropPk (line 2357) | class MySqlAlterTableDropPk extends Convertor {
method can (line 2358) | can(statement: JsonStatement, dialect: string): boolean {
method convert (line 2364) | convert(statement: JsonAlterColumnDropPrimaryKeyStatement): string {
type LibSQLModifyColumnStatement (line 2369) | type LibSQLModifyColumnStatement =
class LibSQLModifyColumn (line 2376) | class LibSQLModifyColumn extends Convertor {
method can (line 2377) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2390) | convert(statement: LibSQLModifyColumnStatement, json2: SQLiteSchemaSqu...
type MySqlModifyColumnStatement (line 2484) | type MySqlModifyColumnStatement =
class MySqlModifyColumn (line 2497) | class MySqlModifyColumn extends Convertor {
method can (line 2498) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2515) | convert(statement: MySqlModifyColumnStatement) {
class SingleStoreAlterTableAlterColumnAlterrGeneratedConvertor (line 2719) | class SingleStoreAlterTableAlterColumnAlterrGeneratedConvertor extends C...
method can (line 2720) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2727) | convert(statement: JsonAlterColumnAlterGeneratedStatement) {
class SingleStoreAlterTableAlterColumnSetDefaultConvertor (line 2767) | class SingleStoreAlterTableAlterColumnSetDefaultConvertor extends Conver...
method can (line 2768) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2775) | convert(statement: JsonAlterColumnSetDefaultStatement) {
class SingleStoreAlterTableAlterColumnDropDefaultConvertor (line 2781) | class SingleStoreAlterTableAlterColumnDropDefaultConvertor extends Conve...
method can (line 2782) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2789) | convert(statement: JsonAlterColumnDropDefaultStatement) {
class SingleStoreAlterTableAddPk (line 2795) | class SingleStoreAlterTableAddPk extends Convertor {
method can (line 2796) | can(statement: JsonStatement, dialect: string): boolean {
method convert (line 2802) | convert(statement: JsonAlterColumnSetPrimaryKeyStatement): string {
class SingleStoreAlterTableDropPk (line 2807) | class SingleStoreAlterTableDropPk extends Convertor {
method can (line 2808) | can(statement: JsonStatement, dialect: string): boolean {
method convert (line 2814) | convert(statement: JsonAlterColumnDropPrimaryKeyStatement): string {
type SingleStoreModifyColumnStatement (line 2819) | type SingleStoreModifyColumnStatement =
class SingleStoreModifyColumn (line 2832) | class SingleStoreModifyColumn extends Convertor {
method can (line 2833) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 2850) | convert(statement: SingleStoreModifyColumnStatement) {
class SqliteAlterTableAlterColumnDropDefaultConvertor (line 3053) | class SqliteAlterTableAlterColumnDropDefaultConvertor extends Convertor {
method can (line 3054) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3061) | convert(statement: JsonAlterColumnDropDefaultStatement) {
class PgAlterTableCreateCompositePrimaryKeyConvertor (line 3073) | class PgAlterTableCreateCompositePrimaryKeyConvertor extends Convertor {
method can (line 3074) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3078) | convert(statement: JsonCreateCompositePK) {
class PgAlterTableDeleteCompositePrimaryKeyConvertor (line 3090) | class PgAlterTableDeleteCompositePrimaryKeyConvertor extends Convertor {
method can (line 3091) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3095) | convert(statement: JsonDeleteCompositePK) {
class PgAlterTableAlterCompositePrimaryKeyConvertor (line 3106) | class PgAlterTableAlterCompositePrimaryKeyConvertor extends Convertor {
method can (line 3107) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3111) | convert(statement: JsonAlterCompositePK) {
class MySqlAlterTableCreateCompositePrimaryKeyConvertor (line 3127) | class MySqlAlterTableCreateCompositePrimaryKeyConvertor extends Convertor {
method can (line 3128) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3132) | convert(statement: JsonCreateCompositePK) {
class MySqlAlterTableDeleteCompositePrimaryKeyConvertor (line 3138) | class MySqlAlterTableDeleteCompositePrimaryKeyConvertor extends Convertor {
method can (line 3139) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3143) | convert(statement: JsonDeleteCompositePK) {
class MySqlAlterTableAlterCompositePrimaryKeyConvertor (line 3149) | class MySqlAlterTableAlterCompositePrimaryKeyConvertor extends Convertor {
method can (line 3150) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3154) | convert(statement: JsonAlterCompositePK) {
class SqliteAlterTableCreateCompositePrimaryKeyConvertor (line 3163) | class SqliteAlterTableCreateCompositePrimaryKeyConvertor extends Convert...
method can (line 3164) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3168) | convert(statement: JsonCreateCompositePK) {
class SqliteAlterTableDeleteCompositePrimaryKeyConvertor (line 3190) | class SqliteAlterTableDeleteCompositePrimaryKeyConvertor extends Convert...
method can (line 3191) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3195) | convert(statement: JsonDeleteCompositePK) {
class SqliteAlterTableAlterCompositePrimaryKeyConvertor (line 3218) | class SqliteAlterTableAlterCompositePrimaryKeyConvertor extends Convertor {
method can (line 3219) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3223) | convert(statement: JsonAlterCompositePK) {
class PgAlterTableAlterColumnSetPrimaryKeyConvertor (line 3246) | class PgAlterTableAlterColumnSetPrimaryKeyConvertor extends Convertor {
method can (line 3247) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3254) | convert(statement: JsonAlterColumnSetPrimaryKeyStatement) {
class PgAlterTableAlterColumnDropPrimaryKeyConvertor (line 3265) | class PgAlterTableAlterColumnDropPrimaryKeyConvertor extends Convertor {
method can (line 3266) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3273) | convert(statement: JsonAlterColumnDropPrimaryKeyStatement) {
class PgAlterTableAlterColumnSetNotNullConvertor (line 3294) | class PgAlterTableAlterColumnSetNotNullConvertor extends Convertor {
method can (line 3295) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3302) | convert(statement: JsonAlterColumnSetNotNullStatement) {
class PgAlterTableAlterColumnDropNotNullConvertor (line 3313) | class PgAlterTableAlterColumnDropNotNullConvertor extends Convertor {
method can (line 3314) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3321) | convert(statement: JsonAlterColumnDropNotNullStatement) {
class PgCreateForeignKeyConvertor (line 3333) | class PgCreateForeignKeyConvertor extends Convertor {
method can (line 3334) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3338) | convert(statement: JsonCreateReferenceStatement): string {
class LibSQLCreateForeignKeyConvertor (line 3369) | class LibSQLCreateForeignKeyConvertor extends Convertor {
method can (line 3370) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3377) | convert(
class MySqlCreateForeignKeyConvertor (line 3402) | class MySqlCreateForeignKeyConvertor extends Convertor {
method can (line 3403) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3407) | convert(statement: JsonCreateReferenceStatement): string {
class PgAlterForeignKeyConvertor (line 3426) | class PgAlterForeignKeyConvertor extends Convertor {
method can (line 3427) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3431) | convert(statement: JsonAlterReferenceStatement): string {
class PgDeleteForeignKeyConvertor (line 3469) | class PgDeleteForeignKeyConvertor extends Convertor {
method can (line 3470) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3474) | convert(statement: JsonDeleteReferenceStatement): string {
class MySqlDeleteForeignKeyConvertor (line 3486) | class MySqlDeleteForeignKeyConvertor extends Convertor {
method can (line 3487) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3491) | convert(statement: JsonDeleteReferenceStatement): string {
class CreatePgIndexConvertor (line 3498) | class CreatePgIndexConvertor extends Convertor {
method can (line 3499) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3503) | convert(statement: JsonPgCreateIndexStatement): string {
class CreateMySqlIndexConvertor (line 3553) | class CreateMySqlIndexConvertor extends Convertor {
method can (line 3554) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3558) | convert(statement: JsonCreateIndexStatement): string {
class CreateSingleStoreIndexConvertor (line 3579) | class CreateSingleStoreIndexConvertor extends Convertor {
method can (line 3580) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3584) | convert(statement: JsonCreateIndexStatement): string {
class CreateSqliteIndexConvertor (line 3605) | class CreateSqliteIndexConvertor extends Convertor {
method can (line 3606) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3610) | convert(statement: JsonCreateIndexStatement): string {
class PgDropIndexConvertor (line 3631) | class PgDropIndexConvertor extends Convertor {
method can (line 3632) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3636) | convert(statement: JsonDropIndexStatement): string {
class PgCreateSchemaConvertor (line 3646) | class PgCreateSchemaConvertor extends Convertor {
method can (line 3647) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3651) | convert(statement: JsonCreateSchema) {
class PgRenameSchemaConvertor (line 3657) | class PgRenameSchemaConvertor extends Convertor {
method can (line 3658) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3662) | convert(statement: JsonRenameSchema) {
class PgDropSchemaConvertor (line 3668) | class PgDropSchemaConvertor extends Convertor {
method can (line 3669) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3673) | convert(statement: JsonCreateSchema) {
class PgAlterTableSetSchemaConvertor (line 3679) | class PgAlterTableSetSchemaConvertor extends Convertor {
method can (line 3680) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3686) | convert(statement: JsonAlterTableSetSchema) {
class PgAlterTableSetNewSchemaConvertor (line 3693) | class PgAlterTableSetNewSchemaConvertor extends Convertor {
method can (line 3694) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3701) | convert(statement: JsonAlterTableSetNewSchema) {
class PgAlterTableRemoveFromSchemaConvertor (line 3712) | class PgAlterTableRemoveFromSchemaConvertor extends Convertor {
method can (line 3713) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3720) | convert(statement: JsonAlterTableRemoveFromSchema) {
class SqliteDropIndexConvertor (line 3731) | class SqliteDropIndexConvertor extends Convertor {
method can (line 3732) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3736) | convert(statement: JsonDropIndexStatement): string {
class MySqlDropIndexConvertor (line 3742) | class MySqlDropIndexConvertor extends Convertor {
method can (line 3743) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3747) | convert(statement: JsonDropIndexStatement): string {
class SingleStoreDropIndexConvertor (line 3753) | class SingleStoreDropIndexConvertor extends Convertor {
method can (line 3754) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3758) | convert(statement: JsonDropIndexStatement): string {
class SQLiteRecreateTableConvertor (line 3764) | class SQLiteRecreateTableConvertor extends Convertor {
method can (line 3765) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3771) | convert(statement: JsonRecreateTableStatement): string | string[] {
class LibSQLRecreateTableConvertor (line 3830) | class LibSQLRecreateTableConvertor extends Convertor {
method can (line 3831) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3838) | convert(statement: JsonRecreateTableStatement): string[] {
class SingleStoreRecreateTableConvertor (line 3896) | class SingleStoreRecreateTableConvertor extends Convertor {
method can (line 3897) | can(statement: JsonStatement, dialect: Dialect): boolean {
method convert (line 3904) | convert(statement: JsonRecreateSingleStoreTableStatement): string[] {
function fromJson (line 4122) | function fromJson(
FILE: drizzle-kit/src/utils.ts
type Proxy (line 17) | type Proxy = (params: ProxyParams) => Promise<any[]>;
type TransactionProxy (line 19) | type TransactionProxy = (queries: { sql: string; method?: ProxyParams['m...
type DB (line 21) | type DB = {
type SQLiteDB (line 25) | type SQLiteDB = {
type LibSQLDB (line 30) | type LibSQLDB = {
type Journal (line 63) | type Journal = {
function isPgArrayType (line 350) | function isPgArrayType(sqlType: string) {
function findAddedAndRemoved (line 354) | function findAddedAndRemoved(columnNames1: string[], columnNames2: strin...
function escapeSingleQuotes (line 364) | function escapeSingleQuotes(str: string) {
function unescapeSingleQuotes (line 368) | function unescapeSingleQuotes(str: string, ignoreFirstAndLastChar: boole...
FILE: drizzle-kit/src/utils/certs.ts
function runCommand (line 7) | function runCommand(command: string, options: ExecOptions = {}) {
FILE: drizzle-kit/tests/common.ts
type DialectSuite (line 3) | interface DialectSuite {
FILE: drizzle-kit/tests/indexes/common.ts
type DialectSuite (line 3) | interface DialectSuite {
FILE: drizzle-kit/tests/indexes/pg.test.ts
method vectorIndex (line 10) | async vectorIndex() {
method indexesToBeTriggered (line 71) | async indexesToBeTriggered() {
method simpleIndex (line 138) | async simpleIndex() {
FILE: drizzle-kit/tests/introspect/gel.ext.test.ts
constant ENABLE_LOGGING (line 17) | const ENABLE_LOGGING = false;
function createDockerDB (line 25) | async function createDockerDB(): Promise<{ connectionString: string; con...
function sleep (line 57) | function sleep(ms: number) {
FILE: drizzle-kit/tests/introspect/gel.test.ts
constant ENABLE_LOGGING (line 17) | const ENABLE_LOGGING = false;
function createDockerDB (line 25) | async function createDockerDB(): Promise<{ connectionString: string; con...
function sleep (line 57) | function sleep(ms: number) {
FILE: drizzle-kit/tests/introspect/mysql.test.ts
function createDockerDB (line 32) | async function createDockerDB(): Promise<string> {
FILE: drizzle-kit/tests/introspect/singlestore.test.ts
function createDockerDB (line 28) | async function createDockerDB(): Promise<string> {
FILE: drizzle-kit/tests/migrate/migrations/0000_little_blizzard.sql
type `users` (line 1) | CREATE TABLE `users` (
FILE: drizzle-kit/tests/migrate/migrations/0001_nebulous_storm.sql
type `__new_users` (line 2) | CREATE TABLE `__new_users` (
FILE: drizzle-kit/tests/mysql.test.ts
type Test (line 866) | enum Test {
FILE: drizzle-kit/tests/pg-enums.test.ts
type Test (line 762) | enum Test {
FILE: drizzle-kit/tests/push/common.ts
type DialectSuite (line 3) | interface DialectSuite {
FILE: drizzle-kit/tests/push/mysql-push.test.ts
function createDockerDB (line 14) | async function createDockerDB(): Promise<string> {
FILE: drizzle-kit/tests/push/mysql.test.ts
function createDockerDB (line 36) | async function createDockerDB(context: any): Promise<string> {
method case1 (line 309) | async case1() {
FILE: drizzle-kit/tests/push/pg.test.ts
method allTypes (line 44) | async allTypes() {
method addBasicIndexes (line 227) | async addBasicIndexes() {
method addGeneratedColumn (line 328) | async addGeneratedColumn() {
method addGeneratedToColumn (line 375) | async addGeneratedToColumn() {
method dropGeneratedConstraint (line 425) | async dropGeneratedConstraint() {
method alterGeneratedConstraint (line 465) | async alterGeneratedConstraint() {
method createTableWithGeneratedConstraint (line 491) | async createTableWithGeneratedConstraint() {
method addBasicSequences (line 554) | async addBasicSequences() {
method changeIndexFields (line 569) | async changeIndexFields() {
method dropIndex (line 636) | async dropIndex() {
method indexesToBeNotTriggered (line 673) | async indexesToBeNotTriggered() {
method indexesTestCase1 (line 725) | async indexesTestCase1() {
method addNotNull (line 769) | async addNotNull() {
method addNotNullWithDataNoRollback (line 841) | async addNotNullWithDataNoRollback() {
method createCompositePrimaryKey (line 918) | async createCompositePrimaryKey() {
method renameTableWithCompositePrimaryKey (line 965) | async renameTableWithCompositePrimaryKey() {
method case1 (line 1046) | async case1() {
FILE: drizzle-kit/tests/push/singlestore-push.test.ts
function createDockerDB (line 14) | async function createDockerDB(): Promise<string> {
FILE: drizzle-kit/tests/push/singlestore.test.ts
function createDockerDB (line 33) | async function createDockerDB(context: any): Promise<string> {
method case1 (line 297) | async case1() {
FILE: drizzle-kit/tests/schemaDiffer.ts
type PostgresSchema (line 91) | type PostgresSchema = Record<
type MysqlSchema (line 103) | type MysqlSchema = Record<
type SqliteSchema (line 107) | type SqliteSchema = Record<string, SQLiteTable<any> | SQLiteView>;
type SinglestoreSchema (line 108) | type SinglestoreSchema = Record<
function diffTestSchemasPushLibSQL (line 1940) | async function diffTestSchemasPushLibSQL(
FILE: drizzle-kit/tests/test/sqlite.test.ts
method columns1 (line 7) | async columns1() {
FILE: drizzle-orm/scripts/build.ts
function updateAndCopyPackageJson (line 5) | async function updateAndCopyPackageJson() {
FILE: drizzle-orm/scripts/fix-imports.ts
function resolvePathAlias (line 8) | function resolvePathAlias(importPath: string, file: string) {
function fixImportPath (line 17) | function fixImportPath(importPath: string, file: string, ext: string) {
method visitImportDeclaration (line 33) | visitImportDeclaration(path) {
method visitExportAllDeclaration (line 37) | visitExportAllDeclaration(path) {
method visitExportNamedDeclaration (line 41) | visitExportNamedDeclaration(path) {
method visitCallExpression (line 47) | visitCallExpression(path) {
method visitTSImportType (line 53) | visitTSImportType(path) {
method visitAwaitExpression (line 57) | visitAwaitExpression(path) {
method visitImportDeclaration (line 74) | visitImportDeclaration(path) {
method visitExportAllDeclaration (line 78) | visitExportAllDeclaration(path) {
method visitExportNamedDeclaration (line 82) | visitExportNamedDeclaration(path) {
method visitTSImportType (line 88) | visitTSImportType(path) {
method visitAwaitExpression (line 92) | visitAwaitExpression(path) {
FILE: drizzle-orm/src/alias.ts
class ColumnAliasProxyHandler (line 10) | class ColumnAliasProxyHandler<TColumn extends Column> implements ProxyHa...
method constructor (line 13) | constructor(private table: Table | View) {}
method get (line 15) | get(columnObj: TColumn, prop: string | symbol): any {
class TableAliasProxyHandler (line 24) | class TableAliasProxyHandler<T extends Table | View> implements ProxyHan...
method constructor (line 27) | constructor(private alias: string, private replaceOriginalName: boolea...
method get (line 29) | get(target: T, prop: string | symbol): any {
class RelationTableAliasProxyHandler (line 77) | class RelationTableAliasProxyHandler<T extends Relation> implements Prox...
method constructor (line 80) | constructor(private alias: string) {}
method get (line 82) | get(target: T, prop: string | symbol): any {
function aliasedTable (line 91) | function aliasedTable<T extends Table | View>(
function aliasedRelation (line 98) | function aliasedRelation<T extends Relation>(relation: T, tableAlias: st...
function aliasedTableColumn (line 102) | function aliasedTableColumn<T extends AnyColumn>(column: T, tableAlias: ...
function mapColumnsInAliasedSQLToAlias (line 109) | function mapColumnsInAliasedSQLToAlias(query: SQL.Aliased, alias: string...
function mapColumnsInSQLToAlias (line 113) | function mapColumnsInSQLToAlias(query: SQL, alias: string): SQL {
FILE: drizzle-orm/src/aws-data-api/common/index.ts
function getValueFromDataApi (line 5) | function getValueFromDataApi(field: Field) {
function typingsToAwsTypeHint (line 42) | function typingsToAwsTypeHint(typings?: QueryTypingsValue): TypeHint | u...
function toValueParam (line 60) | function toValueParam(value: any, typings?: QueryTypingsValue): { value:...
FILE: drizzle-orm/src/aws-data-api/pg/driver.ts
type PgDriverOptions (line 22) | interface PgDriverOptions {
type DrizzleAwsDataApiPgConfig (line 30) | interface DrizzleAwsDataApiPgConfig<
class AwsDataApiPgDatabase (line 38) | class AwsDataApiPgDatabase<
method execute (line 43) | override execute<
class AwsPgDialect (line 50) | class AwsPgDialect extends PgDialect {
method escapeParam (line 53) | override escapeParam(num: number): string {
method buildInsertQuery (line 57) | override buildInsertQuery(
method buildUpdateSet (line 79) | override buildUpdateSet(table: PgTable<TableConfig>, set: UpdateSet): ...
function construct (line 95) | function construct<TSchema extends Record<string, unknown> = Record<stri...
function drizzle (line 133) | function drizzle<
function mock (line 182) | function mock<TSchema extends Record<string, unknown> = Record<string, n...
FILE: drizzle-orm/src/aws-data-api/pg/migrator.ts
function migrate (line 5) | async function migrate<TSchema extends Record<string, unknown>>(
FILE: drizzle-orm/src/aws-data-api/pg/session.ts
type AwsDataApiClient (line 28) | type AwsDataApiClient = RDSDataClient;
class AwsDataApiPreparedQuery (line 30) | class AwsDataApiPreparedQuery<
method constructor (line 37) | constructor(
method execute (line 67) | async execute(placeholderValues: Record<string, unknown> | undefined =...
method all (line 102) | async all(placeholderValues?: Record<string, unknown> | undefined): Pr...
method values (line 110) | async values(placeholderValues: Record<string, unknown> = {}): Promise...
method mapResultRows (line 134) | mapResultRows(records: Field[][], columnMetadata: ColumnMetadata[]) {
method isResponseInArrayMode (line 146) | isResponseInArrayMode(): boolean {
type AwsDataApiSessionOptions (line 151) | interface AwsDataApiSessionOptions {
type AwsDataApiQueryBase (line 159) | interface AwsDataApiQueryBase {
class AwsDataApiSession (line 165) | class AwsDataApiSession<
method constructor (line 175) | constructor(
method prepareQuery (line 193) | prepareQuery<
method execute (line 225) | override execute<T>(query: SQL): Promise<T> {
method transaction (line 238) | override async transaction<T>(
class AwsDataApiTransaction (line 259) | class AwsDataApiTransaction<
method transaction (line 265) | override async transaction<T>(
type AwsDataApiPgQueryResult (line 287) | type AwsDataApiPgQueryResult<T> = ExecuteStatementCommandOutput & { rows...
type AwsDataApiPgQueryResultHKT (line 289) | interface AwsDataApiPgQueryResultHKT extends PgQueryResultHKT {
FILE: drizzle-orm/src/batch.ts
type BatchItem (line 4) | type BatchItem<TDialect extends Dialect = Dialect> = RunnableQuery<any, ...
type BatchResponse (line 6) | type BatchResponse<T extends BatchItem[] | readonly BatchItem[]> = {
FILE: drizzle-orm/src/better-sqlite3/driver.ts
type DrizzleBetterSQLite3DatabaseConfig (line 15) | type DrizzleBetterSQLite3DatabaseConfig =
class BetterSQLite3Database (line 24) | class BetterSQLite3Database<TSchema extends Record<string, unknown> = Re...
function construct (line 30) | function construct<TSchema extends Record<string, unknown> = Record<stri...
function drizzle (line 68) | function drizzle<
function mock (line 126) | function mock<TSchema extends Record<string, unknown> = Record<string, n...
FILE: drizzle-orm/src/better-sqlite3/migrator.ts
function migrate (line 5) | function migrate<TSchema extends Record<string, unknown>>(
FILE: drizzle-orm/src/better-sqlite3/session.ts
type BetterSQLiteSessionOptions (line 21) | interface BetterSQLiteSessionOptions {
type PreparedQueryConfig (line 26) | type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | '...
class BetterSQLiteSession (line 28) | class BetterSQLiteSession<
method constructor (line 37) | constructor(
method prepareQuery (line 48) | prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(
method transaction (line 75) | override transaction<T>(
class BetterSQLiteTransaction (line 85) | class BetterSQLiteTransaction<
method transaction (line 91) | override transaction<T>(transaction: (tx: BetterSQLiteTransaction<TFul...
class PreparedQuery (line 106) | class PreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig>...
method constructor (line 111) | constructor(
method run (line 129) | run(placeholderValues?: Record<string, unknown>): RunResult {
method all (line 135) | all(placeholderValues?: Record<string, unknown>): T['all'] {
method get (line 150) | get(placeholderValues?: Record<string, unknown>): T['get'] {
method values (line 172) | values(placeholderValues?: Record<string, unknown>): T['values'] {
method isResponseInArrayMode (line 179) | isResponseInArrayMode(): boolean {
FILE: drizzle-orm/src/bun-sql/driver.ts
class BunSQLDatabase (line 19) | class BunSQLDatabase<
function construct (line 25) | function construct<TSchema extends Record<string, unknown> = Record<stri...
function drizzle (line 63) | function drizzle<
function mock (line 114) | function mock<TSchema extends Record<string, unknown> = Record<string, n...
FILE: drizzle-orm/src/bun-sql/migrator.ts
function migrate (line 5) | async function migrate<TSchema extends Record<string, unknown>>(
FILE: drizzle-orm/src/bun-sql/session.ts
class BunSQLPreparedQuery (line 19) | class BunSQLPreparedQuery<T extends PreparedQueryConfig> extends PgPrepa...
method constructor (line 22) | constructor(
method execute (line 40) | async execute(placeholderValues: Record<string, unknown> | undefined =...
method all (line 79) | all(placeholderValues: Record<string, unknown> | undefined = {}): Prom...
method isResponseInArrayMode (line 100) | isResponseInArrayMode(): boolean {
type BunSQLSessionOptions (line 105) | interface BunSQLSessionOptions {
class BunSQLSession (line 110) | class BunSQLSession<
method constructor (line 120) | constructor(
method prepareQuery (line 132) | prepareQuery<T extends PreparedQueryConfig = PreparedQueryConfig>(
method query (line 158) | query(query: string, params: unknown[]): Promise<any> {
method queryObjects (line 163) | queryObjects(
method transaction (line 170) | override transaction<T>(
class BunSQLTransaction (line 190) | class BunSQLTransaction<
method constructor (line 196) | constructor(
method transaction (line 206) | override transaction<T>(
type BunSQLQueryResultHKT (line 222) | interface BunSQLQueryResultHKT extends PgQueryResultHKT {
FILE: drizzle-orm/src/bun-sqlite/driver.ts
class BunSQLiteDatabase (line 17) | class BunSQLiteDatabase<
type DrizzleBunSqliteDatabaseOptions (line 23) | type DrizzleBunSqliteDatabaseOptions = {
type DrizzleBunSqliteDatabaseConfig (line 44) | type DrizzleBunSqliteDatabaseConfig =
function construct (line 51) | function construct<TSchema extends Record<string, unknown> = Record<stri...
function drizzle (line 85) | function drizzle<
function mock (line 146) | function mock<TSchema extends Record<string, unknown> = Record<string, n...
FILE: drizzle-orm/src/bun-sqlite/migrator.ts
function migrate (line 5) | function migrate<TSchema extends Record<string, unknown>>(
FILE: drizzle-orm/src/bun-sqlite/session.ts
type SQLiteBunSessionOptions (line 20) | interface SQLiteBunSessionOptions {
type PreparedQueryConfig (line 24) | type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | '...
type Statement (line 25) | type Statement = BunStatement<any>;
class SQLiteBunSession (line 27) | class SQLiteBunSession<
method constructor (line 35) | constructor(
method exec (line 45) | exec(query: string): void {
method prepareQuery (line 49) | prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(
method transaction (line 68) | override transaction<T>(
class SQLiteBunTransaction (line 82) | class SQLiteBunTransaction<
method transaction (line 88) | override transaction<T>(transaction: (tx: SQLiteBunTransaction<TFullSc...
class PreparedQuery (line 103) | class PreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig>...
method constructor (line 108) | constructor(
method run (line 120) | run(placeholderValues?: Record<string, unknown>) {
method all (line 126) | all(placeholderValues?: Record<string, unknown>): T['all'] {
method get (line 143) | get(placeholderValues?: Record<string, unknown>): T['get'] {
method values (line 164) | values(placeholderValues?: Record<string, unknown>): T['values'] {
method isResponseInArrayMode (line 171) | isResponseInArrayMode(): boolean {
FILE: drizzle-orm/src/cache/core/cache.ts
class NoopCache (line 44) | class NoopCache extends Cache {
method strategy (line 45) | override strategy() {
method get (line 51) | override async get(_key: string): Promise<any[] | undefined> {
method put (line 54) | override async put(
method onMutate (line 62) | override async onMutate(_params: MutationOption): Promise<void> {
type MutationOption (line 67) | type MutationOption = { tags?: string | string[]; tables?: Table<any> | ...
function hashQuery (line 69) | async function hashQuery(sql: string, params?: any[]) {
FILE: drizzle-orm/src/cache/core/types.ts
type CacheConfig (line 1) | type CacheConfig = {
type WithCacheConfig (line 29) | type WithCacheConfig = { enable: boolean; config?: CacheConfig; tag?: st...
FILE: drizzle-orm/src/cache/upstash/cache.ts
type Script (line 56) | type Script = ReturnType<Redis['createScript']>;
type ExpireOptions (line 58) | type ExpireOptions = 'NX' | 'nx' | 'XX' | 'xx' | 'GT' | 'gt' | 'LT' | 'lt';
class UpstashCache (line 60) | class UpstashCache extends Cache {
method constructor (line 103) | constructor(public redis: Redis, config?: CacheConfig, protected useGl...
method strategy (line 112) | public strategy() {
method toInternalConfig (line 116) | private toInternalConfig(config?: CacheConfig): { seconds: number; hex...
method get (line 127) | override async get(
method put (line 149) | override async put(
method onMutate (line 191) | override async onMutate(params: MutationOption) {
function upstashCache (line 204) | function upstashCache(
FILE: drizzle-orm/src/casing.ts
function toSnakeCase (line 6) | function toSnakeCase(input: string) {
function toCamelCase (line 14) | function toCamelCase(input: string) {
function noopCase (line 25) | function noopCase(input: string) {
class CasingCache (line 29) | class CasingCache {
method constructor (line 37) | constructor(casing?: Casing) {
method getColumnCasing (line 45) | getColumnCasing(column: Column): string {
method cacheTable (line 58) | private cacheTable(table: Table) {
method clearCache (line 72) | clearCache() {
FILE: drizzle-orm/src/column-builder.ts
type ColumnDataType (line 11) | type ColumnDataType =
type Dialect (line 28) | type Dialect = 'pg' | 'mysql' | 'sqlite' | 'singlestore' | 'common' | 'g...
type GeneratedStorageMode (line 30) | type GeneratedStorageMode = 'virtual' | 'stored';
type GeneratedType (line 32) | type GeneratedType = 'always' | 'byDefault';
type GeneratedColumnConfig (line 34) | type GeneratedColumnConfig<TDataType> = {
type GeneratedIdentityConfig (line 40) | type GeneratedIdentityConfig = {
type ColumnBuilderBaseConfig (line 46) | interface ColumnBuilderBaseConfig<TDataType extends ColumnDataType, TCol...
type MakeColumnConfig (line 55) | type MakeColumnConfig<
type ColumnBuilderTypeConfig (line 81) | type ColumnBuilderTypeConfig<
type ColumnBuilderRuntimeConfig (line 102) | type ColumnBuilderRuntimeConfig<TData, TRuntimeConfig extends object = o...
type ColumnBuilderExtraConfig (line 120) | interface ColumnBuilderExtraConfig {
type NotNull (line 124) | type NotNull<T extends ColumnBuilderBase> = T & {
type HasDefault (line 130) | type HasDefault<T extends ColumnBuilderBase> = T & {
type IsPrimaryKey (line 136) | type IsPrimaryKey<T extends ColumnBuilderBase> = T & {
type IsAutoincrement (line 142) | type IsAutoincrement<T extends ColumnBuilderBase> = T & {
type HasRuntimeDefault (line 148) | type HasRuntimeDefault<T extends ColumnBuilderBase> = T & {
type $Type (line 154) | type $Type<T extends ColumnBuilderBase, TType> = T & {
type HasGenerated (line 160) | type HasGenerated<T extends ColumnBuilderBase, TGenerated extends {} = {...
type IsIdentity (line 167) | type IsIdentity<
type ColumnBuilderBase (line 177) | interface ColumnBuilderBase<
method constructor (line 197) | constructor(name: T['name'], dataType: T['dataType'], columnType: T['col...
method $type (line 225) | $type<TType>(): $Type<this, TType> {
method notNull (line 234) | notNull(): NotNull<this> {
method default (line 246) | default(value: (this['_'] extends { $type: infer U } ? U : this['_']['da...
method $defaultFn (line 258) | $defaultFn(
method $onUpdateFn (line 278) | $onUpdateFn(
method primaryKey (line 296) | primaryKey(): TExtraConfig['primaryKeyHasDefault'] extends true ? IsPrim...
method setName (line 313) | setName(name: string) {
type BuildColumn (line 319) | type BuildColumn<
type BuildIndexColumn (line 373) | type BuildIndexColumn<
type BuildColumns (line 386) | type BuildColumns<
type BuildExtraConfigColumns (line 400) | type BuildExtraConfigColumns<
type ChangeColumnTableName (line 410) | type ChangeColumnTableName<TColumn extends Column, TAlias extends string...
FILE: drizzle-orm/src/column.ts
type ColumnBaseConfig (line 13) | interface ColumnBaseConfig<
type ColumnTypeConfig (line 25) | type ColumnTypeConfig<T extends ColumnBaseConfig<ColumnDataType, string>...
type ColumnRuntimeConfig (line 44) | type ColumnRuntimeConfig<TData, TRuntimeConfig extends object> = ColumnB...
type Column (line 49) | interface Column<
method constructor (line 91) | constructor(
method mapFromDriverValue (line 115) | mapFromDriverValue(value: unknown): unknown {
method mapToDriverValue (line 119) | mapToDriverValue(value: unknown): unknown {
method shouldDisableInsert (line 124) | shouldDisableInsert(): boolean {
type UpdateColConfig (line 129) | type UpdateColConfig<
type AnyColumn (line 134) | type AnyColumn<TPartial extends Partial<ColumnBaseConfig<ColumnDataType,...
type GetColumnData (line 138) | type GetColumnData<TColumn extends Column, TInferMode extends 'query' | ...
type InferColumnsDataTypes (line 146) | type InferColumnsDataTypes<TColumns extends Record<string, Column>> = {
FILE: drizzle-orm/src/d1/driver.ts
type AnyD1Database (line 18) | type AnyD1Database = IfNotImported<
class DrizzleD1Database (line 24) | class DrizzleD1Database<
method batch (line 32) | async batch<U extends BatchItem<'sqlite'>, T extends Readonly<[U, ...U...
function drizzle (line 39) | function drizzle<
FILE: drizzle-orm/src/d1/migrator.ts
function migrate (line 6) | async function migrate<TSchema extends Record<string, unknown>>(
FILE: drizzle-orm/src/d1/session.ts
type SQLiteD1SessionOptions (line 23) | interface SQLiteD1SessionOptions {
type PreparedQueryConfig (line 28) | type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | '...
class SQLiteD1Session (line 30) | class SQLiteD1Session<
method constructor (line 39) | constructor(
method prepareQuery (line 50) | prepareQuery(
method batch (line 77) | async batch<T extends BatchItem<'sqlite'>[] | readonly BatchItem<'sqli...
method extractRawAllValueFromBatchResult (line 99) | override extractRawAllValueFromBatchResult(result: unknown): unknown {
method extractRawGetValueFromBatchResult (line 103) | override extractRawGetValueFromBatchResult(result: unknown): unknown {
method extractRawValuesValueFromBatchResult (line 107) | override extractRawValuesValueFromBatchResult(result: unknown): unknown {
method transaction (line 111) | override async transaction<T>(
class D1Transaction (line 128) | class D1Transaction<
method transaction (line 134) | override async transaction<T>(transaction: (tx: D1Transaction<TFullSch...
function d1ToRawMapping (line 155) | function d1ToRawMapping(results: any) {
class D1PreparedQuery (line 164) | class D1PreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfi...
method constructor (line 178) | constructor(
method run (line 199) | async run(placeholderValues?: Record<string, unknown>): Promise<D1Resp...
method all (line 207) | async all(placeholderValues?: Record<string, unknown>): Promise<T['all...
method mapAllResult (line 222) | override mapAllResult(rows: unknown, isFromBatch?: boolean): unknown {
method get (line 238) | async get(placeholderValues?: Record<string, unknown>): Promise<T['get...
method mapGetResult (line 261) | override mapGetResult(result: unknown, isFromBatch?: boolean): unknown {
method values (line 277) | async values<T extends any[] = unknown[]>(placeholderValues?: Record<s...
method isResponseInArrayMode (line 286) | isResponseInArrayMode(): boolean {
FILE: drizzle-orm/src/durable-sqlite/driver.ts
class DrizzleSqliteDODatabase (line 16) | class DrizzleSqliteDODatabase<
function drizzle (line 25) | function drizzle<
FILE: drizzle-orm/src/durable-sqlite/migrator.ts
type MigrationConfig (line 5) | interface MigrationConfig {
function readMigrationFiles (line 12) | function readMigrationFiles({ journal, migrations }: MigrationConfig): M...
function migrate (line 41) | async function migrate<
FILE: drizzle-orm/src/durable-sqlite/session.ts
type SQLiteDOSessionOptions (line 17) | interface SQLiteDOSessionOptions {
type PreparedQueryConfig (line 21) | type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | '...
class SQLiteDOSession (line 23) | class SQLiteDOSession<TFullSchema extends Record<string, unknown>, TSche...
method constructor (line 35) | constructor(
method prepareQuery (line 45) | prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(
method transaction (line 63) | override transaction<T>(
class SQLiteDOTransaction (line 74) | class SQLiteDOTransaction<TFullSchema extends Record<string, unknown>, T...
method transaction (line 84) | override transaction<T>(transaction: (tx: SQLiteDOTransaction<TFullSch...
class SQLiteDOPreparedQuery (line 90) | class SQLiteDOPreparedQuery<T extends PreparedQueryConfig = PreparedQuer...
method constructor (line 100) | constructor(
method run (line 113) | run(placeholderValues?: Record<string, unknown>): void {
method all (line 120) | all(placeholderValues?: Record<string, unknown>): T['all'] {
method get (line 138) | get(placeholderValues?: Record<string, unknown>): T['get'] {
method values (line 161) | values(placeholderValues?: Record<string, unknown>): T['values'] {
method isResponseInArrayMode (line 174) | isResponseInArrayMode(): boolean {
FILE: drizzle-orm/src/entity.ts
type DrizzleEntity (line 4) | interface DrizzleEntity {
type DrizzleEntityClass (line 8) | type DrizzleEntityClass<T> =
function is (line 12) | function is<T extends DrizzleEntityClass<any>>(value: any, type: T): val...
FILE: drizzle-orm/src/errors.ts
class DrizzleError (line 3) | class DrizzleError extends Error {
method constructor (line 6) | constructor({ message, cause }: { message?: string; cause?: unknown }) {
class DrizzleQueryError (line 13) | class DrizzleQueryError extends Error {
method constructor (line 14) | constructor(
class TransactionRollbackError (line 27) | class TransactionRollbackError extends DrizzleError {
method constructor (line 30) | constructor() {
FILE: drizzle-orm/src/expo-sqlite/driver.ts
class ExpoSQLiteDatabase (line 15) | class ExpoSQLiteDatabase<TSchema extends Record<string, unknown> = Recor...
function drizzle (line 21) | function drizzle<TSchema extends Record<string, unknown> = Record<string...
FILE: drizzle-orm/src/expo-sqlite/migrator.ts
type MigrationConfig (line 5) | interface MigrationConfig {
function readMigrationFiles (line 12) | async function readMigrationFiles({ journal, migrations }: MigrationConf...
function migrate (line 41) | async function migrate<TSchema extends Record<string, unknown>>(
type State (line 49) | interface State {
type Action (line 54) | type Action =
FILE: drizzle-orm/src/expo-sqlite/session.ts
type ExpoSQLiteSessionOptions (line 19) | interface ExpoSQLiteSessionOptions {
type PreparedQueryConfig (line 23) | type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | '...
class ExpoSQLiteSession (line 25) | class ExpoSQLiteSession<
method constructor (line 33) | constructor(
method prepareQuery (line 43) | prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(
method transaction (line 62) | override transaction<T>(
class ExpoSQLiteTransaction (line 79) | class ExpoSQLiteTransaction<
method transaction (line 85) | override transaction<T>(transaction: (tx: ExpoSQLiteTransaction<TFullS...
class ExpoSQLitePreparedQuery (line 100) | class ExpoSQLitePreparedQuery<T extends PreparedQueryConfig = PreparedQu...
method constructor (line 105) | constructor(
method run (line 117) | run(placeholderValues?: Record<string, unknown>): SQLiteRunResult {
method all (line 127) | all(placeholderValues?: Record<string, unknown>): T['all'] {
method get (line 142) | get(placeholderValues?: Record<string, unknown>): T['get'] {
method values (line 165) | values(placeholderValues?: Record<string, unknown>): T['values'] {
method isResponseInArrayMode (line 172) | isResponseInArrayMode(): boolean {
FILE: drizzle-orm/src/gel-core/alias.ts
function alias (line 7) | function alias<TTable extends GelTable | GelViewBase, TAlias extends str...
FILE: drizzle-orm/src/gel-core/checks.ts
class CheckBuilder (line 5) | class CheckBuilder {
method constructor (line 10) | constructor(public name: string, public value: SQL) {}
method build (line 13) | build(table: GelTable): Check {
class Check (line 18) | class Check {
method constructor (line 24) | constructor(public table: GelTable, builder: CheckBuilder) {
function check (line 30) | function check(name: string, value: SQL): CheckBuilder {
FILE: drizzle-orm/src/gel-core/columns/all.ts
function getGelColumnBuilders (line 23) | function getGelColumnBuilders() {
type GelColumnsBuilders (line 48) | type GelColumnsBuilders = ReturnType<typeof getGelColumnBuilders>;
FILE: drizzle-orm/src/gel-core/columns/bigint.ts
type GelInt53BuilderInitial (line 8) | type GelInt53BuilderInitial<TName extends string> = GelInt53Builder<{
class GelInt53Builder (line 17) | class GelInt53Builder<T extends ColumnBuilderBaseConfig<'number', 'GelIn...
method constructor (line 22) | constructor(name: T['name']) {
method build (line 27) | override build<TTableName extends string>(
class GelInt53 (line 34) | class GelInt53<T extends ColumnBaseConfig<'number', 'GelInt53'>> extends...
method getSQLType (line 37) | getSQLType(): string {
function bigint (line 44) | function bigint(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/bigintT.ts
type GelBigInt64BuilderInitial (line 8) | type GelBigInt64BuilderInitial<TName extends string> = GelBigInt64Builder<{
class GelBigInt64Builder (line 17) | class GelBigInt64Builder<T extends ColumnBuilderBaseConfig<'bigint', 'Ge...
method constructor (line 22) | constructor(name: T['name']) {
method build (line 27) | override build<TTableName extends string>(
class GelBigInt64 (line 37) | class GelBigInt64<T extends ColumnBaseConfig<'bigint', 'GelBigInt64'>> e...
method getSQLType (line 40) | getSQLType(): string {
method mapFromDriverValue (line 44) | override mapFromDriverValue(value: string): bigint {
function bigintT (line 51) | function bigintT(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/boolean.ts
type GelBooleanBuilderInitial (line 7) | type GelBooleanBuilderInitial<TName extends string> = GelBooleanBuilder<{
class GelBooleanBuilder (line 16) | class GelBooleanBuilder<T extends ColumnBuilderBaseConfig<'boolean', 'Ge...
method constructor (line 19) | constructor(name: T['name']) {
method build (line 24) | override build<TTableName extends string>(
class GelBoolean (line 31) | class GelBoolean<T extends ColumnBaseConfig<'boolean', 'GelBoolean'>> ex...
method getSQLType (line 34) | getSQLType(): string {
function boolean (line 41) | function boolean(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/bytes.ts
type GelBytesBuilderInitial (line 7) | type GelBytesBuilderInitial<TName extends string> = GelBytesBuilder<{
class GelBytesBuilder (line 16) | class GelBytesBuilder<T extends ColumnBuilderBaseConfig<'buffer', 'GelBy...
method constructor (line 19) | constructor(name: T['name']) {
method build (line 24) | override build<TTableName extends string>(
class GelBytes (line 34) | class GelBytes<T extends ColumnBaseConfig<'buffer', 'GelBytes'>> extends...
method getSQLType (line 37) | getSQLType(): string {
function bytes (line 44) | function bytes(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/common.ts
type ReferenceConfig (line 24) | interface ReferenceConfig {
type GelColumnBuilderBase (line 32) | interface GelColumnBuilderBase<
method array (line 49) | array<TSize extends number | undefined = undefined>(size?: TSize): GelAr...
method references (line 67) | references(
method unique (line 75) | unique(
method generatedAlwaysAs (line 85) | generatedAlwaysAs(as: SQL | T['data'] | (() => SQL)): HasGenerated<this, {
method buildForeignKeys (line 99) | buildForeignKeys(column: GelColumn, table: GelTable): ForeignKey[] {
method buildExtraConfigColumn (line 127) | buildExtraConfigColumn<TTableName extends string>(
method constructor (line 142) | constructor(
type IndexedExtraConfigType (line 153) | type IndexedExtraConfigType = { order?: 'asc' | 'desc'; nulls?: 'first' ...
class GelExtraConfigColumn (line 155) | class GelExtraConfigColumn<
method getSQLType (line 160) | override getSQLType(): string {
method asc (line 175) | asc(): Omit<this, 'asc' | 'desc'> {
method desc (line 180) | desc(): Omit<this, 'asc' | 'desc'> {
method nullsFirst (line 185) | nullsFirst(): Omit<this, 'nullsFirst' | 'nullsLast'> {
method nullsLast (line 190) | nullsLast(): Omit<this, 'nullsFirst' | 'nullsLast'> {
method op (line 224) | op(opClass: GelIndexOpClass): Omit<this, 'op'> {
class IndexedColumn (line 230) | class IndexedColumn {
method constructor (line 232) | constructor(
type AnyGelColumn (line 250) | type AnyGelColumn<TPartial extends Partial<ColumnBaseConfig<ColumnDataTy...
type GelArrayColumnBuilderBaseConfig (line 254) | type GelArrayColumnBuilderBaseConfig = ColumnBuilderBaseConfig<'array', ...
class GelArrayBuilder (line 259) | class GelArrayBuilder<
method constructor (line 285) | constructor(
method build (line 296) | override build<TTableName extends string>(
class GelArray (line 308) | class GelArray<
method constructor (line 319) | constructor(
method getSQLType (line 329) | getSQLType(): string {
FILE: drizzle-orm/src/gel-core/columns/custom.ts
type ConvertCustomConfig (line 9) | type ConvertCustomConfig<TName extends string, T extends Partial<CustomT...
type GelCustomColumnInnerConfig (line 21) | interface GelCustomColumnInnerConfig {
class GelCustomColumnBuilder (line 25) | class GelCustomColumnBuilder<T extends ColumnBuilderBaseConfig<'custom',...
method constructor (line 39) | constructor(
method build (line 50) | build<TTableName extends string>(
class GelCustomColumn (line 60) | class GelCustomColumn<T extends ColumnBaseConfig<'custom', 'GelCustomCol...
method constructor (line 67) | constructor(
method getSQLType (line 77) | getSQLType(): string {
method mapFromDriverValue (line 81) | override mapFromDriverValue(value: T['driverParam']): T['data'] {
method mapToDriverValue (line 85) | override mapToDriverValue(value: T['data']): T['driverParam'] {
type CustomTypeValues (line 90) | type CustomTypeValues = {
type CustomTypeParams (line 143) | interface CustomTypeParams<T extends CustomTypeValues> {
function customType (line 203) | function customType<T extends CustomTypeValues = CustomTypeValues>(
FILE: drizzle-orm/src/gel-core/columns/date-duration.ts
type GelDateDurationBuilderInitial (line 8) | type GelDateDurationBuilderInitial<TName extends string> = GelDateDurati...
class GelDateDurationBuilder (line 17) | class GelDateDurationBuilder<T extends ColumnBuilderBaseConfig<'dateDura...
method constructor (line 22) | constructor(
method build (line 29) | override build<TTableName extends string>(
class GelDateDuration (line 39) | class GelDateDuration<T extends ColumnBaseConfig<'dateDuration', 'GelDat...
method getSQLType (line 42) | getSQLType(): string {
function dateDuration (line 49) | function dateDuration(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/date.common.ts
method defaultNow (line 12) | defaultNow() {
FILE: drizzle-orm/src/gel-core/columns/decimal.ts
type GelDecimalBuilderInitial (line 7) | type GelDecimalBuilderInitial<TName extends string> = GelDecimalBuilder<{
class GelDecimalBuilder (line 16) | class GelDecimalBuilder<T extends ColumnBuilderBaseConfig<'string', 'Gel...
method constructor (line 21) | constructor(name: T['name']) {
method build (line 26) | override build<TTableName extends string>(
class GelDecimal (line 33) | class GelDecimal<T extends ColumnBaseConfig<'string', 'GelDecimal'>> ext...
method constructor (line 36) | constructor(table: AnyGelTable<{ name: T['tableName'] }>, config: GelD...
method getSQLType (line 40) | getSQLType(): string {
function decimal (line 47) | function decimal(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/double-precision.ts
type GelDoublePrecisionBuilderInitial (line 7) | type GelDoublePrecisionBuilderInitial<TName extends string> = GelDoubleP...
class GelDoublePrecisionBuilder (line 16) | class GelDoublePrecisionBuilder<T extends ColumnBuilderBaseConfig<'numbe...
method constructor (line 21) | constructor(name: T['name']) {
method build (line 26) | override build<TTableName extends string>(
class GelDoublePrecision (line 36) | class GelDoublePrecision<T extends ColumnBaseConfig<'number', 'GelDouble...
method getSQLType (line 39) | getSQLType(): string {
method mapFromDriverValue (line 43) | override mapFromDriverValue(value: string | number): number {
function doublePrecision (line 53) | function doublePrecision(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/duration.ts
type GelDurationBuilderInitial (line 8) | type GelDurationBuilderInitial<TName extends string> = GelDurationBuilder<{
class GelDurationBuilder (line 17) | class GelDurationBuilder<T extends ColumnBuilderBaseConfig<'duration', '...
method constructor (line 22) | constructor(
method build (line 29) | override build<TTableName extends string>(
class GelDuration (line 36) | class GelDuration<T extends ColumnBaseConfig<'duration', 'GelDuration'>>...
method getSQLType (line 39) | getSQLType(): string {
function duration (line 46) | function duration(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/int.common.ts
method generatedAlwaysAsIdentity (line 14) | generatedAlwaysAsIdentity(
method generatedByDefaultAsIdentity (line 36) | generatedByDefaultAsIdentity(
FILE: drizzle-orm/src/gel-core/columns/integer.ts
type GelIntegerBuilderInitial (line 8) | type GelIntegerBuilderInitial<TName extends string> = GelIntegerBuilder<{
class GelIntegerBuilder (line 17) | class GelIntegerBuilder<T extends ColumnBuilderBaseConfig<'number', 'Gel...
method constructor (line 22) | constructor(name: T['name']) {
method build (line 27) | override build<TTableName extends string>(
class GelInteger (line 34) | class GelInteger<T extends ColumnBaseConfig<'number', 'GelInteger'>> ext...
method getSQLType (line 37) | getSQLType(): string {
function integer (line 44) | function integer(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/json.ts
type GelJsonBuilderInitial (line 7) | type GelJsonBuilderInitial<TName extends string> = GelJsonBuilder<{
class GelJsonBuilder (line 16) | class GelJsonBuilder<T extends ColumnBuilderBaseConfig<'json', 'GelJson'...
method constructor (line 21) | constructor(name: T['name']) {
method build (line 26) | override build<TTableName extends string>(
class GelJson (line 33) | class GelJson<T extends ColumnBaseConfig<'json', 'GelJson'>> extends Gel...
method constructor (line 36) | constructor(table: AnyGelTable<{ name: T['tableName'] }>, config: GelJ...
method getSQLType (line 40) | getSQLType(): string {
function json (line 47) | function json(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/localdate.ts
type GelLocalDateStringBuilderInitial (line 9) | type GelLocalDateStringBuilderInitial<TName extends string> = GelLocalDa...
class GelLocalDateStringBuilder (line 18) | class GelLocalDateStringBuilder<T extends ColumnBuilderBaseConfig<'local...
method constructor (line 23) | constructor(name: T['name']) {
method build (line 28) | override build<TTableName extends string>(
class GelLocalDateString (line 38) | class GelLocalDateString<T extends ColumnBaseConfig<'localDate', 'GelLoc...
method getSQLType (line 41) | getSQLType(): string {
function localDate (line 48) | function localDate(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/localtime.ts
type GelLocalTimeBuilderInitial (line 9) | type GelLocalTimeBuilderInitial<TName extends string> = GelLocalTimeBuil...
class GelLocalTimeBuilder (line 18) | class GelLocalTimeBuilder<T extends ColumnBuilderBaseConfig<'localTime',...
method constructor (line 23) | constructor(name: T['name']) {
method build (line 28) | override build<TTableName extends string>(
class GelLocalTime (line 38) | class GelLocalTime<T extends ColumnBaseConfig<'localTime', 'GelLocalTime...
method getSQLType (line 41) | getSQLType(): string {
function localTime (line 48) | function localTime(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/real.ts
type GelRealBuilderInitial (line 7) | type GelRealBuilderInitial<TName extends string> = GelRealBuilder<{
class GelRealBuilder (line 16) | class GelRealBuilder<T extends ColumnBuilderBaseConfig<'number', 'GelRea...
method constructor (line 22) | constructor(name: T['name'], length?: number) {
method build (line 28) | override build<TTableName extends string>(
class GelReal (line 35) | class GelReal<T extends ColumnBaseConfig<'number', 'GelReal'>> extends G...
method constructor (line 38) | constructor(table: AnyGelTable<{ name: T['tableName'] }>, config: GelR...
method getSQLType (line 42) | getSQLType(): string {
function real (line 49) | function real(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/relative-duration.ts
type GelRelDurationBuilderInitial (line 8) | type GelRelDurationBuilderInitial<TName extends string> = GelRelDuration...
class GelRelDurationBuilder (line 17) | class GelRelDurationBuilder<T extends ColumnBuilderBaseConfig<'relDurati...
method constructor (line 22) | constructor(
method build (line 29) | override build<TTableName extends string>(
class GelRelDuration (line 39) | class GelRelDuration<T extends ColumnBaseConfig<'relDuration', 'GelRelDu...
method getSQLType (line 42) | getSQLType(): string {
function relDuration (line 49) | function relDuration(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/smallint.ts
type GelSmallIntBuilderInitial (line 8) | type GelSmallIntBuilderInitial<TName extends string> = GelSmallIntBuilder<{
class GelSmallIntBuilder (line 17) | class GelSmallIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'Ge...
method constructor (line 22) | constructor(name: T['name']) {
method build (line 27) | override build<TTableName extends string>(
class GelSmallInt (line 34) | class GelSmallInt<T extends ColumnBaseConfig<'number', 'GelSmallInt'>> e...
method getSQLType (line 37) | getSQLType(): string {
function smallint (line 44) | function smallint(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/text.ts
type GelTextBuilderInitial (line 7) | type GelTextBuilderInitial<TName extends string> = GelTextBuilder<{
class GelTextBuilder (line 16) | class GelTextBuilder<
method constructor (line 21) | constructor(
method build (line 28) | override build<TTableName extends string>(
class GelText (line 35) | class GelText<T extends ColumnBaseConfig<'string', 'GelText'>>
method getSQLType (line 42) | getSQLType(): string {
function text (line 49) | function text(name?: string): any {
FILE: drizzle-orm/src/gel-core/columns/timestamp.ts
type GelTimestampBuilderInitial (line 9) | type GelTimestampBuilderInitial<TName extends string> = GelTimestampBuil...
class GelTimestampBuilder (line 18) | class GelTimestampBuilder<T extends ColumnBuilderBaseConfig<'localDateTi...
method constructor (line 25) | constructor(
method build (line 32) | override build<TTableName extends string>(
class GelTimestamp (line 42) | class GelTimestamp<T extends ColumnBaseConfig<'localDateTime', 'GelTimes...
method constructor (line 45) | constructor(table: AnyGelTable<{ name: T['tableName'] }>, config: GelT...
method getSQLType (line 49) | getSQLType(): string {
function timestamp (line 58) | function timestamp(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/timestamptz.ts
type GelTimestampTzBuilderInitial (line 8) | type GelTimestampTzBuilderInitial<TName extends string> = GelTimestampTz...
class GelTimestampTzBuilder (line 17) | class GelTimestampTzBuilder<T extends ColumnBuilderBaseConfig<'date', 'G...
method constructor (line 24) | constructor(
method build (line 31) | override build<TTableName extends string>(
class GelTimestampTz (line 41) | class GelTimestampTz<T extends ColumnBaseConfig<'date', 'GelTimestampTz'...
method constructor (line 44) | constructor(table: AnyGelTable<{ name: T['tableName'] }>, config: GelT...
method getSQLType (line 48) | getSQLType(): string {
function timestamptz (line 57) | function timestamptz(name?: string) {
FILE: drizzle-orm/src/gel-core/columns/uuid.ts
type GelUUIDBuilderInitial (line 7) | type GelUUIDBuilderInitial<TName extends string> = GelUUIDBuilder<{
class GelUUIDBuilder (line 16) | class GelUUIDBuilder<T extends ColumnBuilderBaseConfig<'string', 'GelUUI...
method constructor (line 19) | constructor(name: T['name']) {
method build (line 24) | override build<TTableName extends string>(
class GelUUID (line 31) | class GelUUID<T extends ColumnBaseConfig<'string', 'GelUUID'>> extends G...
method getSQLType (line 34) | getSQLType(): string {
function uuid (line 41) | function uuid(name?: string) {
FILE: drizzle-orm/src/gel-core/db.ts
class GelDatabase (line 27) | class GelDatabase<
method constructor (line 47) | constructor(
method $with (line 117) | $with<TAlias extends string>(alias: TAlias) {
method $count (line 135) | $count(
method with (line 161) | with(...queries: WithSubquery[]) {
method select (line 418) | select(fields?: SelectedFields): GelSelectBuilder<SelectedFields | und...
method selectDistinct (line 452) | selectDistinct(fields?: SelectedFields): GelSelectBuilder<SelectedFiel...
method selectDistinctOn (line 491) | selectDistinctOn(
method update (line 532) | update<TTable extends GelTable>(table: TTable): GelUpdateBuilder<TTabl...
method insert (line 560) | insert<TTable extends GelTable>(table: TTable): GelInsertBuilder<TTabl...
method delete (line 588) | delete<TTable extends GelTable>(table: TTable): GelDeleteBase<TTable, ...
method execute (line 597) | execute<TRow extends Record<string, unknown> = Record<string, unknown>>(
method transaction (line 618) | transaction<T>(
type GelWithReplicas (line 625) | type GelWithReplicas<Q> = Q & { $primary: Q; $replicas: Q[] };
method query (line 670) | get query() {
FILE: drizzle-orm/src/gel-core/dialect.ts
type GelDialectConfig (line 47) | interface GelDialectConfig {
class GelDialect (line 51) | class GelDialect {
method constructor (line 57) | constructor(config?: GelDialectConfig) {
method escapeName (line 103) | escapeName(name: string): string {
method escapeParam (line 107) | escapeParam(num: number): string {
method escapeString (line 111) | escapeString(str: string): string {
method buildWithCTE (line 115) | private buildWithCTE(queries: Subquery[] | undefined): SQL | undefined {
method buildDeleteQuery (line 129) | buildDeleteQuery({ table, where, returning, withList }: GelDeleteConfi...
method buildUpdateSet (line 141) | buildUpdateSet(table: GelTable, set: UpdateSet): SQL {
method buildUpdateQuery (line 163) | buildUpdateQuery({ table, set, where, returning, withList, from, joins...
method buildSelection (line 201) | private buildSelection(
method buildJoins (line 274) | private buildJoins(joins: GelSelectJoinConfig[] | undefined): SQL | un...
method buildFromTable (line 322) | private buildFromTable(
method buildSelectQuery (line 336) | buildSelectQuery(
method buildSetOperations (line 445) | buildSetOperations(leftSelect: SQL, setOperators: GelSelectConfig['set...
method buildSetOperationQuery (line 463) | buildSetOperationQuery({
method buildInsertQuery (line 508) | buildInsertQuery(
method buildRefreshMaterializedViewQuery (line 577) | buildRefreshMaterializedViewQuery(
method prepareTyping (line 586) | prepareTyping(encoder: DriverValueEncoder<unknown, unknown>): QueryTyp...
method sqlToQuery (line 600) | sqlToQuery(sql: SQL, invokeSource?: 'indexes' | undefined): QueryWithT...
method buildRelationalQueryWithoutPK (line 1141) | buildRelationalQueryWithoutPK({
FILE: drizzle-orm/src/gel-core/expressions.ts
function concat (line 8) | function concat(column: GelColumn | SQL.Aliased, value: string | Placeho...
function substring (line 12) | function substring(
FILE: drizzle-orm/src/gel-core/foreign-keys.ts
type UpdateDeleteAction (line 6) | type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set nu...
type Reference (line 8) | type Reference = () => {
class ForeignKeyBuilder (line 15) | class ForeignKeyBuilder {
method constructor (line 27) | constructor(
method onUpdate (line 48) | onUpdate(action: UpdateDeleteAction): this {
method onDelete (line 53) | onDelete(action: UpdateDeleteAction): this {
method build (line 59) | build(table: GelTable): ForeignKey {
type AnyForeignKeyBuilder (line 64) | type AnyForeignKeyBuilder = ForeignKeyBuilder;
class ForeignKey (line 66) | class ForeignKey {
method constructor (line 73) | constructor(readonly table: GelTable, builder: ForeignKeyBuilder) {
method getName (line 79) | getName(): string {
type ColumnsWithTable (line 93) | type ColumnsWithTable<
function foreignKey (line 98) | function foreignKey<
FILE: drizzle-orm/src/gel-core/indexes.ts
type IndexConfig (line 8) | interface IndexConfig {
type IndexColumn (line 44) | type IndexColumn = GelColumn;
type GelIndexMethod (line 46) | type GelIndexMethod =
type GelIndexOpClass (line 57) | type GelIndexOpClass =
class IndexBuilderOn (line 117) | class IndexBuilderOn {
method constructor (line 120) | constructor(private unique: boolean, private name?: string) {}
method on (line 122) | on(...columns: [Partial<GelExtraConfigColumn> | SQL, ...Partial<GelExt...
method onOnly (line 139) | onOnly(...columns: [Partial<GelExtraConfigColumn | SQL>, ...Partial<Ge...
method using (line 167) | using(
type AnyIndexBuilder (line 189) | interface AnyIndexBuilder {
type IndexBuilder (line 194) | interface IndexBuilder extends AnyIndexBuilder {}
method constructor (line 202) | constructor(
method concurrently (line 218) | concurrently(): this {
method with (line 223) | with(obj: Record<string, any>): this {
method where (line 228) | where(condition: SQL): this {
method build (line 234) | build(table: GelTable): Index {
class IndexBuilder (line 196) | class IndexBuilder implements AnyIndexBuilder {
method constructor (line 202) | constructor(
method concurrently (line 218) | concurrently(): this {
method with (line 223) | with(obj: Record<string, any>): this {
method where (line 228) | where(condition: SQL): this {
method build (line 234) | build(table: GelTable): Index {
class Index (line 239) | class Index {
method constructor (line 244) | constructor(config: IndexConfig, table: GelTable) {
type GetColumnsTableName (line 249) | type GetColumnsTableName<TColumns> = TColumns extends GelColumn ? TColum...
function index (line 253) | function index(name?: string): IndexBuilderOn {
function uniqueIndex (line 257) | function uniqueIndex(name?: string): IndexBuilderOn {
FILE: drizzle-orm/src/gel-core/policies.ts
type GelPolicyToOption (line 6) | type GelPolicyToOption =
type GelPolicyConfig (line 15) | interface GelPolicyConfig {
class GelPolicy (line 23) | class GelPolicy implements GelPolicyConfig {
method constructor (line 35) | constructor(
method link (line 48) | link(table: GelTable): this {
function gelPolicy (line 54) | function gelPolicy(name: string, config?: GelPolicyConfig) {
FILE: drizzle-orm/src/gel-core/primary-keys.ts
function primaryKey (line 18) | function primaryKey(...config: any) {
class PrimaryKeyBuilder (line 25) | class PrimaryKeyBuilder {
method constructor (line 34) | constructor(
method build (line 43) | build(table: GelTable): PrimaryKey {
class PrimaryKey (line 48) | class PrimaryKey {
method constructor (line 54) | constructor(readonly table: GelTable, columns: AnyGelColumn<{}>[], nam...
method getName (line 59) | getName(): string {
FILE: drizzle-orm/src/gel-core/query-builders/count.ts
class GelCountBuilder (line 6) | class GelCountBuilder<
method buildEmbeddedCount (line 16) | private static buildEmbeddedCount(
method buildCount (line 23) | private static buildCount(
method constructor (line 30) | constructor(
method then (line 49) | then<TResult1 = number, TResult2 = never>(
method catch (line 60) | catch(
method finally (line 66) | finally(onFinally?: (() => void) | null | undefined): Promise<number> {
FILE: drizzle-orm/src/gel-core/query-builders/delete.ts
type GelDeleteWithout (line 23) | type GelDeleteWithout<
type GelDelete (line 39) | type GelDelete<
type GelDeleteConfig (line 45) | interface GelDeleteConfig {
type GelDeleteReturningAll (line 52) | type GelDeleteReturningAll<
type GelDeleteReturning (line 67) | type GelDeleteReturning<
type GelDeletePrepare (line 83) | type GelDeletePrepare<T extends AnyGelDeleteBase> = GelPreparedQuery<
type GelDeleteDynamic (line 90) | type GelDeleteDynamic<T extends AnyGelDeleteBase> = GelDelete<
type AnyGelDeleteBase (line 96) | type AnyGelDeleteBase = GelDeleteBase<any, any, any, any, any>;
type GelDeleteBase (line 98) | interface GelDeleteBase<
method constructor (line 136) | constructor(
method where (line 175) | where(where: SQL | undefined): GelDeleteWithout<this, TDynamic, 'where...
method returning (line 204) | returning(
method getSQL (line 212) | getSQL(): SQL {
method toSQL (line 216) | toSQL(): Query {
method _prepare (line 222) | _prepare(name?: string): GelDeletePrepare<this> {
method prepare (line 235) | prepare(name: string): GelDeletePrepare<this> {
method $dynamic (line 245) | $dynamic(): GelDeleteDynamic<this> {
class GelDeleteBase (line 120) | class GelDeleteBase<
method constructor (line 136) | constructor(
method where (line 175) | where(where: SQL | undefined): GelDeleteWithout<this, TDynamic, 'where...
method returning (line 204) | returning(
method getSQL (line 212) | getSQL(): SQL {
method toSQL (line 216) | toSQL(): Query {
method _prepare (line 222) | _prepare(name?: string): GelDeletePrepare<this> {
method prepare (line 235) | prepare(name: string): GelDeletePrepare<this> {
method $dynamic (line 245) | $dynamic(): GelDeleteDynamic<this> {
FILE: drizzle-orm/src/gel-core/query-builders/insert.ts
type GelInsertConfig (line 29) | interface GelInsertConfig<TTable extends GelTable = GelTable> {
type GelInsertValue (line 39) | type GelInsertValue<TTable extends GelTable<TableConfig>, OverrideT exte...
type GelInsertSelectQueryBuilder (line 48) | type GelInsertSelectQueryBuilder<TTable extends GelTable> = TypedQueryBu...
class GelInsertBuilder (line 52) | class GelInsertBuilder<
method constructor (line 59) | constructor(
method setToken (line 69) | setToken(token?: NeonAuthToken) {
method overridingSystemValue (line 74) | overridingSystemValue(): Omit<GelInsertBuilder<TTable, TQueryResult, t...
method values (line 81) | values(
method select (line 113) | select(
type GelInsertWithout (line 134) | type GelInsertWithout<T extends AnyGelInsert, TDynamic extends boolean, ...
type GelInsertReturning (line 147) | type GelInsertReturning<
type GelInsertReturningAll (line 159) | type GelInsertReturningAll<T extends AnyGelInsert, TDynamic extends bool...
type GelInsertOnConflictDoUpdateConfig (line 167) | interface GelInsertOnConflictDoUpdateConfig<T extends AnyGelInsert> {
type GelInsertPrepare (line 177) | type GelInsertPrepare<T extends AnyGelInsert> = GelPreparedQuery<
type GelInsertDynamic (line 184) | type GelInsertDynamic<T extends AnyGelInsert> = GelInsert<
type AnyGelInsert (line 190) | type AnyGelInsert = GelInsertBase<any, any, any, any, any>;
type GelInsert (line 192) | type GelInsert<
type GelInsertBase (line 198) | interface GelInsertBase<
method constructor (line 237) | constructor(
method returning (line 274) | returning(
method getSQL (line 374) | getSQL(): SQL {
method toSQL (line 378) | toSQL(): Query {
method _prepare (line 384) | _prepare(name?: string): GelInsertPrepare<this> {
method prepare (line 397) | prepare(name: string): GelInsertPrepare<this> {
method $dynamic (line 407) | $dynamic(): GelInsertDynamic<this> {
class GelInsertBase (line 220) | class GelInsertBase<
method constructor (line 237) | constructor(
method returning (line 274) | returning(
method getSQL (line 374) | getSQL(): SQL {
method toSQL (line 378) | toSQL(): Query {
method _prepare (line 384) | _prepare(name?: string): GelInsertPrepare<this> {
method prepare (line 397) | prepare(name: string): GelInsertPrepare<this> {
method $dynamic (line 407) | $dynamic(): GelInsertDynamic<this> {
FILE: drizzle-orm/src/gel-core/query-builders/query-builder.ts
class QueryBuilder (line 13) | class QueryBuilder {
method constructor (line 19) | constructor(dialect?: GelDialect | GelDialectConfig) {
method $with (line 24) | $with<TAlias extends string>(alias: TAlias) {
method with (line 43) | with(...queries: WithSubquery[]) {
method select (line 92) | select<TSelection extends SelectedFields>(fields?: TSelection): GelSel...
method selectDistinct (line 102) | selectDistinct(fields?: SelectedFields): GelSelectBuilder<SelectedFiel...
method selectDistinctOn (line 116) | selectDistinctOn(
method getDialect (line 129) | private getDialect() {
FILE: drizzle-orm/src/gel-core/query-builders/query.ts
class RelationalQueryBuilder (line 19) | class RelationalQueryBuilder<TSchema extends TablesRelationalConfig, TFi...
method constructor (line 22) | constructor(
method findMany (line 32) | findMany<TConfig extends DBQueryConfig<'many', true, TSchema, TFields>>(
method findFirst (line 48) | findFirst<TSelection extends Omit<DBQueryConfig<'many', true, TSchema,...
class GelRelationalQuery (line 65) | class GelRelationalQuery<TResult> extends QueryPromise<TResult>
method constructor (line 75) | constructor(
method _prepare (line 90) | _prepare(name?: string): GelPreparedQuery<PreparedQueryConfig & { exec...
method prepare (line 112) | prepare(name: string): GelPreparedQuery<PreparedQueryConfig & { execut...
method _getQuery (line 116) | private _getQuery() {
method getSQL (line 129) | getSQL(): SQL {
method _toSQL (line 133) | private _toSQL(): { query: BuildRelationalQueryResult; builtQuery: Que...
method toSQL (line 141) | toSQL(): Query {
method execute (line 145) | override execute(): Promise<TResult> {
FILE: drizzle-orm/src/gel-core/query-builders/raw.ts
type GelRaw (line 7) | interface GelRaw<TResult> extends QueryPromise<TResult>, RunnableQuery<T...
method constructor (line 19) | constructor(
method getSQL (line 29) | getSQL() {
method getQuery (line 33) | getQuery() {
method mapResult (line 37) | mapResult(result: unknown, isFromBatch?: boolean) {
method _prepare (line 41) | _prepare(): PreparedQuery {
method isResponseInArrayMode (line 46) | isResponseInArrayMode() {
class GelRaw (line 9) | class GelRaw<TResult> extends QueryPromise<TResult>
method constructor (line 19) | constructor(
method getSQL (line 29) | getSQL() {
method getQuery (line 33) | getQuery() {
method mapResult (line 37) | mapResult(result: unknown, isFromBatch?: boolean) {
method _prepare (line 41) | _prepare(): PreparedQuery {
method isResponseInArrayMode (line 46) | isResponseInArrayMode() {
FILE: drizzle-orm/src/gel-core/query-builders/refresh-materialized-view.ts
type GelRefreshMaterializedView (line 17) | interface GelRefreshMaterializedView<TQueryResult extends GelQueryResult...
method constructor (line 41) | constructor(
method concurrently (line 50) | concurrently(): this {
method withNoData (line 58) | withNoData(): this {
method getSQL (line 67) | getSQL(): SQL {
method toSQL (line 71) | toSQL(): Query {
method _prepare (line 77) | _prepare(name?: string): GelPreparedQuery<
method prepare (line 87) | prepare(name: string): GelPreparedQuery<
class GelRefreshMaterializedView (line 29) | class GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT>
method constructor (line 41) | constructor(
method concurrently (line 50) | concurrently(): this {
method withNoData (line 58) | withNoData(): this {
method getSQL (line 67) | getSQL(): SQL {
method toSQL (line 71) | toSQL(): Query {
method _prepare (line 77) | _prepare(name?: string): GelPreparedQuery<
method prepare (line 87) | prepare(name: string): GelPreparedQuery<
FILE: drizzle-orm/src/gel-core/query-builders/select.ts
class GelSelectBuilder (line 60) | class GelSelectBuilder<
method constructor (line 74) | constructor(
method setToken (line 96) | setToken(token?: NeonAuthToken) {
method from (line 107) | from<TFrom extends GelTable | Subquery | GelViewBase | SQL>(
method constructor (line 184) | constructor(
method getUsedTables (line 218) | getUsedTables() {
method createJoin (line 222) | private createJoin<
method createSetOperator (line 494) | private createSetOperator(
method addSetOperators (line 719) | addSetOperators(setOperators: GelSelectConfig['setOperators']): GelSelec...
method where (line 758) | where(
method having (line 795) | having(
method groupBy (line 833) | groupBy(
method orderBy (line 880) | orderBy(
method limit (line 928) | limit(limit: number | Placeholder): GelSelectWithout<this, TDynamic, 'li...
method offset (line 953) | offset(offset: number | Placeholder): GelSelectWithout<this, TDynamic, '...
method for (line 972) | for(strength: LockStrength, config: LockConfig = {}): GelSelectWithout<t...
method getSQL (line 978) | getSQL(): SQL {
method toSQL (line 982) | toSQL(): Query {
method as (line 987) | as<TAlias extends string>(
method getSelectedFields (line 1001) | override getSelectedFields(): this['_']['selectedFields'] {
method $dynamic (line 1008) | $dynamic(): GelSelectDynamic<this> {
type GelSelectBase (line 1013) | interface GelSelectBase<
method _prepare (line 1063) | _prepare(name?: string): GelSelectPrepare<this> {
method $withCache (line 1082) | $withCache(config?: { config?: CacheConfig; tag?: string; autoInvalida...
method prepare (line 1098) | prepare(name: string): GelSelectPrepare<this> {
class GelSelectBase (line 1039) | class GelSelectBase<
method _prepare (line 1063) | _prepare(name?: string): GelSelectPrepare<this> {
method $withCache (line 1082) | $withCache(config?: { config?: CacheConfig; tag?: string; autoInvalida...
method prepare (line 1098) | prepare(name: string): GelSelectPrepare<this> {
function createSetOperator (line 1111) | function createSetOperator(type: SetOperator, isAll: boolean): GelCreate...
FILE: drizzle-orm/src/gel-core/query-builders/select.types.ts
type GelSelectJoinConfig (line 30) | interface GelSelectJoinConfig {
type BuildAliasTable (line 38) | type BuildAliasTable<TTable extends GelTable | View, TAlias extends stri...
type GelSelectConfig (line 52) | interface GelSelectConfig {
type GelSelectJoin (line 82) | type GelSelectJoin<
type GelSelectJoinFn (line 111) | type GelSelectJoinFn<
type GelSelectCrossJoinFn (line 124) | type GelSelectCrossJoinFn<
type SelectedFieldsFlat (line 133) | type SelectedFieldsFlat = SelectedFieldsFlatBase<GelColumn>;
type SelectedFields (line 135) | type SelectedFields = SelectedFieldsBase<GelColumn, GelTable>;
type SelectedFieldsOrdered (line 137) | type SelectedFieldsOrdered = SelectedFieldsOrderedBase<GelColumn>;
type LockStrength (line 139) | type LockStrength = 'update' | 'no key update' | 'share' | 'key share';
type LockConfig (line 141) | type LockConfig =
type GelSelectHKTBase (line 156) | interface GelSelectHKTBase {
type GelSelectKind (line 168) | type GelSelectKind<
type GelSelectQueryBuilderHKT (line 189) | interface GelSelectQueryBuilderHKT extends GelSelectHKTBase {
type GelSelectHKT (line 203) | interface GelSelectHKT extends GelSelectHKTBase {
type CreateGelSelectFromBuilderMode (line 216) | type CreateGelSelectFromBuilderMode<
type GelSetOperatorExcludedMethods (line 224) | type GelSetOperatorExcludedMethods =
type GelSelectWithout (line 234) | type GelSelectWithout<
type GelSelectPrepare (line 254) | type GelSelectPrepare<T extends AnyGelSelect> = GelPreparedQuery<
type GelSelectDynamic (line 260) | type GelSelectDynamic<T extends AnyGelSelectQueryBuilder> = GelSelectKind<
type GelSelectQueryBuilder (line 272) | type GelSelectQueryBuilder<
type AnyGelSelectQueryBuilder (line 292) | type AnyGelSelectQueryBuilder = GelSelectQueryBuilderBase<any, any, any,...
type AnyGelSetOperatorInterface (line 294) | type AnyGelSetOperatorInterface = GelSetOperatorInterface<any, any, any,...
type GelSetOperatorInterface (line 296) | interface GelSetOperatorInterface<
type GelSetOperatorWithResult (line 320) | type GelSetOperatorWithResult<TResult extends any[]> = GelSetOperatorInt...
type GelSelect (line 331) | type GelSelect<
type AnyGelSelect (line 338) | type AnyGelSelect = GelSelectBase<any, any, any, any, any, any, any, any>;
type GelSetOperator (line 340) | type GelSetOperator<
type SetOperatorRightSelect (line 354) | type SetOperatorRightSelect<
type SetOperatorRestSelect (line 364) | type SetOperatorRestSelect<
type GelCreateSetOperatorFn (line 377) | type GelCreateSetOperatorFn = <
type GetGelSetOperators (line 418) | type GetGelSetOperators = {
FILE: drizzle-orm/src/gel-core/query-builders/update.ts
type GelUpdateConfig (line 42) | interface GelUpdateConfig {
type GelUpdateSetSource (line 52) | type GelUpdateSetSource<TTable extends GelTable> =
class GelUpdateBuilder (line 61) | class GelUpdateBuilder<TTable extends GelTable, TQueryResult extends Gel...
method constructor (line 68) | constructor(
method setToken (line 76) | setToken(token: NeonAuthToken) {
method set (line 81) | set(
type GelUpdateWithout (line 94) | type GelUpdateWithout<
type GelUpdateWithJoins (line 112) | type GelUpdateWithJoins<
type GelUpdateJoinFn (line 134) | type GelUpdateJoinFn<
type GelUpdateJoin (line 155) | type GelUpdateJoin<
type Join (line 175) | type Join = {
type AccumulateToResult (line 181) | type AccumulateToResult<
type GelUpdateReturningAll (line 202) | type GelUpdateReturningAll<T extends AnyGelUpdate, TDynamic extends bool...
type GelUpdateReturning (line 226) | type GelUpdateReturning<
type GelUpdatePrepare (line 254) | type GelUpdatePrepare<T extends AnyGelUpdate> = GelPreparedQuery<
type GelUpdateDynamic (line 261) | type GelUpdateDynamic<T extends AnyGelUpdate> = GelUpdate<
type GelUpdate (line 269) | type GelUpdate<
type AnyGelUpdate (line 278) | type AnyGelUpdate = GelUpdateBase<any, any, any, any, any, any, any, any>;
type GelUpdateBase (line 280) | interface GelUpdateBase<
method constructor (line 332) | constructor(
method from (line 345) | from<TFrom extends GelTable | Subquery | GelViewBase | SQL>(
method getTableLikeFields (line 356) | private getTableLikeFields(table: GelTable | Subquery | GelViewBase): ...
method createJoin (line 365) | private createJoin<TJoinType extends JoinType>(
method where (line 468) | where(where: SQL | undefined): GelUpdateWithout<this, TDynamic, 'where...
method returning (line 499) | returning(
method getSQL (line 529) | getSQL(): SQL {
method toSQL (line 533) | toSQL(): Query {
method _prepare (line 539) | _prepare(name?: string): GelUpdatePrepare<this> {
method prepare (line 550) | prepare(name: string): GelUpdatePrepare<this> {
method $dynamic (line 558) | $dynamic(): GelUpdateDynamic<this> {
class GelUpdateBase (line 308) | class GelUpdateBase<
method constructor (line 332) | constructor(
method from (line 345) | from<TFrom extends GelTable | Subquery | GelViewBase | SQL>(
method getTableLikeFields (line 356) | private getTableLikeFields(table: GelTable | Subquery | GelViewBase): ...
method createJoin (line 365) | private createJoin<TJoinType extends JoinType>(
method where (line 468) | where(where: SQL | undefined): GelUpdateWithout<this, TDynamic, 'where...
method returning (line 499) | returning(
method getSQL (line 529) | getSQL(): SQL {
method toSQL (line 533) | toSQL(): Query {
method _prepare (line 539) | _prepare(name?: string): GelUpdatePrepare<this> {
method prepare (line 550) | prepare(name: string): GelUpdatePrepare<this> {
method $dynamic (line 558) | $dynamic(): GelUpdateDynamic<this> {
FILE: drizzle-orm/src/gel-core/roles.ts
type GelRoleConfig (line 3) | interface GelRoleConfig {
class GelRole (line 9) | class GelRole implements GelRoleConfig {
method constructor (line 22) | constructor(
method existing (line 33) | existing(): this {
function gelRole (line 39) | function gelRole(name: string, config?: GelRoleConfig) {
FILE: drizzle-orm/src/gel-core/schema.ts
class GelSchema (line 9) | class GelSchema<TName extends string = string> implements SQLWrapper {
method constructor (line 11) | constructor(
method getSQL (line 35) | getSQL(): SQL {
method shouldOmitSQLParens (line 39) | shouldOmitSQLParens(): boolean {
function isGelSchema (line 44) | function isGelSchema(obj: unknown): obj is GelSchema {
function gelSchema (line 48) | function gelSchema<T extends string>(name: T) {
FILE: drizzle-orm/src/gel-core/sequence.ts
type GelSequenceOptions (line 3) | type GelSequenceOptions = {
class GelSequence (line 12) | class GelSequence {
method constructor (line 15) | constructor(
function gelSequence (line 23) | function gelSequence(
function gelSequenceWithSchema (line 31) | function gelSequenceWithSchema(
function isGelSequence (line 39) | function isGelSequence(obj: unknown): obj is GelSequence {
FILE: drizzle-orm/src/gel-core/session.ts
type PreparedQueryConfig (line 14) | interface PreparedQueryConfig {
method constructor (line 21) | constructor(
method queryWithCache (line 42) | protected async queryWithCache<T>(
method getQuery (line 130) | getQuery(): Query {
method mapResult (line 134) | mapResult(response: unknown, _isFromBatch?: boolean): unknown {
method constructor (line 159) | constructor(protected dialect: GelDialect) {}
method execute (line 174) | execute<T>(query: SQL): Promise<T> {
method all (line 189) | all<T = unknown>(query: SQL): Promise<T[]> {
method count (line 198) | async count(sql: SQL): Promise<number> {
method constructor (line 218) | constructor(
method rollback (line 230) | rollback(): never {
type GelQueryResultHKT (line 239) | interface GelQueryResultHKT {
type GelQueryResultKind (line 245) | type GelQueryResultKind<TKind extends GelQueryResultHKT, TRow> = (TKind & {
FILE: drizzle-orm/src/gel-core/subquery.ts
type SubqueryWithSelection (line 5) | type SubqueryWithSelection<TSelection extends ColumnsSelection, TAlias e...
type WithSubqueryWithSelection (line 9) | type WithSubqueryWithSelection<TSelection extends ColumnsSelection, TAli...
FILE: drizzle-orm/src/gel-core/table.ts
type GelTableExtraConfigValue (line 13) | type GelTableExtraConfigValue =
type GelTableExtraConfig (line 21) | type GelTableExtraConfig = Record<
type TableConfig (line 26) | type TableConfig = TableConfigBase<GelColumn>;
class GelTable (line 33) | class GelTable<T extends TableConfig = TableConfig> extends Table<T> {
type AnyGelTable (line 56) | type AnyGelTable<TPartial extends Partial<TableConfig> = {}> = GelTable<
type GelTableWithColumns (line 60) | type GelTableWithColumns<T extends TableConfig> =
function gelTableWithSchema (line 73) | function gelTableWithSchema<
type GelTableFn (line 143) | interface GelTableFn<TSchema extends string | undefined = undefined> {
function gelTableCreator (line 253) | function gelTableCreator(customizeTableName: (name: string) => string): ...
FILE: drizzle-orm/src/gel-core/unique-constraint.ts
function unique (line 6) | function unique(name?: string): UniqueOnConstraintBuilder {
function uniqueKeyName (line 10) | function uniqueKeyName(table: GelTable, columns: string[]) {
class UniqueConstraintBuilder (line 14) | class UniqueConstraintBuilder {
method constructor (line 22) | constructor(
method nullsNotDistinct (line 29) | nullsNotDistinct() {
method build (line 35) | build(table: GelTable): UniqueConstraint {
class UniqueOnConstraintBuilder (line 40) | class UniqueOnConstraintBuilder {
method constructor (line 46) | constructor(
method on (line 52) | on(...columns: [GelColumn, ...GelColumn[]]) {
class UniqueConstraint (line 57) | class UniqueConstraint {
method constructor (line 64) | constructor(readonly table: GelTable, columns: GelColumn[], nullsNotDi...
method getName (line 70) | getName() {
FILE: drizzle-orm/src/gel-core/utils.ts
function getTableConfig (line 19) | function getTableConfig<TTable extends GelTable>(table: TTable) {
function extractUsedTable (line 67) | function extractUsedTable(table: GelTable | Subquery | GelViewBase | SQL...
function getViewConfig (line 80) | function getViewConfig<
function getMaterializedViewConfig (line 90) | function getMaterializedViewConfig<
type ColumnsWithTable (line 100) | type ColumnsWithTable<
FILE: drizzle-orm/src/gel-core/view.ts
type ViewWithConfig (line 15) | type ViewWithConfig = RequireAtLeastOne<{
class DefaultViewBuilderCore (line 21) | class DefaultViewBuilderCore<TConfig extends { name: string; columns?: u...
method constructor (line 29) | constructor(
method with (line 38) | with(config: ViewWithConfig): this {
class ViewBuilder (line 44) | class ViewBuilder<TName extends string = string> extends DefaultViewBuil...
method as (line 47) | as<TSelectedFields extends ColumnsSelection>(
class ManualViewBuilder (line 75) | class ManualViewBuilder<
method constructor (line 83) | constructor(
method existing (line 92) | existing(): GelViewWithSelection<TName, true, BuildColumns<TName, TCol...
method as (line 112) | as(query: SQL): GelViewWithSelection<TName, false, BuildColumns<TName,...
type GelMaterializedViewWithConfig (line 133) | type GelMaterializedViewWithConfig = RequireAtLeastOne<{
class MaterializedViewBuilderCore (line 154) | class MaterializedViewBuilderCore<TConfig extends { name: string; column...
method constructor (line 162) | constructor(
method using (line 174) | using(using: string): this {
method with (line 179) | with(config: GelMaterializedViewWithConfig): this {
method tablespace (line 184) | tablespace(tablespace: string): this {
method withNoData (line 189) | withNoData(): this {
class MaterializedViewBuilder (line 195) | class MaterializedViewBuilder<TName extends string = string>
method as (line 200) | as<TSelectedFields extends ColumnsSelection>(
class ManualMaterializedViewBuilder (line 233) | class ManualMaterializedViewBuilder<
method constructor (line 241) | constructor(
method existing (line 250) | existing(): GelMaterializedViewWithSelection<TName, true, BuildColumns...
method as (line 275) | as(query: SQL): GelMaterializedViewWithSelection<TName, false, BuildCo...
class GelView (line 301) | class GelView<
method constructor (line 312) | constructor({ GelConfig, config }: {
type GelViewWithSelection (line 332) | type GelViewWithSelection<
class GelMaterializedView (line 340) | class GelMaterializedView<
method constructor (line 354) | constructor({ GelConfig, config }: {
type GelMaterializedViewWithSelection (line 378) | type GelMaterializedViewWithSelection<
function gelViewWithSchema (line 385) | function gelViewWithSchema(
function gelMaterializedViewWithSchema (line 397) | function gelMaterializedViewWithSchema(
function gelView (line 415) | function gelView(name: string, columns?: Record<string, GelColumnBuilder...
function gelMaterializedView (line 426) | function gelMaterializedView(
function isGelView (line 433) | function isGelView(obj: unknown): obj is GelView {
function isGelMaterializedView (line 437) | function isGelMaterializedView(obj: unknown): obj is GelMaterializedView {
FILE: drizzle-orm/src/gel/driver.ts
type GelDriverOptions (line 19) | interface GelDriverOptions {
class GelDriver (line 24) | class GelDriver {
method constructor (line 27) | constructor(
method createSession (line 33) | createSession(
class GelJsDatabase (line 43) | class GelJsDatabase<TSchema extends Record<string, unknown> = Record<str...
function construct (line 49) | function construct<
function drizzle (line 88) | function drizzle<
function mock (line 132) | function mock<TSchema extends Record<string, unknown> = Record<string, n...
FILE: drizzle-orm/src/gel/migrator.ts
function migrate (line 7) | async function migrate<TSchema extends Record<string, unknown>>(
FILE: drizzle-orm/src/gel/session.ts
type GelClient (line 15) | type GelClient = Client | Transaction;
class GelDbPreparedQuery (line 17) | class GelDbPreparedQuery<T extends PreparedQueryConfig> extends GelPrepa...
method constructor (line 20) | constructor(
method execute (line 39) | async execute(placeholderValues: Record<string, unknown> | undefined =...
method all (line 77) | async all(placeholderValues: Record<string, unknown> | undefined = {})...
method isResponseInArrayMode (line 99) | isResponseInArrayMode(): boolean {
type GelSessionOptions (line 104) | interface GelSessionOptions {
class GelDbSession (line 109) | class GelDbSession<TFullSchema extends Record<string, unknown>, TSchema ...
method constructor (line 117) | constructor(
method prepareQuery (line 128) | prepareQuery<T extends PreparedQueryConfig = PreparedQueryConfig>(
method transaction (line 154) | override async transaction<T>(
method count (line 164) | override async count(sql: SQL): Promise<number> {
class GelDbTransaction (line 170) | class GelDbTransaction<TFullSchema extends Record<string, unknown>, TSch...
method transaction (line 175) | override async transaction<T>(transaction: (tx: GelDbTransaction<TFull...
type GelQueryResultHKT (line 186) | interface GelQueryResultHKT {
FILE: drizzle-orm/src/knex/index.ts
type Knexify (line 5) | type Knexify<T extends Table> =
FILE: drizzle-orm/src/kysely/index.ts
type Kyselify (line 5) | type Kyselify<T extends Table> = Simplify<
FILE: drizzle-orm/src/libsql/driver-core.ts
class LibSQLDatabase (line 17) | class LibSQLDatabase<
method batch (line 25) | async batch<U extends BatchItem<'sqlite'>, T extends Readonly<[U, ...U...
function construct (line 33) | function construct<
FILE: drizzle-orm/src/libsql/driver.ts
function drizzle (line 7) | function drizzle<
function mock (line 53) | function mock<TSchema extends Record<string, unknown> = Record<string, n...
FILE: drizzle-orm/src/libsql/http/index.ts
function drizzle (line 5) | function drizzle<
function mock (line 51) | function mock<TSchema extends Record<string, unknown> = Record<string, n...
FILE: drizzle-orm/src/libsql/migrator.ts
function migrate (line 6) | async function migrate<TSchema extends Record<string, unknown>>(
FILE: drizzle-orm/src/libsql/node/index.ts
function drizzle (line 5) | function drizzle<
function mock (line 51) | function mock<TSchema extends Record<string, unknown> = Record<string, n...
FILE: drizzle-orm/src/libsql/session.ts
type LibSQLSessionOptions (line 22) | interface LibSQLSessionOptions {
type PreparedQueryConfig (line 27) | type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | '...
class LibSQLSession (line 29) | class LibSQLSession<
method constructor (line 38) | constructor(
method prepareQuery (line 50) | prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(
method batch (line 77) | async batch<T extends BatchItem<'sqlite'>[] | readonly BatchItem<'sqli...
method migrate (line 92) | async migrate<T extends BatchItem<'sqlite'>[] | readonly BatchItem<'sq...
method transaction (line 107) | override async transaction<T>(
method extractRawAllValueFromBatchResult (line 131) | override extractRawAllValueFromBatchResult(result: unknown): unknown {
method extractRawGetValueFromBatchResult (line 135) | override extractRawGetValueFromBatchResult(result: unknown): unknown {
method extractRawValuesValueFromBatchResult (line 139) | override extractRawValuesValueFromBatchResult(result: unknown): unknown {
class LibSQLTransaction (line 144) | class LibSQLTransaction<
method transaction (line 150) | override async transaction<T>(transaction: (tx: LibSQLTransaction<TFul...
class LibSQLPreparedQuery (line 165) | class LibSQLPreparedQuery<T extends PreparedQueryConfig = PreparedQueryC...
method constructor (line 170) | constructor(
method run (line 194) | async run(placeholderValues?: Record<string, unknown>): Promise<Result...
method all (line 203) | async all(placeholderValues?: Record<string, unknown>): Promise<T['all...
method mapAllResult (line 219) | override mapAllResult(rows: unknown, isFromBatch?: boolean): unknown {
method get (line 241) | async get(placeholderValues?: Record<string, unknown>): Promise<T['get...
method mapGetResult (line 257) | override mapGetResult(rows: unknown, isFromBatch?: boolean): unknown {
method values (line 283) | async values(placeholderValues?: Record<string, unknown>): Promise<T['...
method isResponseInArrayMode (line 295) | isResponseInArrayMode(): boolean {
function normalizeRow (line 300) | function normalizeRow(obj: any) {
function normalizeFieldValue (line 313) | function normalizeFieldValue(value: unknown) {
FILE: drizzle-orm/src/libsql/sqlite3/index.ts
function drizzle (line 5) | function drizzle<
function mock (line 51) | function mock<TSchema extends Record<string, unknown> = Record<string, n...
FILE: drizzle-orm/src/libsql/wasm/index.ts
function drizzle (line 5) | function drizzle<
function mock (line 51) | function mock<TSchema extends Record<string, unknown> = Record<string, n...
FILE: drizzle-orm/src/libsql/web/index.ts
function drizzle (line 5) | function drizzle<
function mock (line 51) | function mock<TSchema extends Record<string, unknown> = Record<string, n...
FILE: drizzle-orm/src/libsql/ws/index.ts
function drizzle (line 5) | function drizzle<
function mock (line 51) | function mock<TSchema extends Record<string, unknown> = Record<string, n...
FILE: drizzle-orm/src/logger.ts
type Logger (line 3) | interface Logger {
type LogWriter (line 7) | interface LogWriter {
class ConsoleLogWriter (line 11) | class ConsoleLogWriter implements LogWriter {
method write (line 14) | write(message: string) {
class DefaultLogger (line 19) | class DefaultLogger implements Logger {
method constructor (line 24) | constructor(config?: { writer: LogWriter }) {
method logQuery (line 28) | logQuery(query: string, params: unknown[]): void {
class NoopLogger (line 41) | class NoopLogger implements Logger {
method logQuery (line 44) | logQuery(): void {
FILE: drizzle-orm/src/migrator.ts
type KitConfig (line 4) | interface KitConfig {
type MigrationConfig (line 9) | interface MigrationConfig {
type MigrationMeta (line 15) | interface MigrationMeta {
function readMigrationFiles (line 22) | function readMigrationFiles(config: MigrationConfig): MigrationMeta[] {
FILE: drizzle-orm/src/mysql-core/alias.ts
function alias (line 6) | function alias<TTable extends MySqlTable | MySqlViewBase, TAlias extends...
FILE: drizzle-orm/src/mysql-core/checks.ts
class CheckBuilder (line 5) | class CheckBuilder {
method constructor (line 10) | constructor(public name: string, public value: SQL) {}
method build (line 13) | build(table: MySqlTable): Check {
class Check (line 18) | class Check {
method constructor (line 24) | constructor(public table: MySqlTable, builder: CheckBuilder) {
function check (line 30) | function check(name: string, value: SQL): CheckBuilder {
FILE: drizzle-orm/src/mysql-core/columns/all.ts
function getMySqlColumnBuilders (line 26) | function getMySqlColumnBuilders() {
type MySqlColumnBuilders (line 58) | type MySqlColumnBuilders = ReturnType<typeof getMySqlColumnBuilders>;
FILE: drizzle-orm/src/mysql-core/columns/bigint.ts
type MySqlBigInt53BuilderInitial (line 8) | type MySqlBigInt53BuilderInitial<TName extends string> = MySqlBigInt53Bu...
class MySqlBigInt53Builder (line 17) | class MySqlBigInt53Builder<T extends ColumnBuilderBaseConfig<'number', '...
method constructor (line 22) | constructor(name: T['name'], unsigned: boolean = false) {
method build (line 28) | override build<TTableName extends string>(
class MySqlBigInt53 (line 38) | class MySqlBigInt53<T extends ColumnBaseConfig<'number', 'MySqlBigInt53'>>
method getSQLType (line 43) | getSQLType(): string {
method mapFromDriverValue (line 47) | override mapFromDriverValue(value: number | string): number {
type MySqlBigInt64BuilderInitial (line 55) | type MySqlBigInt64BuilderInitial<TName extends string> = MySqlBigInt64Bu...
class MySqlBigInt64Builder (line 64) | class MySqlBigInt64Builder<T extends ColumnBuilderBaseConfig<'bigint', '...
method constructor (line 69) | constructor(name: T['name'], unsigned: boolean = false) {
method build (line 75) | override build<TTableName extends string>(
class MySqlBigInt64 (line 85) | class MySqlBigInt64<T extends ColumnBaseConfig<'bigint', 'MySqlBigInt64'>>
method getSQLType (line 90) | getSQLType(): string {
method mapFromDriverValue (line 95) | override mapFromDriverValue(value: string): bigint {
type MySqlBigIntConfig (line 100) | interface MySqlBigIntConfig<T extends 'number' | 'bigint' = 'number' | '...
function bigint (line 112) | function bigint(a?: string | MySqlBigIntConfig, b?: MySqlBigIntConfig) {
FILE: drizzle-orm/src/mysql-core/columns/binary.ts
type MySqlBinaryBuilderInitial (line 8) | type MySqlBinaryBuilderInitial<TName extends string> = MySqlBinaryBuilder<{
class MySqlBinaryBuilder (line 17) | class MySqlBinaryBuilder<T extends ColumnBuilderBaseConfig<'string', 'My...
method constructor (line 23) | constructor(name: T['name'], length: number | undefined) {
method build (line 29) | override build<TTableName extends string>(
class MySqlBinary (line 36) | class MySqlBinary<T extends ColumnBaseConfig<'string', 'MySqlBinary'>> e...
method mapFromDriverValue (line 44) | override mapFromDriverValue(value: string | Buffer | Uint8Array): stri...
method getSQLType (line 56) | getSQLType(): string {
type MySqlBinaryConfig (line 61) | interface MySqlBinaryConfig {
function binary (line 73) | function binary(a?: string | MySqlBinaryConfig, b: MySqlBinaryConfig = {...
FILE: drizzle-orm/src/mysql-core/columns/boolean.ts
type MySqlBooleanBuilderInitial (line 7) | type MySqlBooleanBuilderInitial<TName extends string> = MySqlBooleanBuil...
class MySqlBooleanBuilder (line 16) | class MySqlBooleanBuilder<T extends ColumnBuilderBaseConfig<'boolean', '...
method constructor (line 21) | constructor(name: T['name']) {
method build (line 26) | override build<TTableName extends string>(
class MySqlBoolean (line 36) | class MySqlBoolean<T extends ColumnBaseConfig<'boolean', 'MySqlBoolean'>...
method getSQLType (line 39) | getSQLType(): string {
method mapFromDriverValue (line 43) | override mapFromDriverValue(value: number | boolean): boolean {
function boolean (line 53) | function boolean(name?: string) {
FILE: drizzle-orm/src/mysql-core/columns/char.ts
type MySqlCharBuilderInitial (line 8) | type MySqlCharBuilderInitial<
class MySqlCharBuilder (line 22) | class MySqlCharBuilder<
method constructor (line 31) | constructor(name: T['name'], config: MySqlCharConfig<T['enumValues'], ...
method build (line 38) | override build<TTableName extends string>(
class MySqlChar (line 48) | class MySqlChar<T extends ColumnBaseConfig<'string', 'MySqlChar'> & { le...
method getSQLType (line 56) | getSQLType(): string {
type MySqlCharConfig (line 61) | interface MySqlCharConfig<
function char (line 82) | function char(a?: string | MySqlCharConfig, b: MySqlCharConfig = {}): any {
FILE: drizzle-orm/src/mysql-core/columns/common.ts
type ReferenceConfig (line 23) | interface ReferenceConfig {
type MySqlColumnBuilderBase (line 31) | interface MySqlColumnBuilderBase<
type MySqlGeneratedColumnConfig (line 36) | interface MySqlGeneratedColumnConfig {
method references (line 54) | references(ref: ReferenceConfig['ref'], actions: ReferenceConfig['action...
method unique (line 59) | unique(name?: string): this {
method generatedAlwaysAs (line 65) | generatedAlwaysAs(as: SQL | T['data'] | (() => SQL), config?: MySqlGener...
method buildForeignKeys (line 77) | buildForeignKeys(column: MySqlColumn, table: MySqlTable): ForeignKey[] {
method constructor (line 109) | constructor(
type AnyMySqlColumn (line 120) | type AnyMySqlColumn<TPartial extends Partial<ColumnBaseConfig<ColumnData...
type MySqlColumnWithAutoIncrementConfig (line 124) | interface MySqlColumnWithAutoIncrementConfig {
method constructor (line 135) | constructor(name: NonNullable<T['name']>, dataType: T['dataType'], colum...
method autoincrement (line 140) | autoincrement(): IsAutoincrement<HasDefault<this>> {
FILE: drizzle-orm/src/mysql-core/columns/custom.ts
type ConvertCustomConfig (line 9) | type ConvertCustomConfig<TName extends string, T extends Partial<CustomT...
type MySqlCustomColumnInnerConfig (line 21) | interface MySqlCustomColumnInnerConfig {
class MySqlCustomColumnBuilder (line 25) | class MySqlCustomColumnBuilder<T extends ColumnBuilderBaseConfig<'custom...
method constructor (line 39) | constructor(
method build (line 50) | build<TTableName extends string>(
class MySqlCustomColumn (line 60) | class MySqlCustomColumn<T extends ColumnBaseConfig<'custom', 'MySqlCusto...
method constructor (line 67) | constructor(
method getSQLType (line 77) | getSQLType(): string {
method mapFromDriverValue (line 81) | override mapFromDriverValue(value: T['driverParam']): T['data'] {
method mapToDriverValue (line 85) | override mapToDriverValue(value: T['data']): T['driverParam'] {
type CustomTypeValues (line 90) | type CustomTypeValues = {
type CustomTypeParams (line 143) | interface CustomTypeParams<T extends CustomTypeValues> {
function customType (line 203) | function customType<T extends CustomTypeValues = CustomTypeValues>(
FILE: drizzle-orm/src/mysql-core/columns/date.common.ts
type MySqlDateColumnBaseConfig (line 12) | interface MySqlDateColumnBaseConfig {
method defaultNow (line 23) | defaultNow() {
method onUpdateNow (line 28) | onUpdateNow(): HasDefault<this> {
FILE: drizzle-orm/src/mysql-core/columns/date.ts
type MySqlDateBuilderInitial (line 8) | type MySqlDateBuilderInitial<TName extends string> = MySqlDateBuilder<{
class MySqlDateBuilder (line 17) | class MySqlDateBuilder<T extends ColumnBuilderBaseConfig<'date', 'MySqlD...
method constructor (line 20) | constructor(name: T['name']) {
method build (line 25) | override build<TTableName extends string>(
class MySqlDate (line 32) | class MySqlDate<T extends ColumnBaseConfig<'date', 'MySqlDate'>> extends...
method constructor (line 35) | constructor(
method getSQLType (line 42) | getSQLType(): string {
method mapFromDriverValue (line 46) | override mapFromDriverValue(value: string): Date {
type MySqlDateStringBuilderInitial (line 51) | type MySqlDateStringBuilderInitial<TName extends string> = MySqlDateStri...
class MySqlDateStringBuilder (line 60) | class MySqlDateStringBuilder<T extends ColumnBuilderBaseConfig<'string',...
method constructor (line 65) | constructor(name: T['name']) {
method build (line 70) | override build<TTableName extends string>(
class MySqlDateString (line 80) | class MySqlDateString<T extends ColumnBaseConfig<'string', 'MySqlDateStr...
method constructor (line 83) | constructor(
method getSQLType (line 90) | getSQLType(): string {
type MySqlDateConfig (line 95) | interface MySqlDateConfig<TMode extends 'date' | 'string' = 'date' | 'st...
function date (line 107) | function date(a?: string | MySqlDateConfig, b?: MySqlDateConfig) {
FILE: drizzle-orm/src/mysql-core/columns/datetime.ts
type MySqlDateTimeBuilderInitial (line 8) | type MySqlDateTimeBuilderInitial<TName extends string> = MySqlDateTimeBu...
class MySqlDateTimeBuilder (line 17) | class MySqlDateTimeBuilder<T extends ColumnBuilderBaseConfig<'date', 'My...
method constructor (line 22) | constructor(name: T['name'], config: MySqlDatetimeConfig | undefined) {
method build (line 28) | override build<TTableName extends string>(
class MySqlDateTime (line 38) | class MySqlDateTime<T extends ColumnBaseConfig<'date', 'MySqlDateTime'>>...
method constructor (line 43) | constructor(
method getSQLType (line 51) | getSQLType(): string {
method mapToDriverValue (line 56) | override mapToDriverValue(value: Date): unknown {
method mapFromDriverValue (line 60) | override mapFromDriverValue(value: string): Date {
type MySqlDateTimeStringBuilderInitial (line 65) | type MySqlDateTimeStringBuilderInitial<TName extends string> = MySqlDate...
class MySqlDateTimeStringBuilder (line 74) | class MySqlDateTimeStringBuilder<T extends ColumnBuilderBaseConfig<'stri...
method constructor (line 79) | constructor(name: T['name'], config: MySqlDatetimeConfig | undefined) {
method build (line 85) | override build<TTableName extends string>(
class MySqlDateTimeString (line 95) | class MySqlDateTimeString<T extends ColumnBaseConfig<'string', 'MySqlDat...
method constructor (line 100) | constructor(
method getSQLType (line 108) | getSQLType(): string {
type DatetimeFsp (line 114) | type DatetimeFsp = 0 | 1 | 2 | 3 | 4 | 5 | 6;
type MySqlDatetimeConfig (line 116) | interface MySqlDatetimeConfig<TMode extends 'date' | 'string' = 'date' |...
function datetime (line 129) | function datetime(a?: string | MySqlDatetimeConfig, b?: MySqlDatetimeCon...
FILE: drizzle-orm/src/mysql-core/columns/decimal.ts
type MySqlDecimalBuilderInitial (line 8) | type MySqlDecimalBuilderInitial<TName extends string> = MySqlDecimalBuil...
class MySqlDecimalBuilder (line 17) | class MySqlDecimalBuilder<
method constructor (line 22) | constructor(name: T['name'], config: MySqlDecimalConfig | undefined) {
method build (line 30) | override build<TTableName extends string>(
class MySqlDecimal (line 40) | class MySqlDecimal<T extends ColumnBaseConfig<'string', 'MySqlDecimal'>>
method mapFromDriverValue (line 49) | override mapFromDriverValue(value: unknown): string {
method getSQLType (line 55) | getSQLType(): string {
type MySqlDecimalNumberBuilderInitial (line 69) | type MySqlDecimalNumberBuilderInitial<TName extends string> = MySqlDecim...
class MySqlDecimalNumberBuilder (line 78) | class MySqlDecimalNumberBuilder<
method constructor (line 83) | constructor(name: T['name'], config: MySqlDecimalConfig | undefined) {
method build (line 91) | override build<TTableName extends string>(
class MySqlDecimalNumber (line 101) | class MySqlDecimalNumber<T extends ColumnBaseConfig<'number', 'MySqlDeci...
method mapFromDriverValue (line 110) | override mapFromDriverValue(value: unknown): number {
method getSQLType (line 118) | getSQLType(): string {
type MySqlDecimalBigIntBuilderInitial (line 132) | type MySqlDecimalBigIntBuilderInitial<TName extends string> = MySqlDecim...
class MySqlDecimalBigIntBuilder (line 141) | class MySqlDecimalBigIntBuilder<
method constructor (line 146) | constructor(name: T['name'], config: MySqlDecimalConfig | undefined) {
method build (line 154) | override build<TTableName extends string>(
class MySqlDecimalBigInt (line 164) | class MySqlDecimalBigInt<T extends ColumnBaseConfig<'bigint', 'MySqlDeci...
method getSQLType (line 177) | getSQLType(): string {
type MySqlDecimalConfig (line 191) | interface MySqlDecimalConfig<T extends 'string' | 'number' | 'bigint' = ...
function decimal (line 210) | function decimal(a?: string | MySqlDecimalConfig, b: MySqlDecimalConfig ...
FILE: drizzle-orm/src/mysql-core/columns/double.ts
type MySqlDoubleBuilderInitial (line 8) | type MySqlDoubleBuilderInitial<TName extends string> = MySqlDoubleBuilder<{
class MySqlDoubleBuilder (line 17) | class MySqlDoubleBuilder<T extends ColumnBuilderBaseConfig<'number', 'My...
method constructor (line 22) | constructor(name: T['name'], config: MySqlDoubleConfig | undefined) {
method build (line 30) | override build<TTableName extends string>(
class MySqlDouble (line 37) | class MySqlDouble<T extends ColumnBaseConfig<'number', 'MySqlDouble'>>
method getSQLType (line 46) | getSQLType(): string {
type MySqlDoubleConfig (line 59) | interface MySqlDoubleConfig {
function double (line 73) | function double(a?: string | MySqlDoubleConfig, b?: MySqlDoubleConfig) {
FILE: drizzle-orm/src/mysql-core/columns/enum.ts
type MySqlEnumColumnBuilderInitial (line 9) | type MySqlEnumColumnBuilderInitial<TName extends string, TEnum extends s...
class MySqlEnumColumnBuilder (line 18) | class MySqlEnumColumnBuilder<T extends ColumnBuilderBaseConfig<'string',...
method constructor (line 23) | constructor(name: T['name'], values: T['enumValues']) {
method build (line 29) | override build<TTableName extends string>(
class MySqlEnumColumn (line 39) | class MySqlEnumColumn<T extends ColumnBaseConfig<'string', 'MySqlEnumCol...
method getSQLType (line 46) | getSQLType(): string {
type MySqlEnumObjectColumnBuilderInitial (line 53) | type MySqlEnumObjectColumnBuilderInitial<TName extends string, TEnum ext...
class MySqlEnumObjectColumnBuilder (line 63) | class MySqlEnumObjectColumnBuilder<T extends ColumnBuilderBaseConfig<'st...
method constructor (line 68) | constructor(name: T['name'], values: T['enumValues']) {
method build (line 74) | override build<TTableName extends string>(
class MySqlEnumObjectColumn (line 84) | class MySqlEnumObjectColumn<T extends ColumnBaseConfig<'string', 'MySqlE...
method getSQLType (line 91) | getSQLType(): string {
function mysqlEnum (line 110) | function mysqlEnum(
FILE: drizzle-orm/src/mysql-core/columns/float.ts
type MySqlFloatBuilderInitial (line 8) | type MySqlFloatBuilderInitial<TName extends string> = MySqlFloatBuilder<{
class MySqlFloatBuilder (line 17) | class MySqlFloatBuilder<T extends ColumnBuilderBaseConfig<'number', 'MyS...
method constructor (line 22) | constructor(name: T['name'], config: MySqlFloatConfig | undefined) {
method build (line 30) | override build<TTableName extends string>(
class MySqlFloat (line 37) | class MySqlFloat<T extends ColumnBaseConfig<'number', 'MySqlFloat'>>
method getSQLType (line 46) | getSQLType(): string {
type MySqlFloatConfig (line 59) | interface MySqlFloatConfig {
function float (line 73) | function float(a?: string | MySqlFloatConfig, b?: MySqlFloatConfig) {
FILE: drizzle-orm/src/mysql-core/columns/int.ts
type MySqlIntBuilderInitial (line 8) | type MySqlIntBuilderInitial<TName extends string> = MySqlIntBuilder<{
class MySqlIntBuilder (line 17) | class MySqlIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySql...
method constructor (line 22) | constructor(name: T['name'], config?: MySqlIntConfig) {
method build (line 28) | override build<TTableName extends string>(
class MySqlInt (line 35) | class MySqlInt<T extends ColumnBaseConfig<'number', 'MySqlInt'>>
method getSQLType (line 40) | getSQLType(): string {
method mapFromDriverValue (line 44) | override mapFromDriverValue(value: number | string): number {
type MySqlIntConfig (line 52) | interface MySqlIntConfig {
function int (line 64) | function int(a?: string | MySqlIntConfig, b?: MySqlIntConfig) {
FILE: drizzle-orm/src/mysql-core/columns/json.ts
type MySqlJsonBuilderInitial (line 7) | type MySqlJsonBuilderInitial<TName extends string> = MySqlJsonBuilder<{
class MySqlJsonBuilder (line 16) | class MySqlJsonBuilder<T extends ColumnBuilderBaseConfig<'json', 'MySqlJ...
method constructor (line 19) | constructor(name: T['name']) {
method build (line 24) | override build<TTableName extends string>(
class MySqlJson (line 31) | class MySqlJson<T extends ColumnBaseConfig<'json', 'MySqlJson'>> extends...
method getSQLType (line 34) | getSQLType(): string {
method mapToDriverValue (line 38) | override mapToDriverValue(value: T['data']): string {
function json (line 45) | function json(name?: string) {
FILE: drizzle-orm/src/mysql-core/columns/mediumint.ts
type MySqlMediumIntBuilderInitial (line 9) | type MySqlMediumIntBuilderInitial<TName extends string> = MySqlMediumInt...
class MySqlMediumIntBuilder (line 18) | class MySqlMediumIntBuilder<T extends ColumnBuilderBaseConfig<'number', ...
method constructor (line 23) | constructor(name: T['name'], config?: MySqlIntConfig) {
method build (line 29) | override build<TTableName extends string>(
class MySqlMediumInt (line 39) | class MySqlMediumInt<T extends ColumnBaseConfig<'number', 'MySqlMediumIn...
method getSQLType (line 44) | getSQLType(): string {
method mapFromDriverValue (line 48) | override mapFromDriverValue(value: number | string): number {
function mediumint (line 64) | function mediumint(a?: string | MySqlIntConfig, b?: MySqlIntConfig) {
FILE: drizzle-orm/src/mysql-core/columns/real.ts
type MySqlRealBuilderInitial (line 8) | type MySqlRealBuilderInitial<TName extends string> = MySqlRealBuilder<{
class MySqlRealBuilder (line 17) | class MySqlRealBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySq...
method constructor (line 25) | constructor(name: T['name'], config: MySqlRealConfig | undefined) {
method build (line 32) | override build<TTableName extends string>(
class MySqlReal (line 39) | class MySqlReal<T extends ColumnBaseConfig<'number', 'MySqlReal'>> exten...
method getSQLType (line 48) | getSQLType(): string {
type MySqlRealConfig (line 59) | interface MySqlRealConfig {
function real (line 72) | function real(a?: string | MySqlRealConfig, b: MySqlRealConfig = {}) {
FILE: drizzle-orm/src/mysql-core/columns/serial.ts
type MySqlSerialBuilderInitial (line 15) | type MySqlSerialBuilderInitial<TName extends string> = IsAutoincrement<
class MySqlSerialBuilder (line 32) | class MySqlSerialBuilder<T extends ColumnBuilderBaseConfig<'number', 'My...
method constructor (line 37) | constructor(name: T['name']) {
method build (line 44) | override build<TTableName extends string>(
class MySqlSerial (line 51) | class MySqlSerial<
method getSQLType (line 56) | getSQLType(): string {
method mapFromDriverValue (line 60) | override mapFromDriverValue(value: number | string): number {
function serial (line 70) | function serial(name?: string) {
FILE: drizzle-orm/src/mysql-core/columns/smallint.ts
type MySqlSmallIntBuilderInitial (line 9) | type MySqlSmallIntBuilderInitial<TName extends string> = MySqlSmallIntBu...
class MySqlSmallIntBuilder (line 18) | class MySqlSmallIntBuilder<T extends ColumnBuilderBaseConfig<'number', '...
method constructor (line 23) | constructor(name: T['name'], config?: MySqlIntConfig) {
method build (line 29) | override build<TTableName extends string>(
class MySqlSmallInt (line 39) | class MySqlSmallInt<T extends ColumnBaseConfig<'number', 'MySqlSmallInt'>>
method getSQLType (line 44) | getSQLType(): string {
method mapFromDriverValue (line 48) | override mapFromDriverValue(value: number | string): number {
function smallint (line 64) | function smallint(a?: string | MySqlIntConfig, b?: MySqlIntConfig) {
FILE: drizzle-orm/src/mysql-core/columns/text.ts
type MySqlTextColumnType (line 8) | type MySqlTextColumnType = 'tinytext' | 'text' | 'mediumtext' | 'longtext';
type MySqlTextBuilderInitial (line 10) | type MySqlTextBuilderInitial<TName extends string, TEnum extends [string...
class MySqlTextBuilder (line 19) | class MySqlTextBuilder<T extends ColumnBuilderBaseConfig<'string', 'MySq...
method constructor (line 25) | constructor(name: T['name'], textType: MySqlTextColumnType, config: My...
method build (line 32) | override build<TTableName extends string>(
class MySqlText (line 39) | class MySqlText<T extends ColumnBaseConfig<'string', 'MySqlText'>>
method getSQLType (line 48) | getSQLType(): string {
type MySqlTextConfig (line 53) | interface MySqlTextConfig<
function text (line 67) | function text(a?: string | MySqlTextConfig, b: MySqlTextConfig = {}): any {
function tinytext (line 80) | function tinytext(a?: string | MySqlTextConfig, b: MySqlTextConfig = {})...
function mediumtext (line 93) | function mediumtext(a?: string | MySqlTextConfig, b: MySqlTextConfig = {...
function longtext (line 106) | function longtext(a?: string | MySqlTextConfig, b: MySqlTextConfig = {})...
FILE: drizzle-orm/src/mysql-core/columns/time.ts
type MySqlTimeBuilderInitial (line 8) | type MySqlTimeBuilderInitial<TName extends string> = MySqlTimeBuilder<{
class MySqlTimeBuilder (line 17) | class MySqlTimeBuilder<T extends ColumnBuilderBaseConfig<'string', 'MySq...
method constructor (line 23) | constructor(
method build (line 32) | override build<TTableName extends string>(
class MySqlTime (line 39) | class MySqlTime<
method getSQLType (line 46) | getSQLType(): string {
type TimeConfig (line 52) | type TimeConfig = {
function time (line 64) | function time(a?: string | TimeConfig, b?: TimeConfig) {
FILE: drizzle-orm/src/mysql-core/columns/timestamp.ts
type MySqlTimestampBuilderInitial (line 8) | type MySqlTimestampBuilderInitial<TName extends string> = MySqlTimestamp...
class MySqlTimestampBuilder (line 17) | class MySqlTimestampBuilder<T extends ColumnBuilderBaseConfig<'date', 'M...
method constructor (line 22) | constructor(name: T['name'], config: MySqlTimestampConfig | undefined) {
method build (line 28) | override build<TTableName extends string>(
class MySqlTimestamp (line 38) | class MySqlTimestamp<T extends ColumnBaseConfig<'date', 'MySqlTimestamp'>>
method getSQLType (line 45) | getSQLType(): string {
method mapFromDriverValue (line 50) | override mapFromDriverValue(value: string): Date {
method mapToDriverValue (line 54) | override mapToDriverValue(value: Date): string {
type MySqlTimestampStringBuilderInitial (line 59) | type MySqlTimestampStringBuilderInitial<TName extends string> = MySqlTim...
class MySqlTimestampStringBuilder (line 68) | class MySqlTimestampStringBuilder<T extends ColumnBuilderBaseConfig<'str...
method constructor (line 73) | constructor(name: T['name'], config: MySqlTimestampConfig | undefined) {
method build (line 79) | override build<TTableName extends string>(
class MySqlTimestampString (line 89) | class MySqlTimestampString<T extends ColumnBaseConfig<'string', 'MySqlTi...
method getSQLType (line 96) | getSQLType(): string {
type TimestampFsp (line 102) | type TimestampFsp = 0 | 1 | 2 | 3 | 4 | 5 | 6;
type MySqlTimestampConfig (line 104) | interface MySqlTimestampConfig<TMode extends 'string' | 'date' = 'string...
function timestamp (line 119) | function timestamp(a?: string | MySqlTimestampConfig, b: MySqlTimestampC...
FILE: drizzle-orm/src/mysql-core/columns/tinyint.ts
type MySqlTinyIntBuilderInitial (line 9) | type MySqlTinyIntBuilderInitial<TName extends string> = MySqlTinyIntBuil...
class MySqlTinyIntBuilder (line 18) | class MySqlTinyIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'M...
method constructor (line 23) | constructor(name: T['name'], config?: MySqlIntConfig) {
method build (line 29) | override build<TTableName extends string>(
class MySqlTinyInt (line 39) | class MySqlTinyInt<T extends ColumnBaseConfig<'number', 'MySqlTinyInt'>>
method getSQLType (line 44) | getSQLType(): string {
method mapFromDriverValue (line 48) | override mapFromDriverValue(value: number | string): number {
function tinyint (line 64) | function tinyint(a?: string | MySqlIntConfig, b?: MySqlIntConfig) {
FILE: drizzle-orm/src/mysql-core/columns/varbinary.ts
type MySqlVarBinaryBuilderInitial (line 8) | type MySqlVarBinaryBuilderInitial<TName extends string> = MySqlVarBinary...
class MySqlVarBinaryBuilder (line 17) | class MySqlVarBinaryBuilder<T extends ColumnBuilderBaseConfig<'string', ...
method constructor (line 23) | constructor(name: T['name'], config: MySqlVarbinaryOptions) {
method build (line 29) | override build<TTableName extends string>(
class MySqlVarBinary (line 39) | class MySqlVarBinary<
method mapFromDriverValue (line 46) | override mapFromDriverValue(value: string | Buffer | Uint8Array): stri...
method getSQLType (line 58) | getSQLType(): string {
type MySqlVarbinaryOptions (line 63) | interface MySqlVarbinaryOptions {
function varbinary (line 74) | function varbinary(a?: string | MySqlVarbinaryOptions, b?: MySqlVarbinar...
FILE: drizzle-orm/src/mysql-core/columns/varchar.ts
type MySqlVarCharBuilderInitial (line 8) | type MySqlVarCharBuilderInitial<
class MySqlVarCharBuilder (line 24) | class MySqlVarCharBuilder<
method constructor (line 30) | constructor(name: T['name'], config: MySqlVarCharConfig<T['enumValues'...
method build (line 37) | override build<TTableName extends string>(
class MySqlVarChar (line 47) | class MySqlVarChar<T extends ColumnBaseConfig<'string', 'MySqlVarChar'> ...
method getSQLType (line 56) | getSQLType(): string {
type MySqlVarCharConfig (line 61) | interface MySqlVarCharConfig<
function varchar (line 81) | function varchar(a?: string | MySqlVarCharConfig, b?: MySqlVarCharConfig...
FILE: drizzle-orm/src/mysql-core/columns/year.ts
type MySqlYearBuilderInitial (line 7) | type MySqlYearBuilderInitial<TName extends string> = MySqlYearBuilder<{
class MySqlYearBuilder (line 16) | class MySqlYearBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySq...
method constructor (line 19) | constructor(name: T['name']) {
method build (line 24) | override build<TTableName extends string>(
class MySqlYear (line 31) | class MySqlYear<
method getSQLType (line 36) | getSQLType(): string {
function year (line 43) | function year(name?: string) {
FILE: drizzle-orm/src/mysql-core/db.ts
class MySqlDatabase (line 34) | class MySqlDatabase<
method constructor (line 54) | constructor(
method $count (line 149) | $count(
method with (line 177) | with(...queries: WithSubquery[]) {
method select (line 362) | select(fields?: SelectedFields): MySqlSelectBuilder<SelectedFields | u...
method selectDistinct (line 394) | selectDistinct(fields?: SelectedFields): MySqlSelectBuilder<SelectedFi...
method update (line 424) | update<TTable extends MySqlTable>(table: TTable): MySqlUpdateBuilder<T...
method insert (line 447) | insert<TTable extends MySqlTable>(table: TTable): MySqlInsertBuilder<T...
method delete (line 470) | delete<TTable extends MySqlTable>(table: TTable): MySqlDeleteBase<TTab...
method execute (line 474) | execute<T extends { [column: string]: any } = ResultSetHeader>(
method transaction (line 480) | transaction<T>(
type MySQLWithReplicas (line 491) | type MySQLWithReplicas<Q> = Q & { $primary: Q; $replicas: Q[] };
method query (line 533) | get query() {
FILE: drizzle-orm/src/mysql-core/dialect.ts
type MySqlDialectConfig (line 40) | interface MySqlDialectConfig {
class MySqlDialect (line 44) | class MySqlDialect {
method constructor (line 50) | constructor(config?: MySqlDialectConfig) {
method migrate (line 54) | async migrate(
method escapeName (line 94) | escapeName(name: string): string {
method escapeParam (line 98) | escapeParam(_num: number): string {
method escapeString (line 102) | escapeString(str: string): string {
method buildWithCTE (line 106) | private buildWithCTE(queries: Subquery[] | undefined): SQL | undefined {
method buildDeleteQuery (line 120) | buildDeleteQuery({ table, where, returning, withList, limit, orderBy }...
method buildUpdateSet (line 136) | buildUpdateSet(table: MySqlTable, set: UpdateSet): SQL {
method buildUpdateQuery (line 158) | buildUpdateQuery({ table, set, where, returning, withList, limit, orde...
method buildSelection (line 187) | private buildSelection(
method buildLimit (line 255) | private buildLimit(limit: number | Placeholder | undefined): SQL | und...
method buildOrderBy (line 261) | private buildOrderBy(orderBy: (MySqlColumn | SQL | SQL.Aliased)[] | un...
method buildIndex (line 265) | private buildIndex({
method buildSelectQuery (line 277) | buildSelectQuery(
method buildSetOperations (line 430) | buildSetOperations(leftSelect: SQL, setOperators: MySqlSelectConfig['s...
method buildSetOperationQuery (line 448) | buildSetOperationQuery({
method buildInsertQuery (line 493) | buildInsertQuery(
method sqlToQuery (line 567) | sqlToQuery(sql: SQL, invokeSource?: 'indexes' | undefined): QueryWithT...
method buildRelationalQuery (line 577) | buildRelationalQuery({
method buildRelationalQueryWithoutLateralSubqueries (line 875) | buildRelationalQueryWithoutLateralSubqueries({
FILE: drizzle-orm/src/mysql-core/expressions.ts
function concat (line 8) | function concat(column: MySqlColumn | SQL.Aliased, value: string | Place...
function substring (line 12) | function substring(
FILE: drizzle-orm/src/mysql-core/foreign-keys.ts
type UpdateDeleteAction (line 6) | type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set nu...
type Reference (line 8) | type Reference = () => {
class ForeignKeyBuilder (line 15) | class ForeignKeyBuilder {
method constructor (line 27) | constructor(
method onUpdate (line 48) | onUpdate(action: UpdateDeleteAction): this {
method onDelete (line 53) | onDelete(action: UpdateDeleteAction): this {
method build (line 59) | build(table: MySqlTable): ForeignKey {
type AnyForeignKeyBuilder (line 64) | type AnyForeignKeyBuilder = ForeignKeyBuilder;
class ForeignKey (line 66) | class ForeignKey {
method constructor (line 73) | constructor(readonly table: MySqlTable, builder: ForeignKeyBuilder) {
method getName (line 79) | getName(): string {
type ColumnsWithTable (line 93) | type ColumnsWithTable<
type GetColumnsTable (line 98) | type GetColumnsTable<TColumns extends MySqlColumn | MySqlColumn[]> = (
function foreignKey (line 105) | function foreignKey<
FILE: drizzle-orm/src/mysql-core/indexes.ts
type IndexConfig (line 6) | interface IndexConfig {
type IndexColumn (line 32) | type IndexColumn = MySqlColumn | SQL;
class IndexBuilderOn (line 34) | class IndexBuilderOn {
method constructor (line 37) | constructor(private name: string, private unique: boolean) {}
method on (line 39) | on(...columns: [IndexColumn, ...IndexColumn[]]): IndexBuilder {
type AnyIndexBuilder (line 44) | interface AnyIndexBuilder {
type IndexBuilder (line 49) | interface IndexBuilder extends AnyIndexBuilder {}
method constructor (line 57) | constructor(name: string, columns: IndexColumn[], unique: boolean) {
method using (line 65) | using(using: IndexConfig['using']): this {
method algorithm (line 70) | algorithm(algorithm: IndexConfig['algorithm']): this {
method lock (line 75) | lock(lock: IndexConfig['lock']): this {
method build (line 81) | build(table: MySqlTable): Index {
class IndexBuilder (line 51) | class IndexBuilder implements AnyIndexBuilder {
method constructor (line 57) | constructor(name: string, columns: IndexColumn[], unique: boolean) {
method using (line 65) | using(using: IndexConfig['using']): this {
method algorithm (line 70) | algorithm(algorithm: IndexConfig['algorithm']): this {
method lock (line 75) | lock(lock: IndexConfig['lock']): this {
method build (line 81) | build(table: MySqlTable): Index {
class Index (line 86) | class Index {
method constructor (line 91) | constructor(config: IndexConfig, table: MySqlTable) {
type GetColumnsTableName (line 96) | type GetColumnsTableName<TColumns> = TColumns extends
function index (line 102) | function index(name: string): IndexBuilderOn {
function uniqueIndex (line 106) | function uniqueIndex(name: string): IndexBuilderOn {
FILE: drizzle-orm/src/mysql-core/primary-keys.ts
function primaryKey (line 18) | function primaryKey(...config: any) {
class PrimaryKeyBuilder (line 25) | class PrimaryKeyBuilder {
method constructor (line 34) | constructor(
method build (line 43) | build(table: MySqlTable): PrimaryKey {
class PrimaryKey (line 48) | class PrimaryKey {
method constructor (line 54) | constructor(readonly table: MySqlTable, columns: MySqlColumn[], name?:...
method getName (line 59) | getName(): string {
FILE: drizzle-orm/src/mysql-core/query-builders/count.ts
class MySqlCountBuilder (line 7) | class MySqlCountBuilder<
method buildEmbeddedCount (line 17) | private static buildEmbeddedCount(
method buildCount (line 24) | private static buildCount(
method constructor (line 31) | constructor(
method then (line 50) | then<TResult1 = number, TResult2 = never>(
method catch (line 61) | catch(
method finally (line 67) | finally(onFinally?: (() => void) | null | undefined): Promise<number> {
FILE: drizzle-orm/src/mysql-core/query-builders/delete.ts
type MySqlDeleteWithout (line 23) | type MySqlDeleteWithout<
type MySqlDelete (line 39) | type MySqlDelete<
type MySqlDeleteConfig (line 45) | interface MySqlDeleteConfig {
type MySqlDeletePrepare (line 54) | type MySqlDeletePrepare<T extends AnyMySqlDeleteBase> = PreparedQueryKind<
type MySqlDeleteDynamic (line 63) | type MySqlDeleteDynamic<T extends AnyMySqlDeleteBase> = MySqlDelete<
type AnyMySqlDeleteBase (line 69) | type AnyMySqlDeleteBase = MySqlDeleteBase<any, any, any, any, any>;
type MySqlDeleteBase (line 71) | interface MySqlDeleteBase<
method constructor (line 100) | constructor(
method where (line 139) | where(where: SQL | undefined): MySqlDeleteWithout<this, TDynamic, 'whe...
method orderBy (line 148) | orderBy(
method limit (line 170) | limit(limit: number | Placeholder): MySqlDeleteWithout<this, TDynamic,...
method getSQL (line 176) | getSQL(): SQL {
method toSQL (line 180) | toSQL(): Query {
method prepare (line 185) | prepare(): MySqlDeletePrepare<this> {
method $dynamic (line 212) | $dynamic(): MySqlDeleteDynamic<this> {
class MySqlDeleteBase (line 87) | class MySqlDeleteBase<
method constructor (line 100) | constructor(
method where (line 139) | where(where: SQL | undefined): MySqlDeleteWithout<this, TDynamic, 'whe...
method orderBy (line 148) | orderBy(
method limit (line 170) | limit(limit: number | Placeholder): MySqlDeleteWithout<this, TDynamic,...
method getSQL (line 176) | getSQL(): SQL {
method toSQL (line 180) | toSQL(): Query {
method prepare (line 185) | prepare(): MySqlDeletePrepare<this> {
method $dynamic (line 212) | $dynamic(): MySqlDeleteDynamic<this> {
FILE: drizzle-orm/src/mysql-core/query-builders/insert.ts
type MySqlInsertConfig (line 28) | interface MySqlInsertConfig<TTable extends MySqlTable = MySqlTable> {
type AnyMySqlInsertConfig (line 37) | type AnyMySqlInsertConfig = MySqlInsertConfig<MySqlTable>;
type MySqlInsertValue (line 39) | type MySqlInsertValue<TTable extends MySqlTable> =
type MySqlInsertSelectQueryBuilder (line 45) | type MySqlInsertSelectQueryBuilder<TTable extends MySqlTable> = TypedQue...
class MySqlInsertBuilder (line 49) | class MySqlInsertBuilder<
method constructor (line 58) | constructor(
method ignore (line 64) | ignore(): this {
method values (line 71) | values(
method select (line 97) | select(
type MySqlInsertWithout (line 118) | type MySqlInsertWithout<T extends AnyMySqlInsert, TDynamic extends boole...
type MySqlInsertDynamic (line 132) | type MySqlInsertDynamic<T extends AnyMySqlInsert> = MySqlInsert<
type MySqlInsertPrepare (line 139) | type MySqlInsertPrepare<
type MySqlInsertOnDuplicateKeyUpdateConfig (line 151) | type MySqlInsertOnDuplicateKeyUpdateConfig<T extends AnyMySqlInsert> = {
type MySqlInsert (line 155) | type MySqlInsert<
type MySqlInsertReturning (line 162) | type MySqlInsertReturning<
type AnyMySqlInsert (line 174) | t
Copy disabled (too large)
Download .json
Condensed preview — 1373 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (12,211K chars).
[
{
"path": ".eslintignore",
"chars": 171,
"preview": "node_modules\ndist\ndist-dts\nexamples\n**/*.js\n**/*.mjs\n**/*.cjs\n**/playground\nintegration-tests/tests/prisma/*/client\ninte"
},
{
"path": ".eslintrc.yaml",
"chars": 2603,
"preview": "root: true\nextends:\n - 'eslint:recommended'\n - 'plugin:@typescript-eslint/recommended'\n - 'plugin:unicorn/recommended"
},
{
"path": ".github/FUNDING.yml",
"chars": 738,
"preview": "# These are supported funding model platforms\n\ngithub: drizzle-team\npatreon: # Replace with a single Patreon username\nop"
},
{
"path": ".github/ISSUE_TEMPLATE/bug-template.yaml",
"chars": 2252,
"preview": "name: \"Bug Report\"\ndescription: Report an issue or possible bug\ntitle: \"[BUG]:\"\nlabels: [\"bug\"]\n\nbody:\n - type: markdow"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 183,
"preview": "blank_issues_enabled: true\ncontact_links:\n - name: Ask a question\n url: https://discord.gg/JGrkEU4Scj\n about: Ask"
},
{
"path": ".github/ISSUE_TEMPLATE/docs-template.yaml",
"chars": 576,
"preview": "name: \"Documentation Enhancement\"\ndescription: Suggest documentation improvements\ntitle: \"[DOCS]:\"\nlabels: [\"docs\"]\n\nbod"
},
{
"path": ".github/ISSUE_TEMPLATE/feature-template.yaml",
"chars": 580,
"preview": "name: \"Feature Request\"\ndescription: Suggest new feature\ntitle: \"[FEATURE]:\"\nlabels: [\"enhancement\"]\n\nbody:\n - type: ch"
},
{
"path": ".github/workflows/codeql.yml",
"chars": 2511,
"preview": "name: \"CodeQL\"\n\non:\n push:\n branches: [ 'main', 'beta' ]\n pull_request:\n # The branches below must be a subset o"
},
{
"path": ".github/workflows/release-feature-branch.yaml",
"chars": 14033,
"preview": "name: Release (feature branch)\n\non:\n workflow_call:\n secrets:\n PLANETSCALE_CONNECTION_STRING:\n required:"
},
{
"path": ".github/workflows/release-latest.yaml",
"chars": 17273,
"preview": "name: Release (latest)\n\non:\n workflow_call:\n secrets:\n PLANETSCALE_CONNECTION_STRING:\n required: true\n "
},
{
"path": ".github/workflows/router.yaml",
"chars": 2136,
"preview": "name: Release Router\n\non:\n push:\n branches-ignore:\n - main\n pull_request:\n workflow_dispatch:\n\njobs:\n switch"
},
{
"path": ".github/workflows/unpublish-release-feature-branch.yaml",
"chars": 1070,
"preview": "name: Unpublish release (feature branch)\n\non: delete\n\njobs:\n unpublish-release:\n if: github.event.ref_type == 'branc"
},
{
"path": ".gitignore",
"chars": 155,
"preview": "node_modules\n.vscode\ndist\ndist.new\n*.tsbuildinfo\n*.tgz\n/*.sql\n.cache\n.turbo\n.rollup.cache\ndist-dts\nrollup.config-*.mjs\n*"
},
{
"path": ".markdownlint.yaml",
"chars": 89,
"preview": "no-inline-html: false\nfirst-line-h1: false\nline-length: false\nMD010:\n spaces_per_tab: 2\n"
},
{
"path": ".npmrc",
"chars": 35,
"preview": "# prefer-workspace-packages = true\n"
},
{
"path": ".nvmrc",
"chars": 2,
"preview": "22"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 5219,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
},
{
"path": "CONTRIBUTING.md",
"chars": 8998,
"preview": "# Contributing\n\nWelcome! We're glad you're interested in Drizzle ORM and want to help us make it better.\n\nDrizzle ORM is"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "README.md",
"chars": 3241,
"preview": "<div align=\"center\">\n <img src=\"./misc/readme/logo-github-sq-dark.svg#gh-dark-mode-only\" />\n <img src=\"./misc/readme/l"
},
{
"path": "SECURITY.md",
"chars": 165,
"preview": "# Security Policy\n\n## Reporting a Vulnerability\n\nIf you have a security issue to report, please contact us at [security@"
},
{
"path": "changelogs/README.md",
"chars": 477,
"preview": "# Release flow\n\n- Push feature branch\n- GitHub workflow publishes new feature tag to NPM\n- Bump package versions manuall"
},
{
"path": "changelogs/drizzle-arktype/0.1.2.md",
"chars": 1674,
"preview": "`drizzle-arktype` is a plugin for [Drizzle ORM](https://github.com/drizzle-team/drizzle-orm) that allows you to generate"
},
{
"path": "changelogs/drizzle-arktype/0.1.3.md",
"chars": 288,
"preview": "- TS language server performance improvements\n- Fixed [Buffer is not defined using drizzle-arktype client side with vite"
},
{
"path": "changelogs/drizzle-kit/0.23.2.md",
"chars": 274,
"preview": "- Fixed a bug in PostgreSQL with push and introspect where the `schemaFilter` object was passed. It was detecting enums "
},
{
"path": "changelogs/drizzle-kit/0.24.0.md",
"chars": 2301,
"preview": "## Breaking changes (for SQLite users)\n\n#### Fixed [Composite primary key order is not consistent](https://github.com/dr"
},
{
"path": "changelogs/drizzle-kit/0.24.1.md",
"chars": 3116,
"preview": "## Bug fixes\n\n> Big thanks to @L-Mario564 for his [PR](https://github.com/drizzle-team/drizzle-orm/pull/2804). It confli"
},
{
"path": "changelogs/drizzle-kit/0.24.2.md",
"chars": 502,
"preview": "## New Features\n\n### 🎉 Support for `pglite` driver\n\nYou can now use pglite with all drizzle-kit commands, including Driz"
},
{
"path": "changelogs/drizzle-kit/0.25.0.md",
"chars": 7174,
"preview": "## Breaking changes and migrate guide for Turso users\n\nIf you are using Turso and libsql, you will need to upgrade your "
},
{
"path": "changelogs/drizzle-kit/0.26.0.md",
"chars": 3678,
"preview": "# New Features\n\n## Checks support in `drizzle-kit`\n\nYou can use drizzle-kit to manage your `check` constraint defined in"
},
{
"path": "changelogs/drizzle-kit/0.26.1.md",
"chars": 35,
"preview": "- Fix `data is malformed` for views"
},
{
"path": "changelogs/drizzle-kit/0.26.2.md",
"chars": 202,
"preview": "- Updated internal versions for the drizzle-kit and drizzle-orm packages. Changes were introduced in the last minor rele"
},
{
"path": "changelogs/drizzle-kit/0.27.0.md",
"chars": 11921,
"preview": "> This version of `drizzle-jit` requires `drizzle-orm@0.36.0` to enable all new features\n\n# New Features\n\n## Row-Level S"
},
{
"path": "changelogs/drizzle-kit/0.27.1.md",
"chars": 145,
"preview": "- Fix: [[BUG]: When using RLS policies and Views, the view is the last clause generated](https://github.com/drizzle-team"
},
{
"path": "changelogs/drizzle-kit/0.27.2.md",
"chars": 296,
"preview": "- Fix [[BUG]: Undefined properties when using drizzle-kit push](https://github.com/drizzle-team/drizzle-orm/issues/3391)"
},
{
"path": "changelogs/drizzle-kit/0.28.0.md",
"chars": 3497,
"preview": "# Improvements\n\n- Added an OHM static imports checker to identify unexpected imports within a chain of imports in the dr"
},
{
"path": "changelogs/drizzle-kit/0.28.1.md",
"chars": 212,
"preview": "# Bug fixes\n\n- Fixed typos in repository: thanks @armandsalle, @masto, @wackbyte, @Asher-JH, @MaxLeiter\n- [fix: wrong di"
},
{
"path": "changelogs/drizzle-kit/0.29.0.md",
"chars": 1219,
"preview": "# New Dialects\n\n### 🎉 `SingleStore` dialect is now available in Drizzle\n\nThanks to the SingleStore team for creating a P"
},
{
"path": "changelogs/drizzle-kit/0.29.1.md",
"chars": 45,
"preview": "- Fix SingleStore generate migrations command"
},
{
"path": "changelogs/drizzle-kit/0.30.0.md",
"chars": 717,
"preview": "Starting from this update, the PostgreSQL dialect will align with the behavior of all other dialects. It will no longer "
},
{
"path": "changelogs/drizzle-kit/0.30.1.md",
"chars": 931,
"preview": "# New Features\n\n### `drizzle-kit export`\n\nTo make drizzle-kit integration with other migration tools, like Atlas much ea"
},
{
"path": "changelogs/drizzle-kit/0.30.2.md",
"chars": 191,
"preview": "- Fix certificates generation utility for Drizzle Studio; [[BUG]: [drizzle-kit]: drizzle-kit dependency on drizzle-studi"
},
{
"path": "changelogs/drizzle-kit/0.30.3.md",
"chars": 542,
"preview": "# SingleStore `push` and `generate` improvements\n\nAs SingleStore did not support certain DDL statements before this rele"
},
{
"path": "changelogs/drizzle-kit/0.30.4.md",
"chars": 150,
"preview": "- Fix bug that generates incorrect syntax when introspect in mysql\n- Fix a bug that caused incorrect syntax output when "
},
{
"path": "changelogs/drizzle-kit/0.30.5.md",
"chars": 1655,
"preview": "# New Features \n\n## Added `Gel` dialect support and `gel-js` client support\n\nDrizzle is getting a new `Gel` dialect with"
},
{
"path": "changelogs/drizzle-kit/0.30.6.md",
"chars": 330,
"preview": "### Bug fixes\n\n- [[BUG]: d1 push locally is not working](https://github.com/drizzle-team/drizzle-orm/issues/4099) - than"
},
{
"path": "changelogs/drizzle-kit/0.31.0.md",
"chars": 1490,
"preview": "## Features and improvements\n\n### Enum DDL improvements\n\nFor situations where you drop an `enum` value or reorder values"
},
{
"path": "changelogs/drizzle-kit/0.31.1.md",
"chars": 544,
"preview": "### Fixed `drizzle-kit pull` bugs when using Gel extensions.\n\nBecause Gel extensions create schema names containing `::`"
},
{
"path": "changelogs/drizzle-kit/0.31.10.md",
"chars": 435,
"preview": "- Updated to `hanji@0.0.8` - native bun `stringWidth`, `stripANSI` support, errors for non-TTY environments \n- We've mi"
},
{
"path": "changelogs/drizzle-kit/0.31.2.md",
"chars": 81,
"preview": "### Bug fixes\n\n- Fixed relations extraction to not interfere with Drizzle Studio."
},
{
"path": "changelogs/drizzle-kit/0.31.3.md",
"chars": 98,
"preview": "- Internal changes to Studio context. Added `databaseName` and `packageName` properties for Studio"
},
{
"path": "changelogs/drizzle-kit/0.31.4.md",
"chars": 75,
"preview": "- Fixed `halfvec`, `bit` and `sparsevec` type generation bug in drizzle-kit"
},
{
"path": "changelogs/drizzle-kit/0.31.5.md",
"chars": 66,
"preview": "- Add casing support to studio configuration and related functions"
},
{
"path": "changelogs/drizzle-kit/0.31.6.md",
"chars": 129,
"preview": "### Bug fixes\n\n- [[BUG]: Importing drizzle-kit/api fails in ESM modules](https://github.com/drizzle-team/drizzle-orm/iss"
},
{
"path": "changelogs/drizzle-kit/0.31.7.md",
"chars": 175,
"preview": "### Bug fixes\n\n- [[BUG]: Drizzle Kit push to Postgres 18 produces unecessary DROP SQL when the schema was NOT changed](h"
},
{
"path": "changelogs/drizzle-kit/0.31.8.md",
"chars": 110,
"preview": "### Bug fixes\n\n- Fixed `algorythm` => `algorithm` typo.\n- Fixed external dependencies in build configuration.\n"
},
{
"path": "changelogs/drizzle-kit/0.31.9.md",
"chars": 49,
"preview": "- drizzle-kit api improvements for D1 connections"
},
{
"path": "changelogs/drizzle-orm/0.12.0-beta.23.md",
"chars": 138,
"preview": "# drizzle-orm 0.12.0-beta.23\n\n- Added new row mapping mechanism as `mapResultRowV2`, `mapResultRow` will be replaced by "
},
{
"path": "changelogs/drizzle-orm/0.12.0-beta.24.md",
"chars": 203,
"preview": "# drizzle-orm 0.12.0-beta.24\n\n- Made `.execute()` method public in query builders.\n- Added `name()` function for escapin"
},
{
"path": "changelogs/drizzle-orm/0.13.0.md",
"chars": 34,
"preview": "# drizzle-orm 0.13.0\n\n- Release 🎉\n"
},
{
"path": "changelogs/drizzle-orm/0.13.1.md",
"chars": 56,
"preview": "# drizzle-orm 0.13.1\n\n- Fix mysql peer dependency range\n"
},
{
"path": "changelogs/drizzle-orm/0.14.1.md",
"chars": 53,
"preview": "# drizzle-orm 0.14.1\n\n- Bumped everything to 0.14.1.\n"
},
{
"path": "changelogs/drizzle-orm/0.14.2.md",
"chars": 51,
"preview": "# drizzle-orm 0.14.2\n\n- Bumped everything to 0.14.2"
},
{
"path": "changelogs/drizzle-orm/0.15.0.md",
"chars": 135,
"preview": "# drizzle-orm 0.15.0\n\n- Minor upgrade for all modules, due to adding version for api\n- Add internal version for ORM api "
},
{
"path": "changelogs/drizzle-orm/0.15.1.md",
"chars": 111,
"preview": "# drizzle-orm 0.15.1\n\n- Add schema symbol to table\n- Append schema before table name in SQLWrapper if it exists"
},
{
"path": "changelogs/drizzle-orm/0.15.2.md",
"chars": 39,
"preview": "# drizzle-orm 0.15.2\n\nInternal release\n"
},
{
"path": "changelogs/drizzle-orm/0.15.3.md",
"chars": 39,
"preview": "# drizzle-orm 0.15.3\n\nInternal release\n"
},
{
"path": "changelogs/drizzle-orm/0.16.0.md",
"chars": 52,
"preview": "# drizzle-orm 0.16.0\n\n- Bump all packages to 0.16.0\n"
},
{
"path": "changelogs/drizzle-orm/0.16.1.md",
"chars": 78,
"preview": "# drizzle-orm 0.16.0\n\n- Fix peer dependency error for >=0.16 drizzle packages\n"
},
{
"path": "changelogs/drizzle-orm/0.17.0.md",
"chars": 1342,
"preview": "## ❗ All ORM packages are now merged into `drizzle-orm`\n\nStarting from release `0.17.0` and onwards, all dialect-specifi"
},
{
"path": "changelogs/drizzle-orm/0.17.1.md",
"chars": 43,
"preview": "- Added feature showcase section to README\n"
},
{
"path": "changelogs/drizzle-orm/0.17.2.md",
"chars": 59,
"preview": "- Fixed package.json require path in 'drizzle-orm/version'\n"
},
{
"path": "changelogs/drizzle-orm/0.17.3.md",
"chars": 552,
"preview": "We have released [AWS Data API support](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) for "
},
{
"path": "changelogs/drizzle-orm/0.17.4.md",
"chars": 751,
"preview": "We have released [SQLite Proxy Driver](https://github.com/drizzle-team/drizzle-orm/tree/main/examples/sqlite-proxy)\n\n---"
},
{
"path": "changelogs/drizzle-orm/0.17.5.md",
"chars": 474,
"preview": "We have released [Planetscale Serverless](https://github.com/planetscale/database-js) driver support\n\n---\n\nUsage example"
},
{
"path": "changelogs/drizzle-orm/0.17.6.md",
"chars": 175,
"preview": "Fix circular dependency for query building on all pg and mysql drivers\n\nMoved all aws data api typings specific logic to"
},
{
"path": "changelogs/drizzle-orm/0.17.7.md",
"chars": 321,
"preview": "- Fix [#158](https://github.com/drizzle-team/drizzle-orm/issues/158) issue. Method `.returning()` was working incorrectl"
},
{
"path": "changelogs/drizzle-orm/0.18.0.md",
"chars": 305,
"preview": "- Improved join result types for partial selects (refer to the [docs](/docs/joins.md) page for more information)\n- Renam"
},
{
"path": "changelogs/drizzle-orm/0.19.0.md",
"chars": 590,
"preview": "- Implemented selecting and joining a subquery. Example usage:\n\n ```ts\n const sq = db\n .select({\n categoryId: "
},
{
"path": "changelogs/drizzle-orm/0.19.1.md",
"chars": 427,
"preview": "## Changelog\n\n---\n\n- Add `char` data type support for postgresql by @AlexandrLi in [#177](https://github.com/drizzle-tea"
},
{
"path": "changelogs/drizzle-orm/0.20.0.md",
"chars": 679,
"preview": "\n- 🎉 **Implemented support for WITH clause ([docs](/drizzle-orm/src/pg-core/README.md#with-clause)). Example usage:**\n\n "
},
{
"path": "changelogs/drizzle-orm/0.20.1.md",
"chars": 178,
"preview": "- 🎉 Added `{ logger: true }` shorthand to `drizzle()` to enable query logging. See [logging docs](/drizzle-orm/src/pg-co"
},
{
"path": "changelogs/drizzle-orm/0.20.2.md",
"chars": 92,
"preview": "- 🎉 Added PostgreSQL network data types:\n - `inet`\n - `cidr`\n - `macaddr`\n - `macaddr8`\n"
},
{
"path": "changelogs/drizzle-orm/0.20.3.md",
"chars": 647,
"preview": "- 🎉 Added support for locking clauses in SELECT (`SELECT ... FOR UPDATE`):\n\n PostgreSQL\n\n ```ts\n await db\n .select"
},
{
"path": "changelogs/drizzle-orm/0.21.0.md",
"chars": 6367,
"preview": "## Drizzle ORM 0.21.0 was released 🎉\n\n- Added support for new migration folder structure and breakpoints feature, descri"
},
{
"path": "changelogs/drizzle-orm/0.21.1.md",
"chars": 658,
"preview": "- 🎉 Added support for `HAVING` clause\n- 🎉 Added support for referencing selected fields in `.where()`, `.having()`, `.gr"
},
{
"path": "changelogs/drizzle-orm/0.22.0.md",
"chars": 1028,
"preview": "- 🎉 Introduced a standalone query builder that can be used without a DB connection:\n\n ```ts\n import { queryBuilder as "
},
{
"path": "changelogs/drizzle-orm/0.23.0.md",
"chars": 2575,
"preview": "- 🎉 Added Knex and Kysely adapters! They allow you to manage the schemas and migrations with Drizzle and query the data "
},
{
"path": "changelogs/drizzle-orm/0.23.1.md",
"chars": 46,
"preview": "- 🐛 Re-export `InferModel` from `drizzle-orm`\n"
},
{
"path": "changelogs/drizzle-orm/0.23.10.md",
"chars": 105,
"preview": "- 🐛 Add missing config argument to transactions API\n- 🐛 Fix Postgres and MySQL schema declaration (#427)\n"
},
{
"path": "changelogs/drizzle-orm/0.23.11.md",
"chars": 183,
"preview": "- 🐛 Fix migrator function for PostgreSQL\n\n> Would suggest to upgrade to this version anyone who is using postgres dialec"
},
{
"path": "changelogs/drizzle-orm/0.23.12.md",
"chars": 80,
"preview": "- 🐛 Fixed multi-level join results (e.g. joining a subquery with a nested join)\n"
},
{
"path": "changelogs/drizzle-orm/0.23.13.md",
"chars": 83,
"preview": "- 🎉 All enum and text enum columns now have a properly typed `enumValues` property\n"
},
{
"path": "changelogs/drizzle-orm/0.23.2.md",
"chars": 54,
"preview": "- 🐛 Rolled back some breaking changes for drizzle-kit\n"
},
{
"path": "changelogs/drizzle-orm/0.23.3.md",
"chars": 48,
"preview": "- 🎉 Added [libSQL](https://libsql.org/) support\n"
},
{
"path": "changelogs/drizzle-orm/0.23.4.md",
"chars": 51,
"preview": "- 🐛 Fixed broken types in Kysely and Knex adapters\n"
},
{
"path": "changelogs/drizzle-orm/0.23.5.md",
"chars": 27,
"preview": "- 🐛 Various minor bugfixes\n"
},
{
"path": "changelogs/drizzle-orm/0.23.6.md",
"chars": 357,
"preview": "- 🐛 Fixed referencing the selected aliased field in the same query\n- 🐛 Fixed decimal column data type in MySQL\n- 🐛 Fixed"
},
{
"path": "changelogs/drizzle-orm/0.23.7.md",
"chars": 51,
"preview": "- 🎉 Added `INSERT IGNORE` support for MySQL (#305)\n"
},
{
"path": "changelogs/drizzle-orm/0.23.8.md",
"chars": 113,
"preview": "- 🎉 Fixed dates timezone differences for timestamps in Postgres and MySQL (contributed by @AppelBoomHD via #288)\n"
},
{
"path": "changelogs/drizzle-orm/0.23.9.md",
"chars": 593,
"preview": "# Transactions support 🎉\n\nYou can now use transactions with all the supported databases and drivers.\n\n`node-postgres` ex"
},
{
"path": "changelogs/drizzle-orm/0.24.0.md",
"chars": 124,
"preview": "- 🎉 Added iterator support to `mysql2` (sponsored by @rizen ❤)\n- ❗ `.prepare()` in MySQL no longer requires a name argum"
},
{
"path": "changelogs/drizzle-orm/0.24.1.md",
"chars": 314,
"preview": "### Bugs\n\n🐛 Fix onConflict targets in [#475](https://github.com/drizzle-team/drizzle-orm/pull/475) - thanks @wkunert ❤️\n"
},
{
"path": "changelogs/drizzle-orm/0.24.2.md",
"chars": 110,
"preview": "- 🐛 Pool connections opened for transactions are now closed after the transaction is committed or rolled back\n"
},
{
"path": "changelogs/drizzle-orm/0.24.3.md",
"chars": 53,
"preview": "- 🐛 Fixed query generation when selecting from alias\n"
},
{
"path": "changelogs/drizzle-orm/0.24.4.md",
"chars": 226,
"preview": "- 🐛 Added verbose error when .values() is called without values (#441)\n- 🐛 Fixed nested PG arrays mapping (#460)\n- ❗ Rem"
},
{
"path": "changelogs/drizzle-orm/0.24.5.md",
"chars": 328,
"preview": "- Add possibility to have placeholders in `.limit()` and `.offset()`\n\n```ts\nconst stmt = db\n .select({\n id: usersTab"
},
{
"path": "changelogs/drizzle-orm/0.25.0.md",
"chars": 317,
"preview": "# ESM support\n\n- 🎉 Added ESM support! You can now use `drizzle-orm` in both ESM and CJS environments.\n- 🎉 Added code min"
},
{
"path": "changelogs/drizzle-orm/0.25.1.md",
"chars": 37,
"preview": "- 🐛 Fix package.json `exports` field\n"
},
{
"path": "changelogs/drizzle-orm/0.25.2.md",
"chars": 148,
"preview": "- 🎉 Documentation improvements (#495, #507)\n- 🎉 Added `\"sideEffects\": false` to package.json (#515)\n- 🐛 Fixed AWS Data A"
},
{
"path": "changelogs/drizzle-orm/0.25.3.md",
"chars": 121,
"preview": "- 🐛 Fix `pg` imports in ESM mode (#505)\n- 🐛 Add \"types\" and \"default\" fields to \"exports\" entries in package.json (#511)"
},
{
"path": "changelogs/drizzle-orm/0.25.4.md",
"chars": 257,
"preview": "- 🎉 Added support for [Vercel Postgres](https://vercel.com/docs/storage/vercel-postgres/quickstart)\n\n```typescript\nimpor"
},
{
"path": "changelogs/drizzle-orm/0.26.0.md",
"chars": 5861,
"preview": "# Drizzle ORM 0.26.0 is here 🎉\n\n## README docs are fully tranferred to web\n\nThe documentation has been completely rework"
},
{
"path": "changelogs/drizzle-orm/0.26.1.md",
"chars": 180,
"preview": "- 🐛 Fixed including multiple relations on the same level in RQB (#599)\n- 🐛 Updated migrators for relational queries supp"
},
{
"path": "changelogs/drizzle-orm/0.26.2.md",
"chars": 360,
"preview": "- 🐛 Fixed upsert targeting composite keys for SQLite (#521)\n- 🐛 AWS Data API+Postgres: fixed adding of typings when merg"
},
{
"path": "changelogs/drizzle-orm/0.26.3.md",
"chars": 62,
"preview": "- Disabled OTEL integration due to the top-level await issues\n"
},
{
"path": "changelogs/drizzle-orm/0.26.4.md",
"chars": 167,
"preview": "- 🐛 Fixed AWS Data API mapping in relational queries (#677, #681)\n- 🐛 Allowed using named self-relations (#678)\n- 🐛 Fixe"
},
{
"path": "changelogs/drizzle-orm/0.26.5.md",
"chars": 39,
"preview": "- 🎉 Added bigint mode to SQLite (#558)\n"
},
{
"path": "changelogs/drizzle-orm/0.27.0.md",
"chars": 1782,
"preview": "## Correct behavior when installed in a monorepo (multiple Drizzle instances)\n\nReplacing all `instanceof` statements wit"
},
{
"path": "changelogs/drizzle-orm/0.27.1.md",
"chars": 358,
"preview": "- 🎉 Added support for [Neon HTTP driver](https://neon.tech/docs/serverless/serverless-driver)\n\n```typescript\nimport { ne"
},
{
"path": "changelogs/drizzle-orm/0.27.2.md",
"chars": 2661,
"preview": "## 🎉 Added support for `UNIQUE` constraints in PostgreSQL, MySQL, SQLite\n\nFor PostgreSQL, unique constraints can be defi"
},
{
"path": "changelogs/drizzle-orm/0.28.0.md",
"chars": 7080,
"preview": "## Breaking changes\n\n### Removed support for filtering by nested relations\n\nCurrent example won't work in `0.28.0`:\n\n```"
},
{
"path": "changelogs/drizzle-orm/0.28.1.md",
"chars": 74,
"preview": "- 🐛 Fixed Postgres array-related issues introduced by 0.28.0 (#983, #992)\n"
},
{
"path": "changelogs/drizzle-orm/0.28.2.md",
"chars": 802,
"preview": "## The community contributions release 🎉\n\n### Internal Features and Changes\n1. Added a set of tests for d1. Thanks to @A"
},
{
"path": "changelogs/drizzle-orm/0.28.3.md",
"chars": 1573,
"preview": "- 🎉 Added SQLite simplified query API\n\n- 🎉 Added `.$defaultFn()` / `.$default()` methods to column builders\n\nYou can spe"
},
{
"path": "changelogs/drizzle-orm/0.28.4.md",
"chars": 107,
"preview": "- 🐛 Fixed imports in ESM-based projects (#1088)\n- 🐛 Fixed type error on Postgres table definitions (#1089)\n"
},
{
"path": "changelogs/drizzle-orm/0.28.5.md",
"chars": 74,
"preview": "- 🐛 Fixed incorrect OpenTelemetry type import that caused a runtime error\n"
},
{
"path": "changelogs/drizzle-orm/0.28.6.md",
"chars": 3968,
"preview": "## Changes\n\n> **Note**:\n> MySQL `datetime` with `mode: 'date'` will now store dates in UTC strings and retrieve data in "
},
{
"path": "changelogs/drizzle-orm/0.29.0.md",
"chars": 11581,
"preview": "> Drizzle ORM version `0.29.0` will require a minimum Drizzle Kit version of `0.20.0`, and vice versa. Therefore, when u"
},
{
"path": "changelogs/drizzle-orm/0.29.1.md",
"chars": 7399,
"preview": "# Fixes\n\n- Forward args correctly when using withReplica feature #1536. Thanks @Angelelz\n- Fix selectDistinctOn not work"
},
{
"path": "changelogs/drizzle-orm/0.29.2.md",
"chars": 3133,
"preview": "## Fixes\n\n- Added improvements to the planescale relational tests #1579 - thanks @Angelelz\n- [Pg] FIX: correct string es"
},
{
"path": "changelogs/drizzle-orm/0.29.3.md",
"chars": 50,
"preview": "- fix: make expo peer dependencies optional #1714\n"
},
{
"path": "changelogs/drizzle-orm/0.29.4.md",
"chars": 2481,
"preview": "## New Features\n\n### 🎉 **Neon HTTP Batch**\n\nFor more info you can check [Neon docs](https://neon.tech/docs/serverless/se"
},
{
"path": "changelogs/drizzle-orm/0.29.5.md",
"chars": 3232,
"preview": "## New Features\n\n### 🎉 WITH UPDATE, WITH DELETE, WITH INSERT - thanks @L-Mario564\n\nYou can now use `WITH` statements wit"
},
{
"path": "changelogs/drizzle-orm/0.30.0.md",
"chars": 2704,
"preview": "## Breaking Changes\n\nThe Postgres timestamp mapping has been changed to align all drivers with the same behavior.\n\n❗ We'"
},
{
"path": "changelogs/drizzle-orm/0.30.1.md",
"chars": 462,
"preview": "## New Features\n\n### 🎉 OP-SQLite driver Support\n\nUsage Example\n\n```ts\nimport { open } from '@op-engineering/op-sqlite';\n"
},
{
"path": "changelogs/drizzle-orm/0.30.10.md",
"chars": 392,
"preview": "## New Features\n\n### 🎉 `.if()` function added to all WHERE expressions\n\n#### Select all users after cursors if a cursor "
},
{
"path": "changelogs/drizzle-orm/0.30.2.md",
"chars": 564,
"preview": "## Improvements\n\nLibSQL migrations have been updated to utilize batch execution instead of transactions. As stated in th"
},
{
"path": "changelogs/drizzle-orm/0.30.3.md",
"chars": 224,
"preview": "- 🎉 Added raw query support (`db.execute(...)`) to batch API in Neon HTTP driver\n- 🐛 Fixed `@neondatabase/serverless` HT"
},
{
"path": "changelogs/drizzle-orm/0.30.4.md",
"chars": 1051,
"preview": "## New Features\n\n### 🎉 xata-http driver support\n\nAccording their **[official website](https://xata.io)**, Xata is a Post"
},
{
"path": "changelogs/drizzle-orm/0.30.5.md",
"chars": 1089,
"preview": "## New Features\n\n### 🎉 `$onUpdate` functionality for PostgreSQL, MySQL and SQLite\n\nAdds a dynamic update value to the co"
},
{
"path": "changelogs/drizzle-orm/0.30.6.md",
"chars": 1034,
"preview": "## New Features\n\n### 🎉 PGlite driver Support\n\nPGlite is a WASM Postgres build packaged into a TypeScript client library "
},
{
"path": "changelogs/drizzle-orm/0.30.7-preview.md",
"chars": 538,
"preview": "- 🎉 Added custom schema support to enums in Postgres:\n ```ts\n import { pgSchema } from 'drizzle-orm/pg-core';\n\n const"
},
{
"path": "changelogs/drizzle-orm/0.30.7.md",
"chars": 109,
"preview": "## Bug fixes\n\n- Add mappings for `@vercel/postgres` package\n- Fix interval mapping for `neon` drivers - #1542"
},
{
"path": "changelogs/drizzle-orm/0.30.8.md",
"chars": 876,
"preview": "- 🎉 Added custom schema support to enums in Postgres (fixes #669 via #2048):\n\n ```ts\n import { pgSchema } from 'drizzl"
},
{
"path": "changelogs/drizzle-orm/0.30.9.md",
"chars": 228,
"preview": "- 🐛 Fixed migrator in AWS Data API\n- Added `setWhere` and `targetWhere` fields to `.onConflictDoUpdate()` config in SQLi"
},
{
"path": "changelogs/drizzle-orm/0.31.0-beta.md",
"chars": 5521,
"preview": "## Breaking changes\n\n### PostgreSQL indexes API was changed\n\nThe previous Drizzle+PostgreSQL indexes API was incorrect a"
},
{
"path": "changelogs/drizzle-orm/0.31.0.md",
"chars": 12416,
"preview": "## Breaking changes\n\n> Note: `drizzle-orm@0.31.0` can be used with `drizzle-kit@0.22.0` or higher. The same applies to D"
},
{
"path": "changelogs/drizzle-orm/0.31.1.md",
"chars": 1338,
"preview": "# New Features\n\n## Live Queries 🎉\n\nAs of `v0.31.1` Drizzle ORM now has native support for Expo SQLite Live Queries!\nWe'v"
},
{
"path": "changelogs/drizzle-orm/0.31.2.md",
"chars": 279,
"preview": "- 🎉 Added support for TiDB Cloud Serverless driver:\n\n ```ts\n import { connect } from '@tidbcloud/serverless';\n import"
},
{
"path": "changelogs/drizzle-orm/0.31.3.md",
"chars": 514,
"preview": "### Bug fixed\n\n- 🛠️ Fixed RQB behavior for tables with same names in different schemas\n- 🛠️ Fixed [BUG]: Mismatched type"
},
{
"path": "changelogs/drizzle-orm/0.31.4.md",
"chars": 58,
"preview": "- Mark prisma clients package as optional - thanks @Cherry"
},
{
"path": "changelogs/drizzle-orm/0.32.0-beta.md",
"chars": 7279,
"preview": "# Preview release for `drizzle-orm@0.32.0` and `drizzle-kit@0.23.0`\n\n> It's not mandatory to upgrade both packages, but "
},
{
"path": "changelogs/drizzle-orm/0.32.0.md",
"chars": 8786,
"preview": "# Release notes for `drizzle-orm@0.32.0` and `drizzle-kit@0.23.0`\n\n> It's not mandatory to upgrade both packages, but if"
},
{
"path": "changelogs/drizzle-orm/0.32.1.md",
"chars": 498,
"preview": "- Fix typings for indexes and allow creating indexes on 3+ columns mixing columns and expressions - thanks @lbguilherme!"
},
{
"path": "changelogs/drizzle-orm/0.32.2.md",
"chars": 329,
"preview": "- Fix AWS Data API type hints bugs in RQB\n- Fix set transactions in MySQL bug - thanks @roguesherlock\n- Add forwaring de"
},
{
"path": "changelogs/drizzle-orm/0.33.0.md",
"chars": 2771,
"preview": "## Breaking changes (for some of postgres.js users)\n\n#### Bugs fixed for this breaking change\n\n- [Open\n[BUG]: jsonb alwa"
},
{
"path": "changelogs/drizzle-orm/0.34.0.md",
"chars": 12475,
"preview": "## Breaking changes and migrate guide for Turso users\n\nIf you are using Turso and libsql, you will need to upgrade your "
},
{
"path": "changelogs/drizzle-orm/0.34.1.md",
"chars": 64,
"preview": "- Fixed dynamic imports for CJS and MJS in the `/connect` module"
},
{
"path": "changelogs/drizzle-orm/0.35.0.md",
"chars": 2574,
"preview": "# Important change after 0.34.0 release\n\n## Updated the init Drizzle database API\n\nThe API from version 0.34.0 turned ou"
},
{
"path": "changelogs/drizzle-orm/0.35.1.md",
"chars": 202,
"preview": "- Updated internal versions for the drizzle-kit and drizzle-orm packages. Changes were introduced in the last minor rele"
},
{
"path": "changelogs/drizzle-orm/0.35.2.md",
"chars": 623,
"preview": "- Fix issues with importing in several environments after updating the Drizzle driver implementation\n\nWe've added approx"
},
{
"path": "changelogs/drizzle-orm/0.35.3.md",
"chars": 2021,
"preview": "# New LibSQL driver modules\n\nDrizzle now has native support for all `@libsql/client` driver variations:\n\n1. `@libsql/cli"
},
{
"path": "changelogs/drizzle-orm/0.36.0.md",
"chars": 11729,
"preview": "> This version of `drizzle-orm` requires `drizzle-kit@0.27.0` to enable all new features\n\n# New Features\n\n## Row-Level S"
},
{
"path": "changelogs/drizzle-orm/0.36.1.md",
"chars": 781,
"preview": "# Bug Fixes\n\n- [[BUG]: Using sql.placeholder with limit and/or offset for a prepared statement produces TS error](https:"
},
{
"path": "changelogs/drizzle-orm/0.36.2.md",
"chars": 897,
"preview": "# New Features\n\n- [Support more types in like, notLike, ilike and notIlike expressions](https://github.com/drizzle-team/"
},
{
"path": "changelogs/drizzle-orm/0.36.3.md",
"chars": 4612,
"preview": "# New Features\n\n## Support for `UPDATE ... FROM` in PostgreSQL and SQLite\n\nAs the SQLite documentation mentions:\n\n> [!NO"
},
{
"path": "changelogs/drizzle-orm/0.36.4.md",
"chars": 2705,
"preview": "# New Package: `drizzle-seed`\n\n> [!NOTE]\n> `drizzle-seed` can only be used with `drizzle-orm@0.36.4` or higher. Versions"
},
{
"path": "changelogs/drizzle-orm/0.37.0.md",
"chars": 3212,
"preview": "# New Dialects\n\n### 🎉 `SingleStore` dialect is now available in Drizzle\n\nThanks to the SingleStore team for creating a P"
},
{
"path": "changelogs/drizzle-orm/0.38.0.md",
"chars": 6055,
"preview": "# Types breaking changes\n\nA few internal types were changed and extra generic types for length of column types were adde"
},
{
"path": "changelogs/drizzle-orm/0.38.1.md",
"chars": 145,
"preview": "- Closed [[FEATURE]: Add more flexible typing for usage with exactOptionalPropertyTypes](https://github.com/drizzle-team"
},
{
"path": "changelogs/drizzle-orm/0.38.2.md",
"chars": 2143,
"preview": "# New features\n\n## `USE INDEX`, `FORCE INDEX` and `IGNORE INDEX` for MySQL\n\nIn MySQL, the statements USE INDEX, FORCE IN"
},
{
"path": "changelogs/drizzle-orm/0.38.3.md",
"chars": 60,
"preview": "- Fix incorrect deprecation detection for table declarations"
},
{
"path": "changelogs/drizzle-orm/0.38.4.md",
"chars": 214,
"preview": "- New SingleStore type `vector` - thanks @mitchwadair\n- Fix wrong DROP INDEX statement generation, [#3866](https://githu"
},
{
"path": "changelogs/drizzle-orm/0.39.0.md",
"chars": 5065,
"preview": "# New features\n\n## Bun SQL driver support\nYou can now use the new Bun SQL driver released in Bun v1.2.0 with Drizzle\n\n``"
},
{
"path": "changelogs/drizzle-orm/0.39.1.md",
"chars": 251,
"preview": "- Fixed SQLite onConflict clauses being overwritten instead of stacked - [#2276](https://github.com/drizzle-team/drizzle"
},
{
"path": "changelogs/drizzle-orm/0.39.2.md",
"chars": 153,
"preview": "- To be compatible with latest Neon Auth feature we renamed the pre-defined schema internally, from `neon_identity` to `"
},
{
"path": "changelogs/drizzle-orm/0.39.3.md",
"chars": 39,
"preview": "- Remove `react` from peerDependencies\n"
},
{
"path": "changelogs/drizzle-orm/0.40.0.md",
"chars": 1990,
"preview": "# New Features \n\n## Added `Gel` dialect support and `gel-js` client support\n\nDrizzle is getting a new `Gel` dialect with"
},
{
"path": "changelogs/drizzle-orm/0.40.1.md",
"chars": 190,
"preview": "#### Updates to `neon-http` for `@neondatabase/serverless@1.0.0` - thanks @jawj\n\nStarting from this version, drizzle-orm"
},
{
"path": "changelogs/drizzle-orm/0.41.0.md",
"chars": 1311,
"preview": "- `bigint`, `number` modes for `SQLite`, `MySQL`, `PostgreSQL`, `SingleStore` `decimal` & `numeric` column types \n- Cha"
},
{
"path": "changelogs/drizzle-orm/0.42.0.md",
"chars": 2041,
"preview": "## Features\n\n### Duplicate imports removal\n\nWhen importing from `drizzle-orm` using custom loaders, you may encounter is"
},
{
"path": "changelogs/drizzle-orm/0.43.0.md",
"chars": 1160,
"preview": "## Features\n\n- Added `cross join` \\([#1414](https://github.com/drizzle-team/drizzle-orm/issues/1414)\\)\n- Added lateral `"
},
{
"path": "changelogs/drizzle-orm/0.43.1.md",
"chars": 122,
"preview": "## Fixes\n\n- [Fixed incorrect types of schema enums in PostgreSQL](https://github.com/drizzle-team/drizzle-orm/issues/442"
},
{
"path": "changelogs/drizzle-orm/0.44.0.md",
"chars": 4164,
"preview": "## Error handling\n\nStarting from this version, we’ve introduced a new `DrizzleQueryError` that wraps all errors from dat"
},
{
"path": "changelogs/drizzle-orm/0.44.1.md",
"chars": 112,
"preview": "- [[BUG]: Drizzle can no longer run on Durable Objects](https://github.com/drizzle-team/drizzle-orm/issues/4586)"
},
{
"path": "changelogs/drizzle-orm/0.44.2.md",
"chars": 207,
"preview": "- [BUG]: Fixed type issues with joins with certain variations of `tsconfig`: [#4535](https://github.com/drizzle-team/dri"
},
{
"path": "changelogs/drizzle-orm/0.44.3.md",
"chars": 181,
"preview": "- Fixed types of `$client` for clients created by drizzle function\n\n```ts\nawait db.$client.[...]\n```\n\n- Added the `updat"
},
{
"path": "changelogs/drizzle-orm/0.44.4.md",
"chars": 57,
"preview": "- Fix wrong DrizzleQueryError export. thanks @nathankleyn"
},
{
"path": "changelogs/drizzle-orm/0.44.5.md",
"chars": 209,
"preview": "- Fixed invalid usage of `.one()` in `durable-sqlite` session\n- Fixed spread operator related crash in sqlite `blob` col"
},
{
"path": "changelogs/drizzle-orm/0.44.6.md",
"chars": 38,
"preview": "- feat: add $replicas reference #4874\n"
},
{
"path": "changelogs/drizzle-orm/0.44.7.md",
"chars": 71,
"preview": "- fix durable sqlite transaction return value #3746 - thanks @joaocstro"
},
{
"path": "changelogs/drizzle-orm/0.45.0.md",
"chars": 592,
"preview": "- Fixed pg-native Pool detection in node-postgres transactions \n- Allowed subqueries in select fields \n- Updated typo "
},
{
"path": "changelogs/drizzle-orm/0.45.1.md",
"chars": 183,
"preview": "- Fixed pg-native Pool detection in node-postgres transactions breaking in environments with forbidden `require()` ([#51"
},
{
"path": "changelogs/drizzle-orm-mysql/0.14.1.md",
"chars": 116,
"preview": "# drizzle-orm-mysql 0.14.1\n\n- Release support for mysql. Currently mysql module is up-to-date with `pg` and `sqlite`"
},
{
"path": "changelogs/drizzle-orm-mysql/0.14.2.md",
"chars": 57,
"preview": "# drizzle-orm-mysql 0.14.2\n\n- Bumped everything to 0.14.2"
},
{
"path": "changelogs/drizzle-orm-mysql/0.14.3.md",
"chars": 64,
"preview": "# drizzle-orm-mysql 0.14.3\n\n- Fill author field in package.json\n"
},
{
"path": "changelogs/drizzle-orm-mysql/0.15.0.md",
"chars": 57,
"preview": "# drizzle-orm-mysql 0.15.0\n\n- Bumped everything to 0.15.0"
},
{
"path": "changelogs/drizzle-orm-mysql/0.15.1.md",
"chars": 2716,
"preview": "# drizzle-orm-mysql 0.15.1\n\nAdd support for schemas -> [MySQL schemas](https://dev.mysql.com/doc/refman/8.0/en/create-da"
},
{
"path": "changelogs/drizzle-orm-mysql/0.15.2.md",
"chars": 45,
"preview": "# drizzle-orm-mysql 0.15.2\n\nInternal release\n"
}
]
// ... and 1173 more files (download for full content)
About this extraction
This page contains the full source code of the drizzle-team/drizzle-orm GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1373 files (10.4 MB), approximately 2.8M tokens, and a symbol index with 5785 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.