@zenstackhq/orm 3.0.0-beta.23 → 3.0.0-beta.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/dialects/postgres.ts
21
+ var postgres_exports = {};
22
+ __export(postgres_exports, {
23
+ PostgresDialect: () => import_kysely.PostgresDialect
24
+ });
25
+ module.exports = __toCommonJS(postgres_exports);
26
+ var import_kysely = require("kysely");
27
+ // Annotate the CommonJS export names for ESM import in node:
28
+ 0 && (module.exports = {
29
+ PostgresDialect
30
+ });
31
+ //# sourceMappingURL=postgres.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/dialects/postgres.ts"],"sourcesContent":["export { PostgresDialect, type PostgresDialectConfig } from 'kysely';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;oBAA4D;","names":[]}
@@ -0,0 +1 @@
1
+ export { PostgresDialect, PostgresDialectConfig } from 'kysely';
@@ -0,0 +1 @@
1
+ export { PostgresDialect, PostgresDialectConfig } from 'kysely';
@@ -0,0 +1,6 @@
1
+ // src/dialects/postgres.ts
2
+ import { PostgresDialect } from "kysely";
3
+ export {
4
+ PostgresDialect
5
+ };
6
+ //# sourceMappingURL=postgres.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/dialects/postgres.ts"],"sourcesContent":["export { PostgresDialect, type PostgresDialectConfig } from 'kysely';\n"],"mappings":";AAAA,SAASA,uBAAmD;","names":["PostgresDialect"]}
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/dialects/sql.js/index.ts
22
+ var sql_exports = {};
23
+ __export(sql_exports, {
24
+ SqlJsDialect: () => SqlJsDialect
25
+ });
26
+ module.exports = __toCommonJS(sql_exports);
27
+
28
+ // src/dialects/sql.js/dialect.ts
29
+ var import_kysely2 = require("kysely");
30
+
31
+ // src/dialects/sql.js/driver.ts
32
+ var import_kysely = require("kysely");
33
+
34
+ // src/dialects/sql.js/connection.ts
35
+ var SqlJsConnection = class {
36
+ static {
37
+ __name(this, "SqlJsConnection");
38
+ }
39
+ database;
40
+ constructor(database) {
41
+ this.database = database;
42
+ }
43
+ async executeQuery(compiledQuery) {
44
+ const executeResult = this.database.exec(compiledQuery.sql, compiledQuery.parameters);
45
+ const rowsModified = this.database.getRowsModified();
46
+ return {
47
+ numAffectedRows: BigInt(rowsModified),
48
+ rows: executeResult.map(({ columns, values }) => values.map((row) => columns.reduce((acc, column, i) => ({
49
+ ...acc,
50
+ [column]: row[i]
51
+ }), {}))).flat()
52
+ };
53
+ }
54
+ // eslint-disable-next-line require-yield
55
+ async *streamQuery() {
56
+ throw new Error("Not supported with SQLite");
57
+ }
58
+ };
59
+
60
+ // src/dialects/sql.js/driver.ts
61
+ var SqlJsDriver = class {
62
+ static {
63
+ __name(this, "SqlJsDriver");
64
+ }
65
+ config;
66
+ constructor(config) {
67
+ this.config = config;
68
+ }
69
+ async acquireConnection() {
70
+ return new SqlJsConnection(this.config.sqlJs);
71
+ }
72
+ async beginTransaction(connection) {
73
+ await connection.executeQuery(import_kysely.CompiledQuery.raw("BEGIN"));
74
+ }
75
+ async commitTransaction(connection) {
76
+ await connection.executeQuery(import_kysely.CompiledQuery.raw("COMMIT"));
77
+ }
78
+ async rollbackTransaction(connection) {
79
+ await connection.executeQuery(import_kysely.CompiledQuery.raw("ROLLBACK"));
80
+ }
81
+ async destroy() {
82
+ this.config.sqlJs.close();
83
+ }
84
+ async init() {
85
+ }
86
+ async releaseConnection(_connection) {
87
+ }
88
+ };
89
+
90
+ // src/dialects/sql.js/dialect.ts
91
+ var SqlJsDialect = class {
92
+ static {
93
+ __name(this, "SqlJsDialect");
94
+ }
95
+ config;
96
+ constructor(config) {
97
+ this.config = config;
98
+ }
99
+ createAdapter = /* @__PURE__ */ __name(() => new import_kysely2.SqliteAdapter(), "createAdapter");
100
+ createDriver = /* @__PURE__ */ __name(() => new SqlJsDriver(this.config), "createDriver");
101
+ createIntrospector = /* @__PURE__ */ __name((db) => new import_kysely2.SqliteIntrospector(db), "createIntrospector");
102
+ createQueryCompiler = /* @__PURE__ */ __name(() => new import_kysely2.SqliteQueryCompiler(), "createQueryCompiler");
103
+ };
104
+ // Annotate the CommonJS export names for ESM import in node:
105
+ 0 && (module.exports = {
106
+ SqlJsDialect
107
+ });
108
+ //# sourceMappingURL=sql.js.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/dialects/sql.js/index.ts","../../src/dialects/sql.js/dialect.ts","../../src/dialects/sql.js/driver.ts","../../src/dialects/sql.js/connection.ts"],"sourcesContent":["// This module is ported from https://github.com/betarixm/kysely-sql-js by @betarixm\n\nexport { SqlJsDialect } from './dialect';\nexport type { SqlJsDialectConfig } from './types';\n","import type { Dialect } from 'kysely';\n\nimport type { SqlJsDialectConfig } from './types';\n\nimport { Kysely, SqliteAdapter, SqliteIntrospector, SqliteQueryCompiler } from 'kysely';\n\nimport { SqlJsDriver } from './driver';\n\n/**\n * The SqlJsDialect is for testing purposes only and should not be used in production.\n */\nexport class SqlJsDialect implements Dialect {\n private config: SqlJsDialectConfig;\n\n constructor(config: SqlJsDialectConfig) {\n this.config = config;\n }\n\n createAdapter = () => new SqliteAdapter();\n\n createDriver = () => new SqlJsDriver(this.config);\n\n createIntrospector = (db: Kysely<any>) => new SqliteIntrospector(db);\n\n createQueryCompiler = () => new SqliteQueryCompiler();\n}\n","import type { DatabaseConnection, Driver } from 'kysely';\n\nimport { CompiledQuery } from 'kysely';\n\nimport { SqlJsConnection } from './connection';\nimport type { SqlJsDialectConfig } from './types';\n\nexport class SqlJsDriver implements Driver {\n private config: SqlJsDialectConfig;\n\n constructor(config: SqlJsDialectConfig) {\n this.config = config;\n }\n\n async acquireConnection(): Promise<DatabaseConnection> {\n return new SqlJsConnection(this.config.sqlJs);\n }\n\n async beginTransaction(connection: DatabaseConnection): Promise<void> {\n await connection.executeQuery(CompiledQuery.raw('BEGIN'));\n }\n\n async commitTransaction(connection: DatabaseConnection): Promise<void> {\n await connection.executeQuery(CompiledQuery.raw('COMMIT'));\n }\n\n async rollbackTransaction(connection: DatabaseConnection): Promise<void> {\n await connection.executeQuery(CompiledQuery.raw('ROLLBACK'));\n }\n\n async destroy(): Promise<void> {\n this.config.sqlJs.close();\n }\n\n async init() {}\n\n async releaseConnection(_connection: DatabaseConnection): Promise<void> {}\n}\n","import type { DatabaseConnection, QueryResult } from 'kysely';\nimport type { BindParams, Database } from 'sql.js';\n\nimport { CompiledQuery } from 'kysely';\n\nexport class SqlJsConnection implements DatabaseConnection {\n private database: Database;\n\n constructor(database: Database) {\n this.database = database;\n }\n\n async executeQuery<R>(compiledQuery: CompiledQuery<unknown>): Promise<QueryResult<R>> {\n const executeResult = this.database.exec(compiledQuery.sql, compiledQuery.parameters as BindParams);\n const rowsModified = this.database.getRowsModified();\n return {\n numAffectedRows: BigInt(rowsModified),\n rows: executeResult\n .map(({ columns, values }) =>\n values.map((row) => columns.reduce((acc, column, i) => ({ ...acc, [column]: row[i] }), {}) as R),\n )\n .flat(),\n };\n }\n\n // eslint-disable-next-line require-yield\n async *streamQuery() {\n throw new Error('Not supported with SQLite');\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACIA,IAAAA,iBAA+E;;;ACF/E,oBAA8B;;;ACGvB,IAAMC,kBAAN,MAAMA;EAAb,OAAaA;;;EACDC;EAER,YAAYA,UAAoB;AAC5B,SAAKA,WAAWA;EACpB;EAEA,MAAMC,aAAgBC,eAAgE;AAClF,UAAMC,gBAAgB,KAAKH,SAASI,KAAKF,cAAcG,KAAKH,cAAcI,UAAU;AACpF,UAAMC,eAAe,KAAKP,SAASQ,gBAAe;AAClD,WAAO;MACHC,iBAAiBC,OAAOH,YAAAA;MACxBI,MAAMR,cACDS,IAAI,CAAC,EAAEC,SAASC,OAAM,MACnBA,OAAOF,IAAI,CAACG,QAAQF,QAAQG,OAAO,CAACC,KAAKC,QAAQC,OAAO;QAAE,GAAGF;QAAK,CAACC,MAAAA,GAASH,IAAII,CAAAA;MAAG,IAAI,CAAC,CAAA,CAAA,CAAA,EAE3FC,KAAI;IACb;EACJ;;EAGA,OAAOC,cAAc;AACjB,UAAM,IAAIC,MAAM,2BAAA;EACpB;AACJ;;;ADtBO,IAAMC,cAAN,MAAMA;EALb,OAKaA;;;EACDC;EAER,YAAYA,QAA4B;AACpC,SAAKA,SAASA;EAClB;EAEA,MAAMC,oBAAiD;AACnD,WAAO,IAAIC,gBAAgB,KAAKF,OAAOG,KAAK;EAChD;EAEA,MAAMC,iBAAiBC,YAA+C;AAClE,UAAMA,WAAWC,aAAaC,4BAAcC,IAAI,OAAA,CAAA;EACpD;EAEA,MAAMC,kBAAkBJ,YAA+C;AACnE,UAAMA,WAAWC,aAAaC,4BAAcC,IAAI,QAAA,CAAA;EACpD;EAEA,MAAME,oBAAoBL,YAA+C;AACrE,UAAMA,WAAWC,aAAaC,4BAAcC,IAAI,UAAA,CAAA;EACpD;EAEA,MAAMG,UAAyB;AAC3B,SAAKX,OAAOG,MAAMS,MAAK;EAC3B;EAEA,MAAMC,OAAO;EAAC;EAEd,MAAMC,kBAAkBC,aAAgD;EAAC;AAC7E;;;AD1BO,IAAMC,eAAN,MAAMA;EAPb,OAOaA;;;EACDC;EAER,YAAYA,QAA4B;AACpC,SAAKA,SAASA;EAClB;EAEAC,gBAAgB,6BAAM,IAAIC,6BAAAA,GAAV;EAEhBC,eAAe,6BAAM,IAAIC,YAAY,KAAKJ,MAAM,GAAjC;EAEfK,qBAAqB,wBAACC,OAAoB,IAAIC,kCAAmBD,EAAAA,GAA5C;EAErBE,sBAAsB,6BAAM,IAAIC,mCAAAA,GAAV;AAC1B;","names":["import_kysely","SqlJsConnection","database","executeQuery","compiledQuery","executeResult","exec","sql","parameters","rowsModified","getRowsModified","numAffectedRows","BigInt","rows","map","columns","values","row","reduce","acc","column","i","flat","streamQuery","Error","SqlJsDriver","config","acquireConnection","SqlJsConnection","sqlJs","beginTransaction","connection","executeQuery","CompiledQuery","raw","commitTransaction","rollbackTransaction","destroy","close","init","releaseConnection","_connection","SqlJsDialect","config","createAdapter","SqliteAdapter","createDriver","SqlJsDriver","createIntrospector","db","SqliteIntrospector","createQueryCompiler","SqliteQueryCompiler"]}
@@ -0,0 +1,32 @@
1
+ import { Driver, DatabaseConnection, Dialect, SqliteAdapter, Kysely, SqliteIntrospector, SqliteQueryCompiler } from 'kysely';
2
+ import { Database } from 'sql.js';
3
+
4
+ interface SqlJsDialectConfig {
5
+ sqlJs: Database;
6
+ }
7
+
8
+ declare class SqlJsDriver implements Driver {
9
+ private config;
10
+ constructor(config: SqlJsDialectConfig);
11
+ acquireConnection(): Promise<DatabaseConnection>;
12
+ beginTransaction(connection: DatabaseConnection): Promise<void>;
13
+ commitTransaction(connection: DatabaseConnection): Promise<void>;
14
+ rollbackTransaction(connection: DatabaseConnection): Promise<void>;
15
+ destroy(): Promise<void>;
16
+ init(): Promise<void>;
17
+ releaseConnection(_connection: DatabaseConnection): Promise<void>;
18
+ }
19
+
20
+ /**
21
+ * The SqlJsDialect is for testing purposes only and should not be used in production.
22
+ */
23
+ declare class SqlJsDialect implements Dialect {
24
+ private config;
25
+ constructor(config: SqlJsDialectConfig);
26
+ createAdapter: () => SqliteAdapter;
27
+ createDriver: () => SqlJsDriver;
28
+ createIntrospector: (db: Kysely<any>) => SqliteIntrospector;
29
+ createQueryCompiler: () => SqliteQueryCompiler;
30
+ }
31
+
32
+ export { SqlJsDialect, type SqlJsDialectConfig };
@@ -0,0 +1,32 @@
1
+ import { Driver, DatabaseConnection, Dialect, SqliteAdapter, Kysely, SqliteIntrospector, SqliteQueryCompiler } from 'kysely';
2
+ import { Database } from 'sql.js';
3
+
4
+ interface SqlJsDialectConfig {
5
+ sqlJs: Database;
6
+ }
7
+
8
+ declare class SqlJsDriver implements Driver {
9
+ private config;
10
+ constructor(config: SqlJsDialectConfig);
11
+ acquireConnection(): Promise<DatabaseConnection>;
12
+ beginTransaction(connection: DatabaseConnection): Promise<void>;
13
+ commitTransaction(connection: DatabaseConnection): Promise<void>;
14
+ rollbackTransaction(connection: DatabaseConnection): Promise<void>;
15
+ destroy(): Promise<void>;
16
+ init(): Promise<void>;
17
+ releaseConnection(_connection: DatabaseConnection): Promise<void>;
18
+ }
19
+
20
+ /**
21
+ * The SqlJsDialect is for testing purposes only and should not be used in production.
22
+ */
23
+ declare class SqlJsDialect implements Dialect {
24
+ private config;
25
+ constructor(config: SqlJsDialectConfig);
26
+ createAdapter: () => SqliteAdapter;
27
+ createDriver: () => SqlJsDriver;
28
+ createIntrospector: (db: Kysely<any>) => SqliteIntrospector;
29
+ createQueryCompiler: () => SqliteQueryCompiler;
30
+ }
31
+
32
+ export { SqlJsDialect, type SqlJsDialectConfig };
@@ -0,0 +1,83 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
4
+ // src/dialects/sql.js/dialect.ts
5
+ import { SqliteAdapter, SqliteIntrospector, SqliteQueryCompiler } from "kysely";
6
+
7
+ // src/dialects/sql.js/driver.ts
8
+ import { CompiledQuery } from "kysely";
9
+
10
+ // src/dialects/sql.js/connection.ts
11
+ var SqlJsConnection = class {
12
+ static {
13
+ __name(this, "SqlJsConnection");
14
+ }
15
+ database;
16
+ constructor(database) {
17
+ this.database = database;
18
+ }
19
+ async executeQuery(compiledQuery) {
20
+ const executeResult = this.database.exec(compiledQuery.sql, compiledQuery.parameters);
21
+ const rowsModified = this.database.getRowsModified();
22
+ return {
23
+ numAffectedRows: BigInt(rowsModified),
24
+ rows: executeResult.map(({ columns, values }) => values.map((row) => columns.reduce((acc, column, i) => ({
25
+ ...acc,
26
+ [column]: row[i]
27
+ }), {}))).flat()
28
+ };
29
+ }
30
+ // eslint-disable-next-line require-yield
31
+ async *streamQuery() {
32
+ throw new Error("Not supported with SQLite");
33
+ }
34
+ };
35
+
36
+ // src/dialects/sql.js/driver.ts
37
+ var SqlJsDriver = class {
38
+ static {
39
+ __name(this, "SqlJsDriver");
40
+ }
41
+ config;
42
+ constructor(config) {
43
+ this.config = config;
44
+ }
45
+ async acquireConnection() {
46
+ return new SqlJsConnection(this.config.sqlJs);
47
+ }
48
+ async beginTransaction(connection) {
49
+ await connection.executeQuery(CompiledQuery.raw("BEGIN"));
50
+ }
51
+ async commitTransaction(connection) {
52
+ await connection.executeQuery(CompiledQuery.raw("COMMIT"));
53
+ }
54
+ async rollbackTransaction(connection) {
55
+ await connection.executeQuery(CompiledQuery.raw("ROLLBACK"));
56
+ }
57
+ async destroy() {
58
+ this.config.sqlJs.close();
59
+ }
60
+ async init() {
61
+ }
62
+ async releaseConnection(_connection) {
63
+ }
64
+ };
65
+
66
+ // src/dialects/sql.js/dialect.ts
67
+ var SqlJsDialect = class {
68
+ static {
69
+ __name(this, "SqlJsDialect");
70
+ }
71
+ config;
72
+ constructor(config) {
73
+ this.config = config;
74
+ }
75
+ createAdapter = /* @__PURE__ */ __name(() => new SqliteAdapter(), "createAdapter");
76
+ createDriver = /* @__PURE__ */ __name(() => new SqlJsDriver(this.config), "createDriver");
77
+ createIntrospector = /* @__PURE__ */ __name((db) => new SqliteIntrospector(db), "createIntrospector");
78
+ createQueryCompiler = /* @__PURE__ */ __name(() => new SqliteQueryCompiler(), "createQueryCompiler");
79
+ };
80
+ export {
81
+ SqlJsDialect
82
+ };
83
+ //# sourceMappingURL=sql.js.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/dialects/sql.js/dialect.ts","../../src/dialects/sql.js/driver.ts","../../src/dialects/sql.js/connection.ts"],"sourcesContent":["import type { Dialect } from 'kysely';\n\nimport type { SqlJsDialectConfig } from './types';\n\nimport { Kysely, SqliteAdapter, SqliteIntrospector, SqliteQueryCompiler } from 'kysely';\n\nimport { SqlJsDriver } from './driver';\n\n/**\n * The SqlJsDialect is for testing purposes only and should not be used in production.\n */\nexport class SqlJsDialect implements Dialect {\n private config: SqlJsDialectConfig;\n\n constructor(config: SqlJsDialectConfig) {\n this.config = config;\n }\n\n createAdapter = () => new SqliteAdapter();\n\n createDriver = () => new SqlJsDriver(this.config);\n\n createIntrospector = (db: Kysely<any>) => new SqliteIntrospector(db);\n\n createQueryCompiler = () => new SqliteQueryCompiler();\n}\n","import type { DatabaseConnection, Driver } from 'kysely';\n\nimport { CompiledQuery } from 'kysely';\n\nimport { SqlJsConnection } from './connection';\nimport type { SqlJsDialectConfig } from './types';\n\nexport class SqlJsDriver implements Driver {\n private config: SqlJsDialectConfig;\n\n constructor(config: SqlJsDialectConfig) {\n this.config = config;\n }\n\n async acquireConnection(): Promise<DatabaseConnection> {\n return new SqlJsConnection(this.config.sqlJs);\n }\n\n async beginTransaction(connection: DatabaseConnection): Promise<void> {\n await connection.executeQuery(CompiledQuery.raw('BEGIN'));\n }\n\n async commitTransaction(connection: DatabaseConnection): Promise<void> {\n await connection.executeQuery(CompiledQuery.raw('COMMIT'));\n }\n\n async rollbackTransaction(connection: DatabaseConnection): Promise<void> {\n await connection.executeQuery(CompiledQuery.raw('ROLLBACK'));\n }\n\n async destroy(): Promise<void> {\n this.config.sqlJs.close();\n }\n\n async init() {}\n\n async releaseConnection(_connection: DatabaseConnection): Promise<void> {}\n}\n","import type { DatabaseConnection, QueryResult } from 'kysely';\nimport type { BindParams, Database } from 'sql.js';\n\nimport { CompiledQuery } from 'kysely';\n\nexport class SqlJsConnection implements DatabaseConnection {\n private database: Database;\n\n constructor(database: Database) {\n this.database = database;\n }\n\n async executeQuery<R>(compiledQuery: CompiledQuery<unknown>): Promise<QueryResult<R>> {\n const executeResult = this.database.exec(compiledQuery.sql, compiledQuery.parameters as BindParams);\n const rowsModified = this.database.getRowsModified();\n return {\n numAffectedRows: BigInt(rowsModified),\n rows: executeResult\n .map(({ columns, values }) =>\n values.map((row) => columns.reduce((acc, column, i) => ({ ...acc, [column]: row[i] }), {}) as R),\n )\n .flat(),\n };\n }\n\n // eslint-disable-next-line require-yield\n async *streamQuery() {\n throw new Error('Not supported with SQLite');\n }\n}\n"],"mappings":";;;;AAIA,SAAiBA,eAAeC,oBAAoBC,2BAA2B;;;ACF/E,SAASC,qBAAqB;;;ACGvB,IAAMC,kBAAN,MAAMA;EAAb,OAAaA;;;EACDC;EAER,YAAYA,UAAoB;AAC5B,SAAKA,WAAWA;EACpB;EAEA,MAAMC,aAAgBC,eAAgE;AAClF,UAAMC,gBAAgB,KAAKH,SAASI,KAAKF,cAAcG,KAAKH,cAAcI,UAAU;AACpF,UAAMC,eAAe,KAAKP,SAASQ,gBAAe;AAClD,WAAO;MACHC,iBAAiBC,OAAOH,YAAAA;MACxBI,MAAMR,cACDS,IAAI,CAAC,EAAEC,SAASC,OAAM,MACnBA,OAAOF,IAAI,CAACG,QAAQF,QAAQG,OAAO,CAACC,KAAKC,QAAQC,OAAO;QAAE,GAAGF;QAAK,CAACC,MAAAA,GAASH,IAAII,CAAAA;MAAG,IAAI,CAAC,CAAA,CAAA,CAAA,EAE3FC,KAAI;IACb;EACJ;;EAGA,OAAOC,cAAc;AACjB,UAAM,IAAIC,MAAM,2BAAA;EACpB;AACJ;;;ADtBO,IAAMC,cAAN,MAAMA;EALb,OAKaA;;;EACDC;EAER,YAAYA,QAA4B;AACpC,SAAKA,SAASA;EAClB;EAEA,MAAMC,oBAAiD;AACnD,WAAO,IAAIC,gBAAgB,KAAKF,OAAOG,KAAK;EAChD;EAEA,MAAMC,iBAAiBC,YAA+C;AAClE,UAAMA,WAAWC,aAAaC,cAAcC,IAAI,OAAA,CAAA;EACpD;EAEA,MAAMC,kBAAkBJ,YAA+C;AACnE,UAAMA,WAAWC,aAAaC,cAAcC,IAAI,QAAA,CAAA;EACpD;EAEA,MAAME,oBAAoBL,YAA+C;AACrE,UAAMA,WAAWC,aAAaC,cAAcC,IAAI,UAAA,CAAA;EACpD;EAEA,MAAMG,UAAyB;AAC3B,SAAKX,OAAOG,MAAMS,MAAK;EAC3B;EAEA,MAAMC,OAAO;EAAC;EAEd,MAAMC,kBAAkBC,aAAgD;EAAC;AAC7E;;;AD1BO,IAAMC,eAAN,MAAMA;EAPb,OAOaA;;;EACDC;EAER,YAAYA,QAA4B;AACpC,SAAKA,SAASA;EAClB;EAEAC,gBAAgB,6BAAM,IAAIC,cAAAA,GAAV;EAEhBC,eAAe,6BAAM,IAAIC,YAAY,KAAKJ,MAAM,GAAjC;EAEfK,qBAAqB,wBAACC,OAAoB,IAAIC,mBAAmBD,EAAAA,GAA5C;EAErBE,sBAAsB,6BAAM,IAAIC,oBAAAA,GAAV;AAC1B;","names":["SqliteAdapter","SqliteIntrospector","SqliteQueryCompiler","CompiledQuery","SqlJsConnection","database","executeQuery","compiledQuery","executeResult","exec","sql","parameters","rowsModified","getRowsModified","numAffectedRows","BigInt","rows","map","columns","values","row","reduce","acc","column","i","flat","streamQuery","Error","SqlJsDriver","config","acquireConnection","SqlJsConnection","sqlJs","beginTransaction","connection","executeQuery","CompiledQuery","raw","commitTransaction","rollbackTransaction","destroy","close","init","releaseConnection","_connection","SqlJsDialect","config","createAdapter","SqliteAdapter","createDriver","SqlJsDriver","createIntrospector","db","SqliteIntrospector","createQueryCompiler","SqliteQueryCompiler"]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/dialects/sqlite.ts
21
+ var sqlite_exports = {};
22
+ __export(sqlite_exports, {
23
+ SqliteDialect: () => import_kysely.SqliteDialect
24
+ });
25
+ module.exports = __toCommonJS(sqlite_exports);
26
+ var import_kysely = require("kysely");
27
+ // Annotate the CommonJS export names for ESM import in node:
28
+ 0 && (module.exports = {
29
+ SqliteDialect
30
+ });
31
+ //# sourceMappingURL=sqlite.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/dialects/sqlite.ts"],"sourcesContent":["export { SqliteDialect, type SqliteDialectConfig } from 'kysely';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;oBAAwD;","names":[]}
@@ -0,0 +1 @@
1
+ export { SqliteDialect, SqliteDialectConfig } from 'kysely';
@@ -0,0 +1 @@
1
+ export { SqliteDialect, SqliteDialectConfig } from 'kysely';
@@ -0,0 +1,6 @@
1
+ // src/dialects/sqlite.ts
2
+ import { SqliteDialect } from "kysely";
3
+ export {
4
+ SqliteDialect
5
+ };
6
+ //# sourceMappingURL=sqlite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/dialects/sqlite.ts"],"sourcesContent":["export { SqliteDialect, type SqliteDialectConfig } from 'kysely';\n"],"mappings":";AAAA,SAASA,qBAA+C;","names":["SqliteDialect"]}
package/dist/index.cjs CHANGED
@@ -3727,15 +3727,14 @@ function addBigIntValidation(schema, attributes) {
3727
3727
  if (val === void 0) {
3728
3728
  continue;
3729
3729
  }
3730
- const bigIntVal = BigInt(val);
3731
3730
  (0, import_ts_pattern12.match)(attr.name).with("@gt", () => {
3732
- result = result.gt(bigIntVal);
3731
+ result = result.gt(BigInt(val));
3733
3732
  }).with("@gte", () => {
3734
- result = result.gte(bigIntVal);
3733
+ result = result.gte(BigInt(val));
3735
3734
  }).with("@lt", () => {
3736
- result = result.lt(bigIntVal);
3735
+ result = result.lt(BigInt(val));
3737
3736
  }).with("@lte", () => {
3738
- result = result.lte(bigIntVal);
3737
+ result = result.lte(BigInt(val));
3739
3738
  });
3740
3739
  }
3741
3740
  return result;