drizzle-orm 0.33.0-5b9600e → 0.33.0-5be80aa

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.
Files changed (56) hide show
  1. package/aws-data-api/common/index.d.cts +1 -1
  2. package/aws-data-api/common/index.d.ts +1 -1
  3. package/index.cjs +0 -2
  4. package/index.cjs.map +1 -1
  5. package/index.d.cts +0 -1
  6. package/index.d.ts +0 -1
  7. package/index.js +0 -1
  8. package/index.js.map +1 -1
  9. package/mysql-core/db.cjs +0 -4
  10. package/mysql-core/db.cjs.map +1 -1
  11. package/mysql-core/db.d.cts +1 -4
  12. package/mysql-core/db.d.ts +1 -4
  13. package/mysql-core/db.js +0 -4
  14. package/mysql-core/db.js.map +1 -1
  15. package/operations.cjs.map +1 -1
  16. package/package.json +51 -99
  17. package/pg-core/db.cjs +0 -4
  18. package/pg-core/db.cjs.map +1 -1
  19. package/pg-core/db.d.cts +1 -4
  20. package/pg-core/db.d.ts +1 -4
  21. package/pg-core/db.js +0 -4
  22. package/pg-core/db.js.map +1 -1
  23. package/sqlite-core/db.cjs +0 -4
  24. package/sqlite-core/db.cjs.map +1 -1
  25. package/sqlite-core/db.d.cts +1 -4
  26. package/sqlite-core/db.d.ts +1 -4
  27. package/sqlite-core/db.js +0 -4
  28. package/sqlite-core/db.js.map +1 -1
  29. package/version.cjs +1 -1
  30. package/version.d.cts +1 -1
  31. package/version.d.ts +1 -1
  32. package/version.js +1 -1
  33. package/monodriver.cjs +0 -130
  34. package/monodriver.cjs.map +0 -1
  35. package/monodriver.d.cts +0 -117
  36. package/monodriver.d.ts +0 -117
  37. package/monodriver.js +0 -96
  38. package/monodriver.js.map +0 -1
  39. package/mysql-core/query-builders/count.cjs +0 -74
  40. package/mysql-core/query-builders/count.cjs.map +0 -1
  41. package/mysql-core/query-builders/count.d.cts +0 -30
  42. package/mysql-core/query-builders/count.d.ts +0 -30
  43. package/mysql-core/query-builders/count.js +0 -50
  44. package/mysql-core/query-builders/count.js.map +0 -1
  45. package/pg-core/query-builders/count.cjs +0 -74
  46. package/pg-core/query-builders/count.cjs.map +0 -1
  47. package/pg-core/query-builders/count.d.cts +0 -29
  48. package/pg-core/query-builders/count.d.ts +0 -29
  49. package/pg-core/query-builders/count.js +0 -50
  50. package/pg-core/query-builders/count.js.map +0 -1
  51. package/sqlite-core/query-builders/count.cjs +0 -72
  52. package/sqlite-core/query-builders/count.cjs.map +0 -1
  53. package/sqlite-core/query-builders/count.d.cts +0 -30
  54. package/sqlite-core/query-builders/count.d.ts +0 -30
  55. package/sqlite-core/query-builders/count.js +0 -48
  56. package/sqlite-core/query-builders/count.js.map +0 -1
@@ -1,30 +0,0 @@
1
- import { entityKind } from "../../index.cjs";
2
- import type { SQLWrapper } from "../../sql/sql.cjs";
3
- import { SQL } from "../../sql/sql.cjs";
4
- import type { SQLiteDialect } from "../dialect.cjs";
5
- import type { SQLiteSession } from "../session.cjs";
6
- import type { SQLiteTable } from "../table.cjs";
7
- import type { SQLiteView } from "../view.cjs";
8
- export declare class SQLiteCountBuilder<TSession extends SQLiteSession<any, any, any, any>> extends SQL<number> implements Promise<number>, SQLWrapper {
9
- readonly params: {
10
- source: SQLiteTable | SQLiteView | SQL | SQLWrapper;
11
- filters?: SQL<unknown>;
12
- dialect: SQLiteDialect;
13
- session: TSession;
14
- };
15
- private sql;
16
- static readonly [entityKind] = "SQLiteCountBuilderAsync";
17
- [Symbol.toStringTag]: string;
18
- private session;
19
- private static buildEmbeddedCount;
20
- private static buildCount;
21
- constructor(params: {
22
- source: SQLiteTable | SQLiteView | SQL | SQLWrapper;
23
- filters?: SQL<unknown>;
24
- dialect: SQLiteDialect;
25
- session: TSession;
26
- });
27
- then<TResult1 = number, TResult2 = never>(onfulfilled?: ((value: number) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
28
- catch(onRejected?: ((reason: any) => never | PromiseLike<never>) | null | undefined): Promise<number>;
29
- finally(onFinally?: (() => void) | null | undefined): Promise<number>;
30
- }
@@ -1,30 +0,0 @@
1
- import { entityKind } from "../../index.js";
2
- import type { SQLWrapper } from "../../sql/sql.js";
3
- import { SQL } from "../../sql/sql.js";
4
- import type { SQLiteDialect } from "../dialect.js";
5
- import type { SQLiteSession } from "../session.js";
6
- import type { SQLiteTable } from "../table.js";
7
- import type { SQLiteView } from "../view.js";
8
- export declare class SQLiteCountBuilder<TSession extends SQLiteSession<any, any, any, any>> extends SQL<number> implements Promise<number>, SQLWrapper {
9
- readonly params: {
10
- source: SQLiteTable | SQLiteView | SQL | SQLWrapper;
11
- filters?: SQL<unknown>;
12
- dialect: SQLiteDialect;
13
- session: TSession;
14
- };
15
- private sql;
16
- static readonly [entityKind] = "SQLiteCountBuilderAsync";
17
- [Symbol.toStringTag]: string;
18
- private session;
19
- private static buildEmbeddedCount;
20
- private static buildCount;
21
- constructor(params: {
22
- source: SQLiteTable | SQLiteView | SQL | SQLWrapper;
23
- filters?: SQL<unknown>;
24
- dialect: SQLiteDialect;
25
- session: TSession;
26
- });
27
- then<TResult1 = number, TResult2 = never>(onfulfilled?: ((value: number) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
28
- catch(onRejected?: ((reason: any) => never | PromiseLike<never>) | null | undefined): Promise<number>;
29
- finally(onFinally?: (() => void) | null | undefined): Promise<number>;
30
- }
@@ -1,48 +0,0 @@
1
- import { entityKind, sql } from "../../index.js";
2
- import { SQL } from "../../sql/sql.js";
3
- class SQLiteCountBuilder extends SQL {
4
- constructor(params) {
5
- super(SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
6
- this.params = params;
7
- this.session = params.session;
8
- this.sql = SQLiteCountBuilder.buildCount(
9
- params.source,
10
- params.filters
11
- );
12
- }
13
- sql;
14
- static [entityKind] = "SQLiteCountBuilderAsync";
15
- [Symbol.toStringTag] = "SQLiteCountBuilderAsync";
16
- session;
17
- static buildEmbeddedCount(source, filters) {
18
- return sql`(select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters})`;
19
- }
20
- static buildCount(source, filters) {
21
- return sql`select count(*) from ${source}${sql.raw(" where ").if(filters)}${filters}`;
22
- }
23
- then(onfulfilled, onrejected) {
24
- return Promise.resolve(this.session.values(this.sql)).then((it) => it[0][0]).then(
25
- onfulfilled,
26
- onrejected
27
- );
28
- }
29
- catch(onRejected) {
30
- return this.then(void 0, onRejected);
31
- }
32
- finally(onFinally) {
33
- return this.then(
34
- (value) => {
35
- onFinally?.();
36
- return value;
37
- },
38
- (reason) => {
39
- onFinally?.();
40
- throw reason;
41
- }
42
- );
43
- }
44
- }
45
- export {
46
- SQLiteCountBuilder
47
- };
48
- //# sourceMappingURL=count.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/sqlite-core/query-builders/count.ts"],"sourcesContent":["import { entityKind, sql } from '~/index.ts';\nimport type { SQLWrapper } from '~/sql/sql.ts';\nimport { SQL } from '~/sql/sql.ts';\nimport type { SQLiteDialect } from '../dialect.ts';\nimport type { SQLiteSession } from '../session.ts';\nimport type { SQLiteTable } from '../table.ts';\nimport type { SQLiteView } from '../view.ts';\n\nexport class SQLiteCountBuilder<\n\tTSession extends SQLiteSession<any, any, any, any>,\n> extends SQL<number> implements Promise<number>, SQLWrapper {\n\tprivate sql: SQL<number>;\n\n\tstatic readonly [entityKind] = 'SQLiteCountBuilderAsync';\n\t[Symbol.toStringTag] = 'SQLiteCountBuilderAsync';\n\n\tprivate session: TSession;\n\n\tprivate static buildEmbeddedCount(\n\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper,\n\t\tfilters?: SQL<unknown>,\n\t): SQL<number> {\n\t\treturn sql<number>`(select count(*) from ${source}${sql.raw(' where ').if(filters)}${filters})`;\n\t}\n\n\tprivate static buildCount(\n\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper,\n\t\tfilters?: SQL<unknown>,\n\t): SQL<number> {\n\t\treturn sql<number>`select count(*) from ${source}${sql.raw(' where ').if(filters)}${filters}`;\n\t}\n\n\tconstructor(\n\t\treadonly params: {\n\t\t\tsource: SQLiteTable | SQLiteView | SQL | SQLWrapper;\n\t\t\tfilters?: SQL<unknown>;\n\t\t\tdialect: SQLiteDialect;\n\t\t\tsession: TSession;\n\t\t},\n\t) {\n\t\tsuper(SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);\n\n\t\tthis.session = params.session;\n\n\t\tthis.sql = SQLiteCountBuilder.buildCount(\n\t\t\tparams.source,\n\t\t\tparams.filters,\n\t\t);\n\t}\n\n\tthen<TResult1 = number, TResult2 = never>(\n\t\tonfulfilled?: ((value: number) => TResult1 | PromiseLike<TResult1>) | null | undefined,\n\t\tonrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined,\n\t): Promise<TResult1 | TResult2> {\n\t\treturn Promise.resolve(this.session.values(this.sql)).then<number>((it) => it[0]![0] as number).then(\n\t\t\tonfulfilled,\n\t\t\tonrejected,\n\t\t);\n\t}\n\n\tcatch(\n\t\tonRejected?: ((reason: any) => never | PromiseLike<never>) | null | undefined,\n\t): Promise<number> {\n\t\treturn this.then(undefined, onRejected);\n\t}\n\n\tfinally(onFinally?: (() => void) | null | undefined): Promise<number> {\n\t\treturn this.then(\n\t\t\t(value) => {\n\t\t\t\tonFinally?.();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\t(reason) => {\n\t\t\t\tonFinally?.();\n\t\t\t\tthrow reason;\n\t\t\t},\n\t\t);\n\t}\n}\n"],"mappings":"AAAA,SAAS,YAAY,WAAW;AAEhC,SAAS,WAAW;AAMb,MAAM,2BAEH,IAAmD;AAAA,EAsB5D,YACU,QAMR;AACD,UAAM,mBAAmB,mBAAmB,OAAO,QAAQ,OAAO,OAAO,EAAE,WAAW;AAP7E;AAST,SAAK,UAAU,OAAO;AAEtB,SAAK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