drizzle-orm 0.25.2 → 0.25.3-4cc2d87
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/pg/index.cjs +234 -1
- package/aws-data-api/pg/index.cjs.map +1 -1
- package/aws-data-api/pg/index.d.ts +5 -6
- package/aws-data-api/pg/index.mjs +228 -1
- package/aws-data-api/pg/index.mjs.map +1 -1
- package/aws-data-api/pg/migrator.cjs +13 -1
- package/aws-data-api/pg/migrator.cjs.map +1 -1
- package/aws-data-api/pg/migrator.d.ts +5 -6
- package/aws-data-api/pg/migrator.mjs +11 -1
- package/aws-data-api/pg/migrator.mjs.map +1 -1
- package/better-sqlite3/index.cjs +119 -1
- package/better-sqlite3/index.cjs.map +1 -1
- package/better-sqlite3/index.d.ts +14 -12
- package/better-sqlite3/index.mjs +114 -1
- package/better-sqlite3/index.mjs.map +1 -1
- package/better-sqlite3/migrator.cjs +13 -1
- package/better-sqlite3/migrator.cjs.map +1 -1
- package/better-sqlite3/migrator.d.ts +5 -5
- package/better-sqlite3/migrator.mjs +11 -1
- package/better-sqlite3/migrator.mjs.map +1 -1
- package/bun-sqlite/index.cjs +126 -1
- package/bun-sqlite/index.cjs.map +1 -1
- package/bun-sqlite/index.d.ts +14 -12
- package/bun-sqlite/index.mjs +121 -1
- package/bun-sqlite/index.mjs.map +1 -1
- package/bun-sqlite/migrator.cjs +13 -1
- package/bun-sqlite/migrator.cjs.map +1 -1
- package/bun-sqlite/migrator.d.ts +5 -5
- package/bun-sqlite/migrator.mjs +11 -1
- package/bun-sqlite/migrator.mjs.map +1 -1
- package/{column.d-8b137277.d.ts → column.d-c31e7ad3.d.ts} +77 -6
- package/d1/index.cjs +116 -1
- package/d1/index.cjs.map +1 -1
- package/d1/index.d.ts +15 -12
- package/d1/index.mjs +111 -1
- package/d1/index.mjs.map +1 -1
- package/d1/migrator.cjs +13 -1
- package/d1/migrator.cjs.map +1 -1
- package/d1/migrator.d.ts +5 -5
- package/d1/migrator.mjs +11 -1
- package/d1/migrator.mjs.map +1 -1
- package/{db.d-ae495c35.d.ts → db.d-a2311092.d.ts} +121 -44
- package/{db.d-66553b9e.d.ts → db.d-bc9a1d6c.d.ts} +193 -16
- package/driver.d-17ca4c15.d.ts +8 -0
- package/driver.d-300ddb0e.d.ts +64 -0
- package/driver.d-45e56643.d.ts +60 -0
- package/driver.d-64f2125c.d.ts +8 -0
- package/driver.d-7fde2e9d.d.ts +55 -0
- package/driver.d-9d703b84.d.ts +8 -0
- package/driver.d-b2b94bf9.d.ts +46 -0
- package/driver.d-b70ee7ee.d.ts +55 -0
- package/driver.d-dea23ee6.d.ts +8 -0
- package/driver.d-e54af17b.d.ts +52 -0
- package/driver.d-eb490c91.d.ts +9 -0
- package/driver.d-ef6fa2df.d.ts +14 -0
- package/errors-bb636d84.mjs +19 -0
- package/errors-bb636d84.mjs.map +1 -0
- package/errors-d0192d62.cjs +22 -0
- package/errors-d0192d62.cjs.map +1 -0
- package/index.cjs +105 -1
- package/index.cjs.map +1 -1
- package/index.d.ts +16 -432
- package/index.mjs +3 -1
- package/index.mjs.map +1 -1
- package/knex/index.cjs +2 -1
- package/knex/index.cjs.map +1 -1
- package/knex/index.d.ts +1 -1
- package/kysely/index.cjs +2 -1
- package/kysely/index.cjs.map +1 -1
- package/kysely/index.d.ts +1 -1
- package/libsql/index.cjs +155 -1
- package/libsql/index.cjs.map +1 -1
- package/libsql/index.d.ts +14 -12
- package/libsql/index.mjs +150 -1
- package/libsql/index.mjs.map +1 -1
- package/libsql/migrator.cjs +13 -1
- package/libsql/migrator.cjs.map +1 -1
- package/libsql/migrator.d.ts +5 -5
- package/libsql/migrator.mjs +11 -1
- package/libsql/migrator.mjs.map +1 -1
- package/logger-caa1ca6e.cjs +34 -0
- package/logger-caa1ca6e.cjs.map +1 -0
- package/logger-caf75bde.mjs +30 -0
- package/logger-caf75bde.mjs.map +1 -0
- package/migrator.cjs +48 -1
- package/migrator.cjs.map +1 -1
- package/migrator.mjs +46 -1
- package/migrator.mjs.map +1 -1
- package/mysql-core/index.cjs +1004 -1
- package/mysql-core/index.cjs.map +1 -1
- package/mysql-core/index.d.ts +347 -347
- package/mysql-core/index.mjs +869 -1
- package/mysql-core/index.mjs.map +1 -1
- package/mysql2/index.cjs +230 -1
- package/mysql2/index.cjs.map +1 -1
- package/mysql2/index.d.ts +5 -6
- package/mysql2/index.mjs +223 -1
- package/mysql2/index.mjs.map +1 -1
- package/mysql2/migrator.cjs +13 -1
- package/mysql2/migrator.cjs.map +1 -1
- package/mysql2/migrator.d.ts +5 -6
- package/mysql2/migrator.mjs +11 -1
- package/mysql2/migrator.mjs.map +1 -1
- package/neon-serverless/index.cjs +155 -1
- package/neon-serverless/index.cjs.map +1 -1
- package/neon-serverless/index.d.ts +5 -6
- package/neon-serverless/index.mjs +149 -1
- package/neon-serverless/index.mjs.map +1 -1
- package/neon-serverless/migrator.cjs +13 -1
- package/neon-serverless/migrator.cjs.map +1 -1
- package/neon-serverless/migrator.d.ts +5 -6
- package/neon-serverless/migrator.mjs +11 -1
- package/neon-serverless/migrator.mjs.map +1 -1
- package/node-postgres/index.cjs +157 -1
- package/node-postgres/index.cjs.map +1 -1
- package/node-postgres/index.d.ts +5 -6
- package/node-postgres/index.mjs +151 -1
- package/node-postgres/index.mjs.map +1 -1
- package/node-postgres/migrator.cjs +13 -1
- package/node-postgres/migrator.cjs.map +1 -1
- package/node-postgres/migrator.d.ts +5 -6
- package/node-postgres/migrator.mjs +11 -1
- package/node-postgres/migrator.mjs.map +1 -1
- package/package.json +97 -34
- package/pg-core/index.cjs +652 -1
- package/pg-core/index.cjs.map +1 -1
- package/pg-core/index.d.ts +13 -7
- package/pg-core/index.mjs +501 -1
- package/pg-core/index.mjs.map +1 -1
- package/planetscale-serverless/index.cjs +111 -1
- package/planetscale-serverless/index.cjs.map +1 -1
- package/planetscale-serverless/index.d.ts +5 -6
- package/planetscale-serverless/index.mjs +106 -1
- package/planetscale-serverless/index.mjs.map +1 -1
- package/planetscale-serverless/migrator.cjs +13 -1
- package/planetscale-serverless/migrator.cjs.map +1 -1
- package/planetscale-serverless/migrator.d.ts +5 -6
- package/planetscale-serverless/migrator.mjs +11 -1
- package/planetscale-serverless/migrator.mjs.map +1 -1
- package/postgres-js/index.cjs +113 -1
- package/postgres-js/index.cjs.map +1 -1
- package/postgres-js/index.d.ts +5 -6
- package/postgres-js/index.mjs +108 -1
- package/postgres-js/index.mjs.map +1 -1
- package/postgres-js/migrator.cjs +13 -1
- package/postgres-js/migrator.cjs.map +1 -1
- package/postgres-js/migrator.d.ts +5 -6
- package/postgres-js/migrator.mjs +11 -1
- package/postgres-js/migrator.mjs.map +1 -1
- package/query-promise.d-e370e0a9.d.ts +617 -0
- package/relations-47eb5c5f.mjs +2954 -0
- package/relations-47eb5c5f.mjs.map +1 -0
- package/relations-5e2d30dd.cjs +3117 -0
- package/relations-5e2d30dd.cjs.map +1 -0
- package/{select.types.d-c3e86d45.d.ts → select.types.d-34d7f74e.d.ts} +1 -1
- package/{select.types.d-adb82002.d.ts → select.types.d-ae2f8e44.d.ts} +58 -14
- package/session-483ed08d.mjs +1263 -0
- package/session-483ed08d.mjs.map +1 -0
- package/session-6bd76405.cjs +362 -0
- package/session-6bd76405.cjs.map +1 -0
- package/session-a90df8a2.cjs +1252 -0
- package/session-a90df8a2.cjs.map +1 -0
- package/session-b99382a2.mjs +1223 -0
- package/session-b99382a2.mjs.map +1 -0
- package/session-c62f6348.cjs +1298 -0
- package/session-c62f6348.cjs.map +1 -0
- package/session-e8745392.mjs +351 -0
- package/session-e8745392.mjs.map +1 -0
- package/sql-js/index.cjs +175 -1
- package/sql-js/index.cjs.map +1 -1
- package/sql-js/index.d.ts +14 -12
- package/sql-js/index.mjs +170 -1
- package/sql-js/index.mjs.map +1 -1
- package/sql-js/migrator.cjs +13 -1
- package/sql-js/migrator.cjs.map +1 -1
- package/sql-js/migrator.d.ts +5 -5
- package/sql-js/migrator.mjs +11 -1
- package/sql-js/migrator.mjs.map +1 -1
- package/sqlite-core/index.cjs +516 -1
- package/sqlite-core/index.cjs.map +1 -1
- package/sqlite-core/index.d.ts +6 -5
- package/sqlite-core/index.mjs +441 -1
- package/sqlite-core/index.mjs.map +1 -1
- package/sqlite-proxy/index.cjs +118 -1
- package/sqlite-proxy/index.cjs.map +1 -1
- package/sqlite-proxy/index.d.ts +12 -11
- package/sqlite-proxy/index.mjs +113 -1
- package/sqlite-proxy/index.mjs.map +1 -1
- package/sqlite-proxy/migrator.cjs +25 -2
- package/sqlite-proxy/migrator.cjs.map +1 -1
- package/sqlite-proxy/migrator.d.ts +5 -5
- package/sqlite-proxy/migrator.mjs +23 -2
- package/sqlite-proxy/migrator.mjs.map +1 -1
- package/version.cjs +9 -1
- package/version.cjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.mjs +6 -1
- package/version.mjs.map +1 -1
- package/README.md +0 -150
- package/column-builder-592f0191.mjs +0 -2
- package/column-builder-592f0191.mjs.map +0 -1
- package/column-builder-b48639f3.cjs +0 -2
- package/column-builder-b48639f3.cjs.map +0 -1
- package/driver.d-0158cd93.d.ts +0 -11
- package/driver.d-1f73a4a9.d.ts +0 -70
- package/driver.d-2e907d12.d.ts +0 -17
- package/driver.d-3781598a.d.ts +0 -11
- package/driver.d-3a8adf2a.d.ts +0 -61
- package/driver.d-59580d08.d.ts +0 -11
- package/driver.d-5f3fc125.d.ts +0 -12
- package/driver.d-693f7f9f.d.ts +0 -56
- package/driver.d-6c43e393.d.ts +0 -60
- package/driver.d-b00fc6ec.d.ts +0 -57
- package/driver.d-e4bd120b.d.ts +0 -47
- package/driver.d-f4b5b390.d.ts +0 -11
- package/index-59b7992d.cjs +0 -2
- package/index-59b7992d.cjs.map +0 -1
- package/index-b71998f1.mjs +0 -2
- package/index-b71998f1.mjs.map +0 -1
- package/logger-04bad527.cjs +0 -2
- package/logger-04bad527.cjs.map +0 -1
- package/logger-2598bf05.mjs +0 -2
- package/logger-2598bf05.mjs.map +0 -1
- package/logger.d-37185354.d.ts +0 -21
- package/query-builder-2f2e8229.cjs +0 -2
- package/query-builder-2f2e8229.cjs.map +0 -1
- package/query-builder-2fcde2f0.mjs +0 -2
- package/query-builder-2fcde2f0.mjs.map +0 -1
- package/query-promise-2c5b43ab.cjs +0 -2
- package/query-promise-2c5b43ab.cjs.map +0 -1
- package/query-promise-a65edd44.mjs +0 -2
- package/query-promise-a65edd44.mjs.map +0 -1
- package/query-promise.d-a8af8583.d.ts +0 -9
- package/session-8a621f09.mjs +0 -8
- package/session-8a621f09.mjs.map +0 -1
- package/session-b6939bab.cjs +0 -14
- package/session-b6939bab.cjs.map +0 -1
- package/session-b977ce56.mjs +0 -14
- package/session-b977ce56.mjs.map +0 -1
- package/session-c891400d.mjs +0 -8
- package/session-c891400d.mjs.map +0 -1
- package/session-e6db6732.cjs +0 -8
- package/session-e6db6732.cjs.map +0 -1
- package/session-ef1ef979.cjs +0 -8
- package/session-ef1ef979.cjs.map +0 -1
- package/utils-9d882195.cjs +0 -2
- package/utils-9d882195.cjs.map +0 -1
- package/utils-e6870670.mjs +0 -2
- package/utils-e6870670.mjs.map +0 -1
package/index.d.ts
CHANGED
|
@@ -1,433 +1,7 @@
|
|
|
1
|
-
import { A as AnyColumn,
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export { Q as QueryPromise } from './query-promise.d-
|
|
5
|
-
|
|
6
|
-
declare function bindIfParam(value: unknown, column: AnyColumn | SQL.Aliased): SQLChunk;
|
|
7
|
-
/**
|
|
8
|
-
* Test that two values are equal.
|
|
9
|
-
*
|
|
10
|
-
* Remember that the SQL standard dictates that
|
|
11
|
-
* two NULL values are not equal, so if you want to test
|
|
12
|
-
* whether a value is null, you may want to use
|
|
13
|
-
* `isNull` instead.
|
|
14
|
-
*
|
|
15
|
-
* ## Examples
|
|
16
|
-
*
|
|
17
|
-
* ```ts
|
|
18
|
-
* // Select cars made by Ford
|
|
19
|
-
* db.select().from(cars)
|
|
20
|
-
* .where(eq(cars.make, 'Ford'))
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* @see isNull for a way to test equality to NULL.
|
|
24
|
-
*/
|
|
25
|
-
declare function eq<T>(left: SQL.Aliased<T>, right: T | Placeholder | SQLWrapper | AnyColumn): SQL;
|
|
26
|
-
declare function eq<TColumn extends AnyColumn>(left: TColumn, right: GetColumnData<TColumn, 'raw'> | Placeholder | SQLWrapper | AnyColumn): SQL;
|
|
27
|
-
/**
|
|
28
|
-
* Test that two values are not equal.
|
|
29
|
-
*
|
|
30
|
-
* Remember that the SQL standard dictates that
|
|
31
|
-
* two NULL values are not equal, so if you want to test
|
|
32
|
-
* whether a value is not null, you may want to use
|
|
33
|
-
* `isNotNull` instead.
|
|
34
|
-
*
|
|
35
|
-
* ## Examples
|
|
36
|
-
*
|
|
37
|
-
* ```ts
|
|
38
|
-
* // Select cars not made by Ford
|
|
39
|
-
* db.select().from(cars)
|
|
40
|
-
* .where(ne(cars.make, 'Ford'))
|
|
41
|
-
* ```
|
|
42
|
-
*
|
|
43
|
-
* @see isNotNull for a way to test whether a value is not null.
|
|
44
|
-
*/
|
|
45
|
-
declare function ne<T>(left: SQL.Aliased<T>, right: T | Placeholder | SQLWrapper | AnyColumn): SQL;
|
|
46
|
-
declare function ne<TColumn extends AnyColumn>(left: TColumn, right: GetColumnData<TColumn, 'raw'> | Placeholder | SQLWrapper | AnyColumn): SQL;
|
|
47
|
-
/**
|
|
48
|
-
* Combine a list of conditions with the `and` operator. Conditions
|
|
49
|
-
* that are equal `undefined` are automatically ignored.
|
|
50
|
-
*
|
|
51
|
-
* ## Examples
|
|
52
|
-
*
|
|
53
|
-
* ```ts
|
|
54
|
-
* db.select().from(cars)
|
|
55
|
-
* .where(
|
|
56
|
-
* and(
|
|
57
|
-
* eq(cars.make, 'Volvo'),
|
|
58
|
-
* eq(cars.year, 1950),
|
|
59
|
-
* )
|
|
60
|
-
* )
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
declare function and(...conditions: (SQL | undefined)[]): SQL | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* Combine a list of conditions with the `or` operator. Conditions
|
|
66
|
-
* that are equal `undefined` are automatically ignored.
|
|
67
|
-
*
|
|
68
|
-
* ## Examples
|
|
69
|
-
*
|
|
70
|
-
* ```ts
|
|
71
|
-
* db.select().from(cars)
|
|
72
|
-
* .where(
|
|
73
|
-
* or(
|
|
74
|
-
* eq(cars.make, 'GM'),
|
|
75
|
-
* eq(cars.make, 'Ford'),
|
|
76
|
-
* )
|
|
77
|
-
* )
|
|
78
|
-
* ```
|
|
79
|
-
*/
|
|
80
|
-
declare function or(...conditions: (SQL | undefined)[]): SQL | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* Negate the meaning of an expression using the `not` keyword.
|
|
83
|
-
*
|
|
84
|
-
* ## Examples
|
|
85
|
-
*
|
|
86
|
-
* ```ts
|
|
87
|
-
* // Select cars _not_ made by GM or Ford.
|
|
88
|
-
* db.select().from(cars)
|
|
89
|
-
* .where(not(inArray(cars.make, ['GM', 'Ford'])))
|
|
90
|
-
* ```
|
|
91
|
-
*/
|
|
92
|
-
declare function not(condition: SQL): SQL;
|
|
93
|
-
/**
|
|
94
|
-
* Test that the first expression passed is greater than
|
|
95
|
-
* the second expression.
|
|
96
|
-
*
|
|
97
|
-
* ## Examples
|
|
98
|
-
*
|
|
99
|
-
* ```ts
|
|
100
|
-
* // Select cars made after 2000.
|
|
101
|
-
* db.select().from(cars)
|
|
102
|
-
* .where(gt(cars.year, 2000))
|
|
103
|
-
* ```
|
|
104
|
-
*
|
|
105
|
-
* @see gte for greater-than-or-equal
|
|
106
|
-
*/
|
|
107
|
-
declare function gt<T>(left: SQL.Aliased<T>, right: T | Placeholder | SQLWrapper | AnyColumn): SQL;
|
|
108
|
-
declare function gt<TColumn extends AnyColumn>(left: TColumn, right: GetColumnData<TColumn, 'raw'> | Placeholder | SQLWrapper | AnyColumn): SQL;
|
|
109
|
-
/**
|
|
110
|
-
* Test that the first expression passed is greater than
|
|
111
|
-
* or equal to the second expression. Use `gt` to
|
|
112
|
-
* test whether an expression is strictly greater
|
|
113
|
-
* than another.
|
|
114
|
-
*
|
|
115
|
-
* ## Examples
|
|
116
|
-
*
|
|
117
|
-
* ```ts
|
|
118
|
-
* // Select cars made on or after 2000.
|
|
119
|
-
* db.select().from(cars)
|
|
120
|
-
* .where(gte(cars.year, 2000))
|
|
121
|
-
* ```
|
|
122
|
-
*
|
|
123
|
-
* @see gt for a strictly greater-than condition
|
|
124
|
-
*/
|
|
125
|
-
declare function gte<T>(left: SQL.Aliased<T>, right: T | Placeholder | SQLWrapper | AnyColumn): SQL;
|
|
126
|
-
declare function gte<TColumn extends AnyColumn>(left: TColumn, right: GetColumnData<TColumn, 'raw'> | Placeholder | SQLWrapper | AnyColumn): SQL;
|
|
127
|
-
/**
|
|
128
|
-
* Test that the first expression passed is less than
|
|
129
|
-
* the second expression.
|
|
130
|
-
*
|
|
131
|
-
* ## Examples
|
|
132
|
-
*
|
|
133
|
-
* ```ts
|
|
134
|
-
* // Select cars made before 2000.
|
|
135
|
-
* db.select().from(cars)
|
|
136
|
-
* .where(lt(cars.year, 2000))
|
|
137
|
-
* ```
|
|
138
|
-
*
|
|
139
|
-
* @see lte for greater-than-or-equal
|
|
140
|
-
*/
|
|
141
|
-
declare function lt<T>(left: SQL.Aliased<T>, right: T | Placeholder | SQLWrapper | AnyColumn): SQL;
|
|
142
|
-
declare function lt<TColumn extends AnyColumn>(left: TColumn, right: GetColumnData<TColumn, 'raw'> | Placeholder | SQLWrapper | AnyColumn): SQL;
|
|
143
|
-
/**
|
|
144
|
-
* Test that the first expression passed is less than
|
|
145
|
-
* or equal to the second expression.
|
|
146
|
-
*
|
|
147
|
-
* ## Examples
|
|
148
|
-
*
|
|
149
|
-
* ```ts
|
|
150
|
-
* // Select cars made before 2000.
|
|
151
|
-
* db.select().from(cars)
|
|
152
|
-
* .where(lte(cars.year, 2000))
|
|
153
|
-
* ```
|
|
154
|
-
*
|
|
155
|
-
* @see lt for a strictly less-than condition
|
|
156
|
-
*/
|
|
157
|
-
declare function lte<T>(left: SQL.Aliased<T>, right: T | Placeholder | SQLWrapper | AnyColumn): SQL;
|
|
158
|
-
declare function lte<TColumn extends AnyColumn>(left: TColumn, right: GetColumnData<TColumn, 'raw'> | Placeholder | SQLWrapper | AnyColumn): SQL;
|
|
159
|
-
/**
|
|
160
|
-
* Test whether the first parameter, a column or expression,
|
|
161
|
-
* has a value from a list passed as the second argument.
|
|
162
|
-
*
|
|
163
|
-
* ## Throws
|
|
164
|
-
*
|
|
165
|
-
* The argument passed in the second array can’t be empty:
|
|
166
|
-
* if an empty is provided, this method will throw.
|
|
167
|
-
*
|
|
168
|
-
* ## Examples
|
|
169
|
-
*
|
|
170
|
-
* ```ts
|
|
171
|
-
* // Select cars made by Ford or GM.
|
|
172
|
-
* db.select().from(cars)
|
|
173
|
-
* .where(inArray(cars.make, ['Ford', 'GM']))
|
|
174
|
-
* ```
|
|
175
|
-
*
|
|
176
|
-
* @see notInArray for the inverse of this test
|
|
177
|
-
*/
|
|
178
|
-
declare function inArray<T>(column: SQL.Aliased<T>, values: (T | Placeholder)[] | Placeholder | SQLWrapper): SQL;
|
|
179
|
-
declare function inArray<TColumn extends AnyColumn>(column: TColumn, values: (GetColumnData<TColumn, 'raw'> | Placeholder)[] | Placeholder | SQLWrapper): SQL;
|
|
180
|
-
/**
|
|
181
|
-
* Test whether the first parameter, a column or expression,
|
|
182
|
-
* has a value that is not present in a list passed as the
|
|
183
|
-
* second argument.
|
|
184
|
-
*
|
|
185
|
-
* ## Throws
|
|
186
|
-
*
|
|
187
|
-
* The argument passed in the second array can’t be empty:
|
|
188
|
-
* if an empty is provided, this method will throw.
|
|
189
|
-
*
|
|
190
|
-
* ## Examples
|
|
191
|
-
*
|
|
192
|
-
* ```ts
|
|
193
|
-
* // Select cars made by any company except Ford or GM.
|
|
194
|
-
* db.select().from(cars)
|
|
195
|
-
* .where(notInArray(cars.make, ['Ford', 'GM']))
|
|
196
|
-
* ```
|
|
197
|
-
*
|
|
198
|
-
* @see inArray for the inverse of this test
|
|
199
|
-
*/
|
|
200
|
-
declare function notInArray<T>(column: SQL.Aliased<T>, values: (T | Placeholder)[] | Placeholder | SQLWrapper): SQL;
|
|
201
|
-
declare function notInArray<TColumn extends AnyColumn>(column: TColumn, values: (GetColumnData<TColumn, 'raw'> | Placeholder)[] | Placeholder | SQLWrapper): SQL;
|
|
202
|
-
/**
|
|
203
|
-
* Test whether an expression is NULL. By the SQL standard,
|
|
204
|
-
* NULL is neither equal nor not equal to itself, so
|
|
205
|
-
* it's recommended to use `isNull` and `notIsNull` for
|
|
206
|
-
* comparisons to NULL.
|
|
207
|
-
*
|
|
208
|
-
* ## Examples
|
|
209
|
-
*
|
|
210
|
-
* ```ts
|
|
211
|
-
* // Select cars that have no discontinuedAt date.
|
|
212
|
-
* db.select().from(cars)
|
|
213
|
-
* .where(isNull(cars.discontinuedAt))
|
|
214
|
-
* ```
|
|
215
|
-
*
|
|
216
|
-
* @see isNotNull for the inverse of this test
|
|
217
|
-
*/
|
|
218
|
-
declare function isNull(column: AnyColumn | Placeholder | SQLWrapper): SQL;
|
|
219
|
-
/**
|
|
220
|
-
* Test whether an expression is not NULL. By the SQL standard,
|
|
221
|
-
* NULL is neither equal nor not equal to itself, so
|
|
222
|
-
* it's recommended to use `isNull` and `notIsNull` for
|
|
223
|
-
* comparisons to NULL.
|
|
224
|
-
*
|
|
225
|
-
* ## Examples
|
|
226
|
-
*
|
|
227
|
-
* ```ts
|
|
228
|
-
* // Select cars that have been discontinued.
|
|
229
|
-
* db.select().from(cars)
|
|
230
|
-
* .where(isNotNull(cars.discontinuedAt))
|
|
231
|
-
* ```
|
|
232
|
-
*
|
|
233
|
-
* @see isNull for the inverse of this test
|
|
234
|
-
*/
|
|
235
|
-
declare function isNotNull(column: AnyColumn | Placeholder | SQLWrapper): SQL;
|
|
236
|
-
/**
|
|
237
|
-
* Test whether a subquery evaluates to have any rows.
|
|
238
|
-
*
|
|
239
|
-
* ## Examples
|
|
240
|
-
*
|
|
241
|
-
* ```ts
|
|
242
|
-
* // Users whose `homeCity` column has a match in a cities
|
|
243
|
-
* // table.
|
|
244
|
-
* db
|
|
245
|
-
* .select()
|
|
246
|
-
* .from(users)
|
|
247
|
-
* .where(
|
|
248
|
-
* exists(db.select()
|
|
249
|
-
* .from(cities)
|
|
250
|
-
* .where(eq(users.homeCity, cities.id))),
|
|
251
|
-
* );
|
|
252
|
-
* ```
|
|
253
|
-
*
|
|
254
|
-
* @see notExists for the inverse of this test
|
|
255
|
-
*/
|
|
256
|
-
declare function exists(subquery: SQLWrapper): SQL;
|
|
257
|
-
/**
|
|
258
|
-
* Test whether a subquery doesn't include any result
|
|
259
|
-
* rows.
|
|
260
|
-
*
|
|
261
|
-
* ## Examples
|
|
262
|
-
*
|
|
263
|
-
* ```ts
|
|
264
|
-
* // Users whose `homeCity` column doesn't match
|
|
265
|
-
* // a row in the cities table.
|
|
266
|
-
* db
|
|
267
|
-
* .select()
|
|
268
|
-
* .from(users)
|
|
269
|
-
* .where(
|
|
270
|
-
* notExists(db.select()
|
|
271
|
-
* .from(cities)
|
|
272
|
-
* .where(eq(users.homeCity, cities.id))),
|
|
273
|
-
* );
|
|
274
|
-
* ```
|
|
275
|
-
*
|
|
276
|
-
* @see exists for the inverse of this test
|
|
277
|
-
*/
|
|
278
|
-
declare function notExists(subquery: SQLWrapper): SQL;
|
|
279
|
-
/**
|
|
280
|
-
* Test whether an expression is between two values. This
|
|
281
|
-
* is an easier way to express range tests, which would be
|
|
282
|
-
* expressed mathematically as `x <= a <= y` but in SQL
|
|
283
|
-
* would have to be like `a >= x AND a <= y`.
|
|
284
|
-
*
|
|
285
|
-
* Between is inclusive of the endpoints: if `column`
|
|
286
|
-
* is equal to `min` or `max`, it will be TRUE.
|
|
287
|
-
*
|
|
288
|
-
* ## Examples
|
|
289
|
-
*
|
|
290
|
-
* ```ts
|
|
291
|
-
* // Select cars made between 1990 and 2000
|
|
292
|
-
* db.select().from(cars)
|
|
293
|
-
* .where(between(cars.year, 1990, 2000))
|
|
294
|
-
* ```
|
|
295
|
-
*
|
|
296
|
-
* @see notBetween for the inverse of this test
|
|
297
|
-
*/
|
|
298
|
-
declare function between<T>(column: SQL.Aliased, min: T | Placeholder | SQLWrapper, max: T | Placeholder | SQLWrapper): SQL;
|
|
299
|
-
declare function between<TColumn extends AnyColumn>(column: TColumn, min: GetColumnData<TColumn, 'raw'> | Placeholder | SQLWrapper, max: GetColumnData<TColumn, 'raw'> | Placeholder | SQLWrapper): SQL;
|
|
300
|
-
/**
|
|
301
|
-
* Test whether an expression is not between two values.
|
|
302
|
-
*
|
|
303
|
-
* This, like `between`, includes its endpoints, so if
|
|
304
|
-
* the `column` is equal to `min` or `max`, in this case
|
|
305
|
-
* it will evaluate to FALSE.
|
|
306
|
-
*
|
|
307
|
-
* ## Examples
|
|
308
|
-
*
|
|
309
|
-
* ```ts
|
|
310
|
-
* // Exclude cars made in the 1970s
|
|
311
|
-
* db.select().from(cars)
|
|
312
|
-
* .where(notBetween(cars.year, 1970, 1979))
|
|
313
|
-
* ```
|
|
314
|
-
*
|
|
315
|
-
* @see between for the inverse of this test
|
|
316
|
-
*/
|
|
317
|
-
declare function notBetween<T>(column: SQL.Aliased, min: T | Placeholder | SQLWrapper, max: T | Placeholder | SQLWrapper): SQL;
|
|
318
|
-
declare function notBetween<TColumn extends AnyColumn>(column: TColumn, min: GetColumnData<TColumn, 'raw'> | Placeholder | SQLWrapper, max: GetColumnData<TColumn, 'raw'> | Placeholder | SQLWrapper): SQL;
|
|
319
|
-
/**
|
|
320
|
-
* Compare a column to a pattern, which can include `%` and `_`
|
|
321
|
-
* characters to match multiple variations. Including `%`
|
|
322
|
-
* in the pattern matches zero or more characters, and including
|
|
323
|
-
* `_` will match a single character.
|
|
324
|
-
*
|
|
325
|
-
* ## Examples
|
|
326
|
-
*
|
|
327
|
-
* ```ts
|
|
328
|
-
* // Select all cars with 'Turbo' in their names.
|
|
329
|
-
* db.select().from(cars)
|
|
330
|
-
* .where(like(cars.name, '%Turbo%'))
|
|
331
|
-
* ```
|
|
332
|
-
*
|
|
333
|
-
* @see ilike for a case-insensitive version of this condition
|
|
334
|
-
*/
|
|
335
|
-
declare function like(column: AnyColumn, value: string | Placeholder | SQLWrapper): SQL;
|
|
336
|
-
/**
|
|
337
|
-
* The inverse of like - this tests that a given column
|
|
338
|
-
* does not match a pattern, which can include `%` and `_`
|
|
339
|
-
* characters to match multiple variations. Including `%`
|
|
340
|
-
* in the pattern matches zero or more characters, and including
|
|
341
|
-
* `_` will match a single character.
|
|
342
|
-
*
|
|
343
|
-
* ## Examples
|
|
344
|
-
*
|
|
345
|
-
* ```ts
|
|
346
|
-
* // Select all cars that don't have "ROver" in their name.
|
|
347
|
-
* db.select().from(cars)
|
|
348
|
-
* .where(notLike(cars.name, '%Rover%'))
|
|
349
|
-
* ```
|
|
350
|
-
*
|
|
351
|
-
* @see like for the inverse condition
|
|
352
|
-
* @see notIlike for a case-insensitive version of this condition
|
|
353
|
-
*/
|
|
354
|
-
declare function notLike(column: AnyColumn, value: string | Placeholder | SQLWrapper): SQL;
|
|
355
|
-
/**
|
|
356
|
-
* Case-insensitively compare a column to a pattern,
|
|
357
|
-
* which can include `%` and `_`
|
|
358
|
-
* characters to match multiple variations. Including `%`
|
|
359
|
-
* in the pattern matches zero or more characters, and including
|
|
360
|
-
* `_` will match a single character.
|
|
361
|
-
*
|
|
362
|
-
* Unlike like, this performs a case-insensitive comparison.
|
|
363
|
-
*
|
|
364
|
-
* ## Examples
|
|
365
|
-
*
|
|
366
|
-
* ```ts
|
|
367
|
-
* // Select all cars with 'Turbo' in their names.
|
|
368
|
-
* db.select().from(cars)
|
|
369
|
-
* .where(ilike(cars.name, '%Turbo%'))
|
|
370
|
-
* ```
|
|
371
|
-
*
|
|
372
|
-
* @see like for a case-sensitive version of this condition
|
|
373
|
-
*/
|
|
374
|
-
declare function ilike(column: AnyColumn, value: string | Placeholder | SQLWrapper): SQL;
|
|
375
|
-
/**
|
|
376
|
-
* The inverse of ilike - this case-insensitively tests that a given column
|
|
377
|
-
* does not match a pattern, which can include `%` and `_`
|
|
378
|
-
* characters to match multiple variations. Including `%`
|
|
379
|
-
* in the pattern matches zero or more characters, and including
|
|
380
|
-
* `_` will match a single character.
|
|
381
|
-
*
|
|
382
|
-
* ## Examples
|
|
383
|
-
*
|
|
384
|
-
* ```ts
|
|
385
|
-
* // Select all cars that don't have "Rover" in their name.
|
|
386
|
-
* db.select().from(cars)
|
|
387
|
-
* .where(notLike(cars.name, '%Rover%'))
|
|
388
|
-
* ```
|
|
389
|
-
*
|
|
390
|
-
* @see ilike for the inverse condition
|
|
391
|
-
* @see notLike for a case-sensitive version of this condition
|
|
392
|
-
*/
|
|
393
|
-
declare function notIlike(column: AnyColumn, value: string | Placeholder | SQLWrapper): SQL;
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Used in sorting, this specifies that the given
|
|
397
|
-
* column or expression should be sorted in ascending
|
|
398
|
-
* order. By the SQL standard, ascending order is the
|
|
399
|
-
* default, so it is not usually necessary to specify
|
|
400
|
-
* ascending sort order.
|
|
401
|
-
*
|
|
402
|
-
* ## Examples
|
|
403
|
-
*
|
|
404
|
-
* ```ts
|
|
405
|
-
* // Return cars, starting with the oldest models
|
|
406
|
-
* // and going in ascending order to the newest.
|
|
407
|
-
* db.select().from(cars)
|
|
408
|
-
* .orderBy(asc(cars.year));
|
|
409
|
-
* ```
|
|
410
|
-
*
|
|
411
|
-
* @see desc to sort in descending order
|
|
412
|
-
*/
|
|
413
|
-
declare function asc(column: AnyColumn | SQLWrapper): SQL;
|
|
414
|
-
/**
|
|
415
|
-
* Used in sorting, this specifies that the given
|
|
416
|
-
* column or expression should be sorted in descending
|
|
417
|
-
* order.
|
|
418
|
-
*
|
|
419
|
-
* ## Examples
|
|
420
|
-
*
|
|
421
|
-
* ```ts
|
|
422
|
-
* // Select users, with the most recently created
|
|
423
|
-
* // records coming first.
|
|
424
|
-
* db.select().from(users)
|
|
425
|
-
* .orderBy(desc(users.createdAt));
|
|
426
|
-
* ```
|
|
427
|
-
*
|
|
428
|
-
* @see asc to sort in ascending order
|
|
429
|
-
*/
|
|
430
|
-
declare function desc(column: AnyColumn | SQLWrapper): SQL;
|
|
1
|
+
import { A as AnyColumn, T as Table, V as View, S as SQL } from './column.d-c31e7ad3.js';
|
|
2
|
+
export { p as AnyColumnBuilder, f as AnyColumnHKT, g as AnyColumnHKTBase, h as AnyColumnKind, aj as AnyTable, ak as AnyTableHKT, al as AnyTableHKTBase, am as AnyTableKind, ax as Assume, B as BuildColumn, r as BuildColumns, E as BuildQueryConfig, s as ChangeColumnTableName, z as Chunk, e as Column, C as ColumnBaseConfig, o as ColumnBuilder, i as ColumnBuilderBaseConfig, j as ColumnBuilderConfig, m as ColumnBuilderHKT, k as ColumnBuilderHKTBase, l as ColumnBuilderKind, n as ColumnBuilderRuntimeConfig, a as ColumnConfig, d as ColumnHKT, b as ColumnHKTBase, c as ColumnKind, aK as ColumnsSelection, aG as ColumnsWithTable, u as ConsoleLogWriter, D as DefaultLogger, _ as DriverValueDecoder, $ as DriverValueEncoder, a3 as DriverValueMapper, aH as DrizzleConfig, az as DrizzleTypeError, ay as Equal, F as FakePrimitiveParam, G as GetColumnData, X as GetDecoderResult, aC as IfThenElse, I as InferColumnsDataTypes, aq as InferModel, ap as InferModelFromColumns, aI as KnownKeysOnly, t as LogWriter, L as Logger, M as MakeColumnConfig, ao as MapColumnName, Y as Name, N as NoopLogger, as as OneOrMany, O as OptionalKeyOnly, aB as Or, a5 as Param, a9 as Placeholder, aD as PromiseOf, H as Query, Q as QueryTypingsValue, R as RequiredKeyOnly, a7 as SQLChunk, J as SQLWrapper, x as SelectedFields, v as SelectedFieldsFlat, w as SelectedFieldsFlatFull, y as SelectedFieldsOrdered, af as SelectionProxyHandler, av as Simplify, au as SimplifyOptions, aw as SimplifyShallow, P as StringChunk, ad as Subquery, ac as SubqueryConfig, ag as TableConfig, at as Update, q as UpdateCBConfig, U as UpdateColConfig, ar as UpdateSet, ah as UpdateTableConfig, aA as ValueOrArray, aJ as ViewBaseConfig, W as WithEnum, ae as WithSubquery, aE as Writable, ab as fillPlaceholders, aF as getTableColumns, an as getTableName, a0 as isDriverValueEncoder, K as isSQLWrapper, ai as isTable, Z as name, a1 as noopDecoder, a2 as noopEncoder, a4 as noopMapper, a6 as param, aa as placeholder, a8 as sql } from './column.d-c31e7ad3.js';
|
|
3
|
+
import { R as Relation } from './query-promise.d-e370e0a9.js';
|
|
4
|
+
export { U as BuildQueryResult, P as BuildRelationResult, a2 as BuildRelationalQueryResult, H as DBQueryConfig, z as ExtractObjectValues, A as ExtractRelationsFromTableExtraConfigSchema, E as ExtractTableRelationsFromSchema, L as ExtractTablesWithRelations, G as FindTableByDBName, M as Many, S as NonUndefinedKeysOnly, _ as NormalizedRelation, O as One, C as Operators, F as OrderByOperators, Q as QueryPromise, V as RelationConfig, K as RelationalSchemaConfig, y as Relations, N as ReturnTypeOrValue, I as TableRelationalConfig, a1 as TableRelationsHelpers, T as TableRelationsKeysOnly, J as TablesRelationalConfig, a as and, w as asc, q as between, b as bindIfParam, Z as createMany, Y as createOne, a0 as createTableRelationsHelpers, x as desc, e as eq, m as exists, W as extractTablesRelationalConfig, g as gt, d as gte, u as ilike, i as inArray, k as isNotNull, j as isNull, s as like, l as lt, f as lte, a3 as mapRelationalRow, n as ne, $ as normalizeRelation, c as not, r as notBetween, p as notExists, v as notIlike, h as notInArray, t as notLike, B as operators, o as or, D as orderByOperators, X as relations } from './query-promise.d-e370e0a9.js';
|
|
431
5
|
|
|
432
6
|
declare class ColumnAliasProxyHandler<TColumn extends AnyColumn> implements ProxyHandler<TColumn> {
|
|
433
7
|
private table;
|
|
@@ -438,8 +12,18 @@ declare class TableAliasProxyHandler<T extends Table | View> implements ProxyHan
|
|
|
438
12
|
private alias;
|
|
439
13
|
private replaceOriginalName;
|
|
440
14
|
constructor(alias: string, replaceOriginalName: boolean);
|
|
441
|
-
get(
|
|
15
|
+
get(target: T, prop: string | symbol): any;
|
|
16
|
+
}
|
|
17
|
+
declare class RelationTableAliasProxyHandler<T extends Relation> implements ProxyHandler<T> {
|
|
18
|
+
private alias;
|
|
19
|
+
constructor(alias: string);
|
|
20
|
+
get(target: T, prop: string | symbol): any;
|
|
442
21
|
}
|
|
22
|
+
declare function aliasedTable<T extends Table>(table: T, tableAlias: string): T;
|
|
23
|
+
declare function aliasedRelation<T extends Relation>(relation: T, tableAlias: string): T;
|
|
24
|
+
declare function aliasedTableColumn<T extends AnyColumn>(column: T, tableAlias: string): T;
|
|
25
|
+
declare function mapColumnsInAliasedSQLToAlias(query: SQL.Aliased, alias: string): SQL.Aliased;
|
|
26
|
+
declare function mapColumnsInSQLToAlias(query: SQL, alias: string): SQL;
|
|
443
27
|
|
|
444
28
|
declare class DrizzleError extends Error {
|
|
445
29
|
constructor(message: string);
|
|
@@ -449,4 +33,4 @@ declare class TransactionRollbackError extends DrizzleError {
|
|
|
449
33
|
constructor();
|
|
450
34
|
}
|
|
451
35
|
|
|
452
|
-
export { AnyColumn, ColumnAliasProxyHandler, DrizzleError,
|
|
36
|
+
export { AnyColumn, ColumnAliasProxyHandler, DrizzleError, Relation, RelationTableAliasProxyHandler, SQL, Table, TableAliasProxyHandler, TransactionRollbackError, View, aliasedRelation, aliasedTable, aliasedTableColumn, mapColumnsInAliasedSQLToAlias, mapColumnsInSQLToAlias };
|
package/index.mjs
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export { ai as BaseName, e as Column, C as ColumnAliasProxyHandler, f as ColumnBuilder, ag as Columns, ak as ExtraConfigBuilder, W as FakePrimitiveParam, aj as IsAlias, M as Many, _ as Name, O as One, ah as OriginalName, a4 as Param, a7 as Placeholder, Q as QueryPromise, G as Relation, R as RelationTableAliasProxyHandler, H as Relations, Z as SQL, af as Schema, ad as SelectionProxyHandler, Y as StringChunk, ab as Subquery, aa as SubqueryConfig, al as Table, T as TableAliasProxyHandler, ae as TableName, av as View, au as ViewBaseConfig, ac as WithSubquery, b as aliasedRelation, a as aliasedTable, c as aliasedTableColumn, i as and, ar as applyMixins, E as asc, x as between, g as bindIfParam, P as createMany, N as createOne, U as createTableRelationsHelpers, F as desc, h as eq, v as exists, K as extractTablesRelationalConfig, a9 as fillPlaceholders, as as getTableColumns, at as getTableLikeName, an as getTableName, k as gt, l as gte, B as ilike, r as inArray, a0 as isDriverValueEncoder, u as isNotNull, t as isNull, X as isSQLWrapper, am as isTable, z as like, p as lt, q as lte, m as mapColumnsInAliasedSQLToAlias, d as mapColumnsInSQLToAlias, V as mapRelationalRow, ao as mapResultRow, aq as mapUpdateSet, $ as name, n as ne, a1 as noopDecoder, a2 as noopEncoder, a3 as noopMapper, S as normalizeRelation, j as not, y as notBetween, w as notExists, D as notIlike, s as notInArray, A as notLike, I as operators, o as or, J as orderByOperators, ap as orderSelectedFields, a5 as param, a8 as placeholder, L as relations, a6 as sql } from './relations-47eb5c5f.mjs';
|
|
2
|
+
export { D as DrizzleError, T as TransactionRollbackError } from './errors-bb636d84.mjs';
|
|
3
|
+
export { C as ConsoleLogWriter, D as DefaultLogger, N as NoopLogger } from './logger-caf75bde.mjs';
|
|
2
4
|
//# sourceMappingURL=index.mjs.map
|
package/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/knex/index.cjs
CHANGED
package/knex/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/knex/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Knex } from 'knex';
|
|
2
|
-
import { T as Table,
|
|
2
|
+
import { T as Table, aq as InferModel } from '../column.d-c31e7ad3.js';
|
|
3
3
|
|
|
4
4
|
declare module 'knex/types/tables' {
|
|
5
5
|
type Knexify<T extends Table> = Knex.CompositeTableType<InferModel<T, 'select', {
|
package/kysely/index.cjs
CHANGED
package/kysely/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/kysely/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColumnType } from 'kysely';
|
|
2
|
-
import { T as Table,
|
|
2
|
+
import { T as Table, av as Simplify, aq as InferModel, ao as MapColumnName } from '../column.d-c31e7ad3.js';
|
|
3
3
|
|
|
4
4
|
type Kyselify<T extends Table> = Simplify<{
|
|
5
5
|
[Key in keyof T['_']['columns'] & string as MapColumnName<Key, T['_']['columns'][Key], true>]: ColumnType<InferModel<T, 'select', {
|