bun-query-builder 0.1.41 → 0.1.45
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/dist/actions/migrate-rollback.d.ts +2 -1
- package/dist/bin/cli.js +211 -84
- package/dist/browser.d.ts +4 -16
- package/dist/config.d.ts +10 -1
- package/dist/db.d.ts +1 -0
- package/dist/drivers/index.d.ts +2 -0
- package/dist/drivers/mysql.d.ts +6 -0
- package/dist/drivers/singlestore.d.ts +28 -0
- package/dist/drivers/sqlite.d.ts +6 -0
- package/dist/dynamodb-single-table.d.ts +11 -23
- package/dist/index.d.ts +4 -1
- package/dist/migrations.d.ts +5 -0
- package/dist/orm.d.ts +122 -16
- package/dist/sqlite-pragmas.d.ts +30 -0
- package/dist/src/index.js +215 -83
- package/dist/types.d.ts +27 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -95,6 +95,25 @@ export declare interface RelationsConfig {
|
|
|
95
95
|
maxEagerLoad?: number
|
|
96
96
|
detectCycles?: boolean
|
|
97
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* # `SqliteConfig`
|
|
100
|
+
*
|
|
101
|
+
* SQLite-specific connection behavior.
|
|
102
|
+
*
|
|
103
|
+
* - `pragmas`: bootstrap pragmas applied to every sqlite connection the
|
|
104
|
+
* library itself opens (the query-builder connection and the model-layer
|
|
105
|
+
* executor). Pragmas like `foreign_keys` and `busy_timeout` are
|
|
106
|
+
* per-connection in SQLite — they cannot be persisted in the database
|
|
107
|
+
* file — so they must be re-applied on every new connection. When unset,
|
|
108
|
+
* `DEFAULT_SQLITE_PRAGMAS` is used (WAL journal, `foreign_keys = ON`,
|
|
109
|
+
* `busy_timeout = 5000`). Setting this REPLACES the default list.
|
|
110
|
+
* Caller-supplied `Database` instances (`configureOrm({ database: db })`)
|
|
111
|
+
* are never touched — bring-your-own connection means bring-your-own
|
|
112
|
+
* pragmas.
|
|
113
|
+
*/
|
|
114
|
+
export declare interface SqliteConfig {
|
|
115
|
+
pragmas?: string[]
|
|
116
|
+
}
|
|
98
117
|
/**
|
|
99
118
|
* # `SqlConfig`
|
|
100
119
|
*
|
|
@@ -170,6 +189,7 @@ export declare interface DatabaseConfig {
|
|
|
170
189
|
host: string
|
|
171
190
|
url?: string
|
|
172
191
|
port: number
|
|
192
|
+
ssl?: boolean
|
|
173
193
|
pool?: PoolConfig
|
|
174
194
|
}
|
|
175
195
|
/**
|
|
@@ -214,6 +234,7 @@ export declare interface QueryBuilderConfig {
|
|
|
214
234
|
relations: RelationsConfig
|
|
215
235
|
transactionDefaults: TransactionDefaultsConfig
|
|
216
236
|
sql: SqlConfig
|
|
237
|
+
sqlite?: SqliteConfig
|
|
217
238
|
features: FeatureToggles
|
|
218
239
|
debug?: {
|
|
219
240
|
captureText: boolean
|
|
@@ -266,7 +287,12 @@ export declare interface UnsafeOptions {
|
|
|
266
287
|
* The SQL dialect used to tailor generated SQL and certain features.
|
|
267
288
|
* - 'postgres': Uses `RANDOM()`, supports JSON operators (e.g. `@>`), `FOR SHARE`, `FOR UPDATE`, CTEs
|
|
268
289
|
* - 'mysql': Uses `RAND()`, shared locks via `LOCK IN SHARE MODE`
|
|
290
|
+
* - 'singlestore': MySQL wire-compatible distributed SQL. Shares MySQL's
|
|
291
|
+
* placeholder/quoting/upsert/`LAST_INSERT_ID` behavior (see `isMysqlLike`),
|
|
292
|
+
* but its DDL adds distributed-table concepts (`SHARD KEY`, `SORT KEY`,
|
|
293
|
+
* `ROWSTORE`/columnstore) and drops foreign keys — handled by the dedicated
|
|
294
|
+
* `SingleStoreDriver`.
|
|
269
295
|
* - 'sqlite': Lightweight engine; some features are limited or emulated
|
|
270
296
|
* - 'browser': Browser-compatible mode that uses fetch() API calls instead of direct database connections
|
|
271
297
|
*/
|
|
272
|
-
export type SupportedDialect = 'postgres' | 'mysql' | 'sqlite' | 'browser';
|
|
298
|
+
export type SupportedDialect = 'postgres' | 'mysql' | 'singlestore' | 'sqlite' | 'browser';
|
package/package.json
CHANGED