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.
- package/aws-data-api/common/index.d.cts +1 -1
- package/aws-data-api/common/index.d.ts +1 -1
- package/index.cjs +0 -2
- package/index.cjs.map +1 -1
- package/index.d.cts +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/mysql-core/db.cjs +0 -4
- package/mysql-core/db.cjs.map +1 -1
- package/mysql-core/db.d.cts +1 -4
- package/mysql-core/db.d.ts +1 -4
- package/mysql-core/db.js +0 -4
- package/mysql-core/db.js.map +1 -1
- package/operations.cjs.map +1 -1
- package/package.json +51 -99
- package/pg-core/db.cjs +0 -4
- package/pg-core/db.cjs.map +1 -1
- package/pg-core/db.d.cts +1 -4
- package/pg-core/db.d.ts +1 -4
- package/pg-core/db.js +0 -4
- package/pg-core/db.js.map +1 -1
- package/sqlite-core/db.cjs +0 -4
- package/sqlite-core/db.cjs.map +1 -1
- package/sqlite-core/db.d.cts +1 -4
- package/sqlite-core/db.d.ts +1 -4
- package/sqlite-core/db.js +0 -4
- package/sqlite-core/db.js.map +1 -1
- package/version.cjs +1 -1
- package/version.d.cts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/monodriver.cjs +0 -130
- package/monodriver.cjs.map +0 -1
- package/monodriver.d.cts +0 -117
- package/monodriver.d.ts +0 -117
- package/monodriver.js +0 -96
- package/monodriver.js.map +0 -1
- package/mysql-core/query-builders/count.cjs +0 -74
- package/mysql-core/query-builders/count.cjs.map +0 -1
- package/mysql-core/query-builders/count.d.cts +0 -30
- package/mysql-core/query-builders/count.d.ts +0 -30
- package/mysql-core/query-builders/count.js +0 -50
- package/mysql-core/query-builders/count.js.map +0 -1
- package/pg-core/query-builders/count.cjs +0 -74
- package/pg-core/query-builders/count.cjs.map +0 -1
- package/pg-core/query-builders/count.d.cts +0 -29
- package/pg-core/query-builders/count.d.ts +0 -29
- package/pg-core/query-builders/count.js +0 -50
- package/pg-core/query-builders/count.js.map +0 -1
- package/sqlite-core/query-builders/count.cjs +0 -72
- package/sqlite-core/query-builders/count.cjs.map +0 -1
- package/sqlite-core/query-builders/count.d.cts +0 -30
- package/sqlite-core/query-builders/count.d.ts +0 -30
- package/sqlite-core/query-builders/count.js +0 -48
- 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,MAAM,mBAAmB;AAAA,MAC7B,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,EACD;AAAA,EArCQ;AAAA,EAER,QAAiB,UAAU,IAAI;AAAA,EAC/B,CAAC,OAAO,WAAW,IAAI;AAAA,EAEf;AAAA,EAER,OAAe,mBACd,QACA,SACc;AACd,WAAO,4BAAoC,MAAM,GAAG,IAAI,IAAI,SAAS,EAAE,GAAG,OAAO,CAAC,GAAG,OAAO;AAAA,EAC7F;AAAA,EAEA,OAAe,WACd,QACA,SACc;AACd,WAAO,2BAAmC,MAAM,GAAG,IAAI,IAAI,SAAS,EAAE,GAAG,OAAO,CAAC,GAAG,OAAO;AAAA,EAC5F;AAAA,EAoBA,KACC,aACA,YAC+B;AAC/B,WAAO,QAAQ,QAAQ,KAAK,QAAQ,OAAO,KAAK,GAAG,CAAC,EAAE,KAAa,CAAC,OAAO,GAAG,CAAC,EAAG,CAAC,CAAW,EAAE;AAAA,MAC/F;AAAA,MACA;AAAA,IACD;AAAA,EACD;AAAA,EAEA,MACC,YACkB;AAClB,WAAO,KAAK,KAAK,QAAW,UAAU;AAAA,EACvC;AAAA,EAEA,QAAQ,WAA8D;AACrE,WAAO,KAAK;AAAA,MACX,CAAC,UAAU;AACV,oBAAY;AACZ,eAAO;AAAA,MACR;AAAA,MACA,CAAC,WAAW;AACX,oBAAY;AACZ,cAAM;AAAA,MACP;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
|