@nextlyhq/adapter-drizzle 0.0.2-alpha.62 → 0.0.2-alpha.65
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/README.md +25 -1
- package/dist/{adapter-BeMxQXZs.d.cts → adapter-C6ENLDau.d.cts} +63 -1
- package/dist/{adapter-BRvxUZrS.d.ts → adapter-D4GM1VAZ.d.ts} +63 -1
- package/dist/index.cjs +107 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +108 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{migration-DhMuYiIm.d.cts → migration-B6AmjCQ1.d.cts} +25 -1
- package/dist/{migration-BnT96HFp.d.ts → migration-R06fsTrz.d.ts} +25 -1
- package/dist/migrations.d.cts +3 -3
- package/dist/migrations.d.ts +3 -3
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -3
|
@@ -152,6 +152,30 @@ interface JoinSpec {
|
|
|
152
152
|
*
|
|
153
153
|
* @public
|
|
154
154
|
*/
|
|
155
|
+
/**
|
|
156
|
+
* What a COUNT asks for.
|
|
157
|
+
*
|
|
158
|
+
* 🔴 `distinctOn` is a column LIST rather than a boolean, and the difference is
|
|
159
|
+
* the whole reason this option exists: counting rows and counting the things
|
|
160
|
+
* those rows are about are different questions whenever a thing can own more
|
|
161
|
+
* than one row. A document holding a pending edit in three languages is one
|
|
162
|
+
* document and three version rows.
|
|
163
|
+
*/
|
|
164
|
+
interface CountOptions {
|
|
165
|
+
/** Filter conditions, the same vocabulary `select` takes. */
|
|
166
|
+
where?: WhereClause;
|
|
167
|
+
/**
|
|
168
|
+
* Count DISTINCT combinations of these columns instead of rows.
|
|
169
|
+
*
|
|
170
|
+
* Compiled as `COUNT(*)` over a `SELECT DISTINCT` subquery rather than as
|
|
171
|
+
* `COUNT(DISTINCT a, b)`, because the latter is not portable: MySQL accepts
|
|
172
|
+
* it, PostgreSQL requires a row constructor, and SQLite rejects it outright
|
|
173
|
+
* with "wrong number of arguments to function count()". The subquery is the
|
|
174
|
+
* one form all three engines agree on, and it is what this compiles to on
|
|
175
|
+
* every dialect so the number cannot differ by engine.
|
|
176
|
+
*/
|
|
177
|
+
distinctOn?: string[];
|
|
178
|
+
}
|
|
155
179
|
interface SelectOptions {
|
|
156
180
|
/** Specific columns to select (default: all columns) */
|
|
157
181
|
columns?: string[];
|
|
@@ -745,4 +769,4 @@ interface MigrationStatus {
|
|
|
745
769
|
pending: Migration[];
|
|
746
770
|
}
|
|
747
771
|
|
|
748
|
-
export { type DeleteOptions as D, type InsertOptions as I, type JoinSpec as J, type MigrationRecord as M, type OrderBySpec as O, type PoolStats as P, type SelectOptions as S, type TransactionContext as T, type UpdateOptions as U, type WhereClause as W, type Migration as a, type MigrationStatus as b, type MigrationOptions as c, type MigrationResult as d, type UpsertOptions as e, type TransactionOptions as f, type DatabaseCapabilities as g, type TransactionIsolationLevel as h, WHERE_OPERATORS as i, type WhereCondition as j, type WhereOperator as k };
|
|
772
|
+
export { type CountOptions as C, type DeleteOptions as D, type InsertOptions as I, type JoinSpec as J, type MigrationRecord as M, type OrderBySpec as O, type PoolStats as P, type SelectOptions as S, type TransactionContext as T, type UpdateOptions as U, type WhereClause as W, type Migration as a, type MigrationStatus as b, type MigrationOptions as c, type MigrationResult as d, type UpsertOptions as e, type TransactionOptions as f, type DatabaseCapabilities as g, type TransactionIsolationLevel as h, WHERE_OPERATORS as i, type WhereCondition as j, type WhereOperator as k };
|
|
@@ -152,6 +152,30 @@ interface JoinSpec {
|
|
|
152
152
|
*
|
|
153
153
|
* @public
|
|
154
154
|
*/
|
|
155
|
+
/**
|
|
156
|
+
* What a COUNT asks for.
|
|
157
|
+
*
|
|
158
|
+
* 🔴 `distinctOn` is a column LIST rather than a boolean, and the difference is
|
|
159
|
+
* the whole reason this option exists: counting rows and counting the things
|
|
160
|
+
* those rows are about are different questions whenever a thing can own more
|
|
161
|
+
* than one row. A document holding a pending edit in three languages is one
|
|
162
|
+
* document and three version rows.
|
|
163
|
+
*/
|
|
164
|
+
interface CountOptions {
|
|
165
|
+
/** Filter conditions, the same vocabulary `select` takes. */
|
|
166
|
+
where?: WhereClause;
|
|
167
|
+
/**
|
|
168
|
+
* Count DISTINCT combinations of these columns instead of rows.
|
|
169
|
+
*
|
|
170
|
+
* Compiled as `COUNT(*)` over a `SELECT DISTINCT` subquery rather than as
|
|
171
|
+
* `COUNT(DISTINCT a, b)`, because the latter is not portable: MySQL accepts
|
|
172
|
+
* it, PostgreSQL requires a row constructor, and SQLite rejects it outright
|
|
173
|
+
* with "wrong number of arguments to function count()". The subquery is the
|
|
174
|
+
* one form all three engines agree on, and it is what this compiles to on
|
|
175
|
+
* every dialect so the number cannot differ by engine.
|
|
176
|
+
*/
|
|
177
|
+
distinctOn?: string[];
|
|
178
|
+
}
|
|
155
179
|
interface SelectOptions {
|
|
156
180
|
/** Specific columns to select (default: all columns) */
|
|
157
181
|
columns?: string[];
|
|
@@ -745,4 +769,4 @@ interface MigrationStatus {
|
|
|
745
769
|
pending: Migration[];
|
|
746
770
|
}
|
|
747
771
|
|
|
748
|
-
export { type DeleteOptions as D, type InsertOptions as I, type JoinSpec as J, type MigrationRecord as M, type OrderBySpec as O, type PoolStats as P, type SelectOptions as S, type TransactionContext as T, type UpdateOptions as U, type WhereClause as W, type Migration as a, type MigrationStatus as b, type MigrationOptions as c, type MigrationResult as d, type UpsertOptions as e, type TransactionOptions as f, type DatabaseCapabilities as g, type TransactionIsolationLevel as h, WHERE_OPERATORS as i, type WhereCondition as j, type WhereOperator as k };
|
|
772
|
+
export { type CountOptions as C, type DeleteOptions as D, type InsertOptions as I, type JoinSpec as J, type MigrationRecord as M, type OrderBySpec as O, type PoolStats as P, type SelectOptions as S, type TransactionContext as T, type UpdateOptions as U, type WhereClause as W, type Migration as a, type MigrationStatus as b, type MigrationOptions as c, type MigrationResult as d, type UpsertOptions as e, type TransactionOptions as f, type DatabaseCapabilities as g, type TransactionIsolationLevel as h, WHERE_OPERATORS as i, type WhereCondition as j, type WhereOperator as k };
|
package/dist/migrations.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as DrizzleAdapter } from './adapter-
|
|
2
|
-
import { M as MigrationRecord, a as Migration, b as MigrationStatus, c as MigrationOptions } from './migration-
|
|
3
|
-
export { d as MigrationResult } from './migration-
|
|
1
|
+
import { D as DrizzleAdapter } from './adapter-C6ENLDau.cjs';
|
|
2
|
+
import { M as MigrationRecord, a as Migration, b as MigrationStatus, c as MigrationOptions } from './migration-B6AmjCQ1.cjs';
|
|
3
|
+
export { d as MigrationResult } from './migration-B6AmjCQ1.cjs';
|
|
4
4
|
import 'drizzle-orm';
|
|
5
5
|
import './core-CVO7WYDj.cjs';
|
|
6
6
|
import './schema-BDn8WfSL.cjs';
|
package/dist/migrations.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as DrizzleAdapter } from './adapter-
|
|
2
|
-
import { M as MigrationRecord, a as Migration, b as MigrationStatus, c as MigrationOptions } from './migration-
|
|
3
|
-
export { d as MigrationResult } from './migration-
|
|
1
|
+
import { D as DrizzleAdapter } from './adapter-D4GM1VAZ.js';
|
|
2
|
+
import { M as MigrationRecord, a as Migration, b as MigrationStatus, c as MigrationOptions } from './migration-R06fsTrz.js';
|
|
3
|
+
export { d as MigrationResult } from './migration-R06fsTrz.js';
|
|
4
4
|
import 'drizzle-orm';
|
|
5
5
|
import './core-CVO7WYDj.js';
|
|
6
6
|
import './schema-BIQ0YQZ_.js';
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as SqlParam } from '../core-CVO7WYDj.cjs';
|
|
2
2
|
export { J as JsonArray, b as JsonObject, c as JsonValue, S as SupportedDialect, T as TableResolver } from '../core-CVO7WYDj.cjs';
|
|
3
|
-
export { g as DatabaseCapabilities, D as DeleteOptions, I as InsertOptions, J as JoinSpec, a as Migration, c as MigrationOptions, M as MigrationRecord, d as MigrationResult, b as MigrationStatus, O as OrderBySpec, P as PoolStats, S as SelectOptions, T as TransactionContext, h as TransactionIsolationLevel, f as TransactionOptions, U as UpdateOptions, e as UpsertOptions, i as WHERE_OPERATORS, W as WhereClause, j as WhereCondition, k as WhereOperator } from '../migration-
|
|
3
|
+
export { C as CountOptions, g as DatabaseCapabilities, D as DeleteOptions, I as InsertOptions, J as JoinSpec, a as Migration, c as MigrationOptions, M as MigrationRecord, d as MigrationResult, b as MigrationStatus, O as OrderBySpec, P as PoolStats, S as SelectOptions, T as TransactionContext, h as TransactionIsolationLevel, f as TransactionOptions, U as UpdateOptions, e as UpsertOptions, i as WHERE_OPERATORS, W as WhereClause, j as WhereCondition, k as WhereOperator } from '../migration-B6AmjCQ1.cjs';
|
|
4
4
|
export { A as AlterTableOperation, a as AlterTableOptions, b as ColumnDefinition, C as CreateTableOptions, D as DropTableOptions, I as IndexDefinition, c as TableConstraint, T as TableDefinition } from '../schema-BDn8WfSL.cjs';
|
|
5
5
|
export { a as DatabaseError, D as DatabaseErrorKind, b as DatabaseErrorOptions, c as createDatabaseError, i as isApplicationError, d as isDatabaseError } from '../error-BrdknH2s.cjs';
|
|
6
6
|
import 'drizzle-orm';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as SqlParam } from '../core-CVO7WYDj.js';
|
|
2
2
|
export { J as JsonArray, b as JsonObject, c as JsonValue, S as SupportedDialect, T as TableResolver } from '../core-CVO7WYDj.js';
|
|
3
|
-
export { g as DatabaseCapabilities, D as DeleteOptions, I as InsertOptions, J as JoinSpec, a as Migration, c as MigrationOptions, M as MigrationRecord, d as MigrationResult, b as MigrationStatus, O as OrderBySpec, P as PoolStats, S as SelectOptions, T as TransactionContext, h as TransactionIsolationLevel, f as TransactionOptions, U as UpdateOptions, e as UpsertOptions, i as WHERE_OPERATORS, W as WhereClause, j as WhereCondition, k as WhereOperator } from '../migration-
|
|
3
|
+
export { C as CountOptions, g as DatabaseCapabilities, D as DeleteOptions, I as InsertOptions, J as JoinSpec, a as Migration, c as MigrationOptions, M as MigrationRecord, d as MigrationResult, b as MigrationStatus, O as OrderBySpec, P as PoolStats, S as SelectOptions, T as TransactionContext, h as TransactionIsolationLevel, f as TransactionOptions, U as UpdateOptions, e as UpsertOptions, i as WHERE_OPERATORS, W as WhereClause, j as WhereCondition, k as WhereOperator } from '../migration-R06fsTrz.js';
|
|
4
4
|
export { A as AlterTableOperation, a as AlterTableOptions, b as ColumnDefinition, C as CreateTableOptions, D as DropTableOptions, I as IndexDefinition, c as TableConstraint, T as TableDefinition } from '../schema-BIQ0YQZ_.js';
|
|
5
5
|
export { a as DatabaseError, D as DatabaseErrorKind, b as DatabaseErrorOptions, c as createDatabaseError, i as isApplicationError, d as isDatabaseError } from '../error-BrdknH2s.js';
|
|
6
6
|
import 'drizzle-orm';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextlyhq/adapter-drizzle",
|
|
3
|
-
"version": "0.0.2-alpha.
|
|
3
|
+
"version": "0.0.2-alpha.65",
|
|
4
4
|
"description": "Shared Drizzle ORM adapter logic for Nextly database adapters",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"typescript": "^5.9.3",
|
|
53
53
|
"vite-tsconfig-paths": "^5.1.4",
|
|
54
54
|
"vitest": "^4.1.0",
|
|
55
|
-
"@nextlyhq/eslint-config": "0.0.2-alpha.
|
|
56
|
-
"@nextlyhq/tsconfig": "0.0.2-alpha.
|
|
55
|
+
"@nextlyhq/eslint-config": "0.0.2-alpha.65",
|
|
56
|
+
"@nextlyhq/tsconfig": "0.0.2-alpha.65"
|
|
57
57
|
},
|
|
58
58
|
"repository": {
|
|
59
59
|
"type": "git",
|