Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
d99438a
[WIP] Codecs for `postgres`
Sukairo-02 Feb 14, 2026
d397311
Codec fixes, codecs for `PgLite`
Sukairo-02 Feb 16, 2026
f12c91a
Removed unused types
Sukairo-02 Feb 16, 2026
f97ba1b
Added generic codecs to all PG drivers, added `postgres-js`, `pglite`…
Sukairo-02 Feb 17, 2026
af3261c
Codecs for `neon-http`
Sukairo-02 Feb 17, 2026
636c7a4
Added appropriate codecs to pg proxy driver in tests
Sukairo-02 Feb 17, 2026
c793d34
Code cleanup, `vercel-postgres` codecs, fixed normalize not applying …
Sukairo-02 Feb 17, 2026
3ba54a6
Unskipped test related to #3018 due to fix
Sukairo-02 Feb 17, 2026
ad3a6de
Codec fix for `neon-http` bytea
Sukairo-02 Feb 17, 2026
b168f09
Fixed missing flag, reworked PG custom columns
Sukairo-02 Feb 17, 2026
9cd6268
Simplified custom column check on rqbv2 column build, temporary disab…
Sukairo-02 Feb 18, 2026
f7cc489
[TEMP] added logs
Sukairo-02 Feb 18, 2026
2984396
Removed temporary logs, fixed test case
Sukairo-02 Feb 18, 2026
65482d4
Codecs for `neon-serverless`
Sukairo-02 Feb 18, 2026
35f3424
`effect-sql/pg` codecs
Sukairo-02 Feb 18, 2026
6a13d8a
Better codec merging, rebased generic codec around most common `node-…
Sukairo-02 Feb 18, 2026
e38c22b
Extended test postpone date
Sukairo-02 Feb 18, 2026
e3d28a5
Removed deprecated `mapFromDriverValue` overloads
Sukairo-02 Feb 19, 2026
3f81f68
Restored deleted encoder
Sukairo-02 Feb 19, 2026
ee33d92
`pglite` codecs only cast buffer data to `UInt8Array` if `Buffer` is …
Sukairo-02 Feb 20, 2026
2ac9cf5
Resolved override issues
Sukairo-02 Feb 20, 2026
24659c1
Moved column array mapper applying procedure to `.postBuild()` for pr…
Sukairo-02 Feb 20, 2026
5a4d786
Generated query mapper
Sukairo-02 Feb 23, 2026
bdde7b8
Switched non-rqb queries to JIT-generated mappers
Sukairo-02 Feb 23, 2026
77837da
Type error fix
Sukairo-02 Feb 23, 2026
e72cfab
Fixed JIT mapper result object init, extended test postpone date
Sukairo-02 Feb 24, 2026
d2e5a55
Fixed tests, repladed default pglite bigint parsers with codecs
Sukairo-02 Feb 26, 2026
334dbc7
CRDB container version fix
Sukairo-02 Feb 26, 2026
06ad389
Cast PGLite bigints to text due to inconsistent returns
Sukairo-02 Feb 26, 2026
44064f9
Opt-in for jit mappers
Sukairo-02 Mar 2, 2026
a700b64
Fixed mappers ignoring jit mapper preference
Sukairo-02 Mar 2, 2026
a262e9d
type fix
Sukairo-02 Mar 2, 2026
dd8e5d4
+
AlexBlokh Mar 2, 2026
52c9e66
Fixes, enabled RQB JIT mapper in sessions
Sukairo-02 Mar 5, 2026
fcab71e
Slight performance improvement for non-JIT RQB mapper, fixed codec us…
Sukairo-02 Mar 5, 2026
9ddd000
De-inverted useJitMapper flag handling
Sukairo-02 Mar 5, 2026
e7ac0ef
remove redundant isResponseInArray flag
AlexBlokh Mar 6, 2026
927cc24
+
AlexBlokh Mar 6, 2026
4b0aa50
+
AlexBlokh Mar 6, 2026
bfac813
added test
OleksiiKH0240 Mar 6, 2026
c64a98f
[WIP] Simplified sessions
Sukairo-02 Mar 7, 2026
96300f4
update ci+test command
AlexBlokh Mar 7, 2026
b3bbc58
Merge commit 'c64a98fd5b475818bd139a53ebf24758c1186800' into codecs
AlexBlokh Mar 7, 2026
4a0ae77
+
AlexBlokh Mar 7, 2026
3b9179a
[PG] Simplified sessions
Sukairo-02 Mar 11, 2026
4b12872
Proxy fix
Sukairo-02 Mar 11, 2026
f782634
Fixed JIT mapper flag not being passed in pg (mapper generators WIP),…
Sukairo-02 Mar 11, 2026
e8d5a2f
`neon-http` session fix
Sukairo-02 Mar 11, 2026
d39e32a
Fixed `neon-http` session, tests; fixed migrators using wrong field f…
Sukairo-02 Mar 11, 2026
ab3fb94
Fixed `neon-http` raw queries not having `.then` method, type fixes
Sukairo-02 Mar 11, 2026
4c61bab
\`aws-data-api\` driver fixes, naming fixes, mapper generators & inte…
Sukairo-02 Mar 12, 2026
3dbc8ad
Skipped unused file
Sukairo-02 Mar 12, 2026
ab10bcc
Insert codecs [to be implemented per driver]
Sukairo-02 Mar 13, 2026
c78b591
Condition fix
Sukairo-02 Mar 13, 2026
bdef7ac
Type fix
Sukairo-02 Mar 13, 2026
9fa1261
codec redesign
Sukairo-02 Mar 16, 2026
d9efe7a
Codec redesign, input codecs [WIP - tests for non-insert params pendi…
Sukairo-02 Mar 25, 2026
9829f8a
Removed `sqlTypeMeta`, hardcoded codecs type, added codec type select…
Sukairo-02 Mar 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions .github/workflows/release-feature-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ on:
required: true
SQLITE_MANY_CLOUD_CONNECTION_STRING:
required: true
TURBO_TOKEN:
required: false

concurrency:
group: feature-${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -104,7 +106,11 @@ jobs:
- shard: int:sqlite
dbs: []
- shard: int:other
dbs: [mysql, mssql, cockroach, singlestore, postgres, postgres-postgis, postgres-vector]
dbs: [mysql, postgres, postgres-postgis, postgres-vector]
- shard: int:seeder
dbs: []
- shard: int:imports
dbs: []
- shard: int:planetscale
dbs: []
- shard: int:cockroach
Expand Down Expand Up @@ -246,7 +252,7 @@ jobs:
int:singlestore-proxy) pnpm --stream vitest --reporter=verbose --silent=false run ./singlestore/singlestore-proxy.test.ts ;;
int:postgres)
if [[ -z "${SKIP_EXTERNAL_DB_TESTS:-}" ]]; then
pnpm --stream vitest --reporter=verbose --silent=false run tests/pg/
pnpm --stream test:postgres
fi
;;
int:mysql)
Expand Down Expand Up @@ -279,21 +285,10 @@ jobs:
orm|seed)
(cd ../drizzle-${{ matrix.shard }} && pnpm --stream test --reporter=verbose --silent=false)
;;

int:bun) bun test ./tests/bun/ ;;

int:other)
pnpm --stream vitest --reporter=verbose --silent=false run tests \
--exclude ./tests/gel/ \
--exclude ./tests/mysql/ \
--exclude ./tests/cockroach/ \
--exclude ./tests/singlestore/ \
--exclude ./tests/mssql/ \
--exclude ./tests/pg/ \
--exclude ./tests/sqlite/ \
--exclude ./tests/bun/ \
--exclude tests/validators
;;
int:seeder) pnpm test:seeder ;;
int:imports) pnpm test:imports ;;
int:other) pnpm test:other ;;
*) echo "Unknown shard: ${{matrix.shard}}"; exit 1 ;;
esac

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ on:
required: true
SQLITE_MANY_CLOUD_CONNECTION_STRING:
required: true
TURBO_TOKEN:
required: false

env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/router.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
LIBSQL_REMOTE_TOKEN: ${{ secrets.LIBSQL_REMOTE_TOKEN }}
SQLITE_CLOUD_CONNECTION_STRING: ${{ secrets.SQLITE_CLOUD_CONNECTION_STRING }}
SQLITE_MANY_CLOUD_CONNECTION_STRING: ${{ secrets.SQLITE_MANY_CLOUD_CONNECTION_STRING }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}

run-latest:
needs: switch
Expand All @@ -57,4 +58,5 @@ jobs:
LIBSQL_REMOTE_URL: ${{ secrets.LIBSQL_REMOTE_URL }}
LIBSQL_REMOTE_TOKEN: ${{ secrets.LIBSQL_REMOTE_TOKEN }}
SQLITE_CLOUD_CONNECTION_STRING: ${{ secrets.SQLITE_CLOUD_CONNECTION_STRING }}
SQLITE_MANY_CLOUD_CONNECTION_STRING: ${{ secrets.SQLITE_MANY_CLOUD_CONNECTION_STRING }}
SQLITE_MANY_CLOUD_CONNECTION_STRING: ${{ secrets.SQLITE_MANY_CLOUD_CONNECTION_STRING }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
6 changes: 3 additions & 3 deletions compose/cockroach-many.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
cockroach0:
image: cockroachdb/cockroach:latest
image: cockroachdb/cockroach:latest-v25.2
command: start-single-node --insecure --store=type=mem,size=2GiB
ports:
- "26260:26257"
Expand All @@ -12,7 +12,7 @@ services:
retries: 60

cockroach1:
image: cockroachdb/cockroach:latest
image: cockroachdb/cockroach:latest-v25.2
command: start-single-node --insecure --store=type=mem,size=2GiB
ports:
- "26261:26257"
Expand All @@ -24,7 +24,7 @@ services:
retries: 60

cockroach2:
image: cockroachdb/cockroach:latest
image: cockroachdb/cockroach:latest-v25.2
command: start-single-node --insecure --store=type=mem,size=2GiB
ports:
- "26262:26257"
Expand Down
2 changes: 1 addition & 1 deletion compose/cockroach.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
cockroach:
image: cockroachdb/cockroach:latest
image: cockroachdb/cockroach:latest-v25.2
command: start-single-node --insecure --store=type=mem,size=2GiB
ports:
- "26257:26257"
Expand Down
33 changes: 16 additions & 17 deletions drizzle-kit/src/cli/connections.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { PGlite } from '@electric-sql/pglite';
import type { SQLiteCloudRowset } from '@sqlitecloud/drivers';
import type { AwsDataApiPgQueryResult, AwsDataApiSessionOptions } from 'drizzle-orm/aws-data-api/pg';
import type { AwsDataApiSessionOptions } from 'drizzle-orm/aws-data-api/pg';
import type { MigrationConfig, MigratorInitFailResponse } from 'drizzle-orm/migrator';
import type { PreparedQueryConfig } from 'drizzle-orm/pg-core';
import type { config } from 'mssql';
Expand Down Expand Up @@ -91,38 +91,37 @@ export const preparePostgresDB = async (
return migrate(db, config);
};

const query = async (sql: string, params: any[]) => {
const prepared = session.prepareQuery(
const query = async (sql: string, params: any[]): Promise<any[]> => {
const prepared = session.prepareQuery<
PreparedQueryConfig & {
execute: any[];
}
>(
{ sql, params: params ?? [] },
undefined,
undefined,
'objects',
false,
undefined,
);
const result = await prepared.all();
return result as any[];

return prepared.execute();
};
const proxy = async (params: ProxyParams) => {
const prepared = session.prepareQuery<
PreparedQueryConfig & {
execute: AwsDataApiPgQueryResult<unknown>;
values: AwsDataApiPgQueryResult<unknown[]>;
execute: unknown[];
}
>(
{
sql: params.sql,
params: params.params ?? [],
typings: params.typings,
},
params.mode === 'array' ? 'arrays' : 'objects',
false,
undefined,
undefined,
params.mode === 'array',
);
if (params.mode === 'array') {
const result = await prepared.values();
return result.rows;
}
const result = await prepared.execute();
return result.rows;

return prepared.execute();
};
const transactionProxy: TransactionProxy = async (_queries) => {
throw new Error('Transaction not supported');
Expand Down
6 changes: 3 additions & 3 deletions drizzle-kit/tests/mysql/commutativity.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ describe('conflict rule coverage (statement pairs)', () => {
expect(conflicts).not.toBeUndefined();
});

test.skipIf(Date.now() < +new Date('2026-02-11'))('fk: recreate vs drop', async () => {
test.skipIf(Date.now() < +new Date('2026-03-29'))('fk: recreate vs drop', async () => {
const p = mysqlTable('p', (t) => ({
id: t.int().primaryKey(),
}));
Expand Down Expand Up @@ -181,7 +181,7 @@ describe('conflict rule coverage (statement pairs)', () => {
expect(conflicts).not.toBeUndefined();
});

test.skipIf(Date.now() < +new Date('2026-02-10'))('check: alter vs drop', async () => {
test.skipIf(Date.now() < +new Date('2026-03-29'))('check: alter vs drop', async () => {
const parent = {
t: mysqlTable('t', (t) => ({
c: t.int(),
Expand Down Expand Up @@ -209,7 +209,7 @@ describe('conflict rule coverage (statement pairs)', () => {
expect(conflicts).not.toBeUndefined();
});

test.skipIf(Date.now() < +new Date('2026-02-10'))(
test.skipIf(Date.now() < +new Date('2026-03-29'))(
'explainConflicts returns reason for table drop vs column alter',
async () => {
const parent = {
Expand Down
6 changes: 3 additions & 3 deletions drizzle-kit/tests/mysql/commutativity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function mkTmp(): { tmp: string; fs: any; path: any; os: any } {
}

describe('commutativity integration (mysql)', () => {
test.skipIf(Date.now() < +new Date('2026-02-10'))(
test.skipIf(Date.now() < +new Date('2026-03-29'))(
'Parent not empty: detects conflict when first migration of branch A has a conflict with the last migration of branch B',
async () => {
const parentDDL = createDDL();
Expand Down Expand Up @@ -300,7 +300,7 @@ describe('commutativity integration (mysql)', () => {
expect(report.conflicts[0].parentId).toBe('p1');
});

test.skipIf(Date.now() < +new Date('2026-02-10'))(
test.skipIf(Date.now() < +new Date('2026-03-29'))(
'detects conflict when drop table in one branch and add column in other',
async () => {
const parentDDL = createDDL();
Expand Down Expand Up @@ -732,7 +732,7 @@ describe('commutativity integration (mysql)', () => {
expect(report.conflicts.length).toBeGreaterThanOrEqual(0);
});

test.skipIf(Date.now() < +new Date('2026-02-10'))('complex mixed: multiple tables and views diverging', async () => {
test.skipIf(Date.now() < +new Date('2026-03-29'))('complex mixed: multiple tables and views diverging', async () => {
const { tmp } = mkTmp();
const files: string[] = [];

Expand Down
2 changes: 1 addition & 1 deletion drizzle-kit/tests/postgres/pg-columns.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ test('alter text type to enum type', async () => {

// https://github.com/drizzle-team/drizzle-orm/issues/3589
// After discussion it was decided to postpone this feature
test.skipIf(Date.now() < +new Date('2026-02-10'))('alter integer type to text type with fk constraints', async () => {
test.skipIf(Date.now() < +new Date('2026-03-29'))('alter integer type to text type with fk constraints', async () => {
const users1 = pgTable('users', {
id: serial().primaryKey(),
});
Expand Down
2 changes: 1 addition & 1 deletion drizzle-kit/tests/postgres/pg-enums.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2460,7 +2460,7 @@ test('drop enum', async () => {

// https://github.com/drizzle-team/drizzle-orm/issues/4982
// enhancement
test.skipIf(Date.now() < +new Date('2026-02-10'))(
test.skipIf(Date.now() < +new Date('2026-03-29'))(
'alter enum values; enum value is column default; table with data',
async () => {
enum AppStatus1 {
Expand Down
2 changes: 1 addition & 1 deletion drizzle-kit/tests/postgres/pg-tables.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ test('push with pscale_extensions schema', async () => {
});

// https://github.com/drizzle-team/drizzle-orm/issues/5329
test.skipIf(Date.now() < +new Date('2026-02-10'))(
test.skipIf(Date.now() < +new Date('2026-03-29'))(
'push empty schema with `schemaFilter` set to `["public"]`',
async () => {
await db.query(`CREATE SCHEMA "cron";`);
Expand Down
4 changes: 2 additions & 2 deletions drizzle-kit/tests/postgres/pg-views.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,7 @@ test('.as in view select', async () => {

// https://github.com/drizzle-team/drizzle-orm/issues/4181
// casing bug
test.skipIf(Date.now() < +new Date('2026-02-10'))('create view with snake_case', async () => {
test.skipIf(Date.now() < +new Date('2026-03-29'))('create view with snake_case', async () => {
const test = pgTable('test', {
testId: serial().primaryKey(),
testName: text().notNull(),
Expand Down Expand Up @@ -2142,7 +2142,7 @@ test.skipIf(Date.now() < +new Date('2026-02-10'))('create view with snake_case',

// https://github.com/drizzle-team/drizzle-orm/issues/4181
// casing bug
test.skipIf(Date.now() < +new Date('2026-02-10'))('create view with camelCase', async () => {
test.skipIf(Date.now() < +new Date('2026-03-29'))('create view with camelCase', async () => {
const test = pgTable('test', {
test_id: serial().primaryKey(),
test_name: text().notNull(),
Expand Down
6 changes: 3 additions & 3 deletions drizzle-kit/tests/postgres/pull.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ test('introspect view #3', async () => {
// https://github.com/drizzle-team/drizzle-orm/issues/4262
// postopone
// Need to write discussion/guide on this and add ts comment in typescript file
test.skipIf(Date.now() < +new Date('2026-02-10'))('introspect view #4', async () => {
test.skipIf(Date.now() < +new Date('2026-03-29'))('introspect view #4', async () => {
const table = pgTable('table', {
column1: text().notNull(),
column2: text(),
Expand All @@ -742,7 +742,7 @@ test.skipIf(Date.now() < +new Date('2026-02-10'))('introspect view #4', async ()
// https://github.com/drizzle-team/drizzle-orm/issues/4262
// postopone
// Need to write discussion/guide on this and add ts comment in typescript file
test.skipIf(Date.now() < +new Date('2026-02-10'))('introspect view #5', async () => {
test.skipIf(Date.now() < +new Date('2026-03-29'))('introspect view #5', async () => {
const applications = pgTable('applications', {
applicationId: serial('application_id').primaryKey(),
studentId: integer('student_id').references(() => students.studentId),
Expand Down Expand Up @@ -1423,7 +1423,7 @@ test('introspect view with table filter', async () => {
// this does not look like a bug
// sequences are separete entities
// entity filter for sequences ??
test.skipIf(Date.now() < +new Date('2026-02-10'))('introspect sequences with table filter', async () => {
test.skipIf(Date.now() < +new Date('2026-03-29'))('introspect sequences with table filter', async () => {
// can filter sequences with select pg_get_serial_sequence('"schema_name"."table_name"', 'column_name')

// const seq1 = pgSequence('seq1');
Expand Down
4 changes: 4 additions & 0 deletions drizzle-orm/src/aws-data-api/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ export function toValueParam(value: any, typings?: QueryTypingsValue): { value:
} else if (value instanceof Date) { // oxlint-disable-line drizzle-internal/no-instanceof
// TODO: check if this clause is needed? Seems like date value always comes as string
response.value = { stringValue: value.toISOString().replace('T', ' ').replace('Z', '') };
} else if (typeof value === 'bigint') {
response.value = { stringValue: value.toString() };
} else if ((typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) || value instanceof Uint8Array) { // oxlint-disable-line drizzle-internal/no-instanceof
response.value = { blobValue: value };
} else {
throw new Error(`Unknown type for ${value}`);
}
Expand Down
Loading
Loading