tempest-db-js 0.6.0 → 0.8.0

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/index.d.cts CHANGED
@@ -641,7 +641,8 @@ declare class InsertBuilder<Full, Ins, Ret = number> {
641
641
  * @param rows One row, or an array of rows.
642
642
  * @returns A builder carrying the rows.
643
643
  * @throws ValidationError When a value is not a column value the dialect can
644
- * bind (see the `sql` helpers for writing an expression instead).
644
+ * bind (see the `sql` helpers for writing an expression instead), or when the
645
+ * rows of a multi-row insert disagree about a column that has a default.
645
646
  */
646
647
  values(rows: WriteValues<Ins> | readonly WriteValues<Ins>[]): InsertBuilder<Full, Ins, Ret>;
647
648
  /**
@@ -1331,8 +1332,47 @@ declare class NodeSqliteDriver implements SyncDriver {
1331
1332
  */
1332
1333
  private readonly statements;
1333
1334
  constructor(database: any);
1334
- /** Open a `node:sqlite` database at the given path (or `:memory:`). */
1335
- static open(path: string): NodeSqliteDriver;
1335
+ /**
1336
+ * Open a `node:sqlite` database at the given path (or `:memory:`).
1337
+ *
1338
+ * @param path The database file, or `":memory:"`.
1339
+ * @param options Passed straight to `DatabaseSync` (`readOnly`, `timeout`, …).
1340
+ * @returns A driver over the open handle.
1341
+ */
1342
+ static open(path: string, options?: Readonly<Record<string, unknown>>): NodeSqliteDriver;
1343
+ /** Return the cached prepared statement for `sql`, preparing it on first use. */
1344
+ private prepare;
1345
+ execute(sql: string, params: readonly unknown[]): DriverResult;
1346
+ iterate(sql: string, params: readonly unknown[]): IterableIterator<Record<string, unknown>>;
1347
+ close(): void;
1348
+ }
1349
+ /**
1350
+ * SQLite driver backed by the `better-sqlite3` peer dependency.
1351
+ *
1352
+ * Selected with `{ driver: "better-sqlite3" }` or the URL suffix
1353
+ * `sqlite+better-sqlite3://…`; the built-in `node:sqlite` stays the default, so
1354
+ * nothing has to be installed to use SQLite. Pick this one when the service
1355
+ * already runs on better-sqlite3, or needs what it exposes and `node:sqlite`
1356
+ * does not — `pragma()`, loadable extensions, its own WAL helpers.
1357
+ *
1358
+ * Row shape matches {@link NodeSqliteDriver}: plain objects, BLOBs as `Buffer`
1359
+ * (a `Uint8Array` subclass), which is what `coerceRow` already expects.
1360
+ */
1361
+ declare class BetterSqliteDriver implements SyncDriver {
1362
+ private readonly db;
1363
+ /** Prepared-statement cache keyed by SQL text — see {@link NodeSqliteDriver}. */
1364
+ private readonly statements;
1365
+ constructor(database: any);
1366
+ /**
1367
+ * Open a `better-sqlite3` database at the given path (or `":memory:"`).
1368
+ *
1369
+ * @param path The database file, or `":memory:"`.
1370
+ * @param options Passed straight to `new Database()` (`readonly`, `timeout`, …).
1371
+ * @returns A driver over the open handle.
1372
+ * @throws If `better-sqlite3` is not installed — it is an optional peer
1373
+ * dependency, so the error names the package to install.
1374
+ */
1375
+ static open(path: string, options?: Readonly<Record<string, unknown>>): BetterSqliteDriver;
1336
1376
  /** Return the cached prepared statement for `sql`, preparing it on first use. */
1337
1377
  private prepare;
1338
1378
  execute(sql: string, params: readonly unknown[]): DriverResult;
@@ -1550,9 +1590,30 @@ interface PoolOptions {
1550
1590
  /** Give up acquiring a connection after this long (ms). */
1551
1591
  readonly connectTimeoutMs?: number;
1552
1592
  }
1593
+ /**
1594
+ * A server-side notice (a PostgreSQL `NOTICE`). The shape is the driver's own —
1595
+ * passed through untouched rather than normalized, since what is useful in it
1596
+ * differs per database.
1597
+ */
1598
+ type NoticeLogger = (notice: Record<string, unknown>) => void;
1553
1599
  /** Options shared by both engine flavors. */
1554
1600
  interface EngineOptions {
1555
- /** Override the driver detected from the URL (e.g. `"better-sqlite3"`). */
1601
+ /**
1602
+ * Override the driver detected from the URL.
1603
+ *
1604
+ * SQLite ships two: `"node:sqlite"` (the built-in, default — nothing to
1605
+ * install) and `"better-sqlite3"` (the optional peer dependency). PostgreSQL
1606
+ * runs on `"postgres"` (postgres.js) and MySQL on `"mysql2"`; naming those is
1607
+ * a no-op today, kept so the option means the same thing everywhere.
1608
+ *
1609
+ * A name this dialect does not have throws — passing `{ driver: "sqlite3" }`
1610
+ * is a decision that would otherwise be silently ignored.
1611
+ *
1612
+ * The `+suffix` in the URL (`sqlite+better-sqlite3:///app.db`) selects the same
1613
+ * way, with one difference: a suffix naming a driver from another ecosystem
1614
+ * (`sqlite+aiosqlite`, `postgresql+asyncpg`) is ignored rather than rejected,
1615
+ * so a URL copied from a Python service still connects.
1616
+ */
1556
1617
  readonly driver?: string;
1557
1618
  /** Connection-pool tuning (PostgreSQL only). */
1558
1619
  readonly pool?: PoolOptions;
@@ -1561,6 +1622,34 @@ interface EngineOptions {
1561
1622
  * query logging/tracing. Thrown errors are swallowed so it never breaks a query.
1562
1623
  */
1563
1624
  readonly onQuery?: QueryLogger;
1625
+ /**
1626
+ * Called for every server-side notice (`CREATE TABLE IF NOT EXISTS` on an
1627
+ * existing table, `DROP ... IF EXISTS` on a missing one, and so on).
1628
+ *
1629
+ * **Without this, notices are silenced.** postgres.js defaults to printing them
1630
+ * with `console.log`, which drops a nine-line object into the host service's
1631
+ * stdout in the middle of its structured log — on every boot, since a migration
1632
+ * runner is usually the first thing to run. Writing to the host's stdout is the
1633
+ * application's decision, not a library's, so the default is to say nothing and
1634
+ * let you route them:
1635
+ *
1636
+ * ```ts
1637
+ * createEngine(url, { onNotice: (n) => logger.debug({ pg: n }, "postgres notice") });
1638
+ * ```
1639
+ *
1640
+ * Thrown errors are swallowed, like `onQuery`.
1641
+ */
1642
+ readonly onNotice?: NoticeLogger;
1643
+ /**
1644
+ * Options passed straight to the underlying driver, applied **last** so they
1645
+ * win over everything this layer derives (`pool`, `onNotice`).
1646
+ *
1647
+ * The escape hatch for what the typed surface does not model and is not going
1648
+ * to — postgres.js `connection`/`types`/`transform`/`ssl`, mysql2's own
1649
+ * settings, `node:sqlite`'s `readOnly` — so a gap need not become a feature
1650
+ * request.
1651
+ */
1652
+ readonly driverOptions?: Readonly<Record<string, unknown>>;
1564
1653
  }
1565
1654
  /** A synchronous engine (SQLite only). */
1566
1655
  declare class SyncEngine {
@@ -2318,9 +2407,22 @@ type ColValue<Col> = Col extends Column<infer T, infer F> ? F extends {
2318
2407
  type HasDefault<Col> = Col extends Column<unknown, infer F> ? F extends {
2319
2408
  hasDefault: true;
2320
2409
  } ? true : false : false;
2321
- /** Keys of the model whose columns are optional on insert. */
2410
+ /** True when a column accepts NULL — neither `notNull` nor a primary key. */
2411
+ type IsNullable<Col> = Col extends Column<unknown, infer F> ? F extends {
2412
+ notNull: true;
2413
+ } | {
2414
+ primaryKey: true;
2415
+ } ? false : true : false;
2416
+ /**
2417
+ * Keys of the model whose columns may be omitted on insert.
2418
+ *
2419
+ * A column is optional when it has a default **or** when it accepts NULL: SQL
2420
+ * applies `NULL` to an omitted column that declares no other default, so
2421
+ * requiring the caller to write `note: null` adds noise that reads like a
2422
+ * deliberate decision to blank the column. Passing `null` explicitly still works.
2423
+ */
2322
2424
  type OptionalInsertKeys<I> = {
2323
- [K in ColumnKeys<I>]: HasDefault<I[K]> extends true ? K : never;
2425
+ [K in ColumnKeys<I>]: HasDefault<I[K]> extends true ? K : IsNullable<I[K]> extends true ? K : never;
2324
2426
  }[ColumnKeys<I>];
2325
2427
  /**
2326
2428
  * Infer the SELECT row shape from a model class: every column field becomes its
@@ -2331,7 +2433,9 @@ type InferModel<C extends ModelClass> = {
2331
2433
  [K in ColumnKeys<InstanceType<C>>]: ColValue<InstanceType<C>[K]>;
2332
2434
  };
2333
2435
  /**
2334
- * Infer the INSERT shape: columns with a default (or PK) are optional; the rest
2436
+ * Infer the INSERT shape: a column is optional when it has a default (or is a PK)
2437
+ * **or** when it is nullable — matching SQL, where an omitted column with no
2438
+ * `DEFAULT` clause is written as `NULL`. Only `notNull` columns without a default
2335
2439
  * are required. Nullability is preserved on both sides.
2336
2440
  */
2337
2441
  type InferInsert<C extends ModelClass> = Simplify<{
@@ -2340,4 +2444,4 @@ type InferInsert<C extends ModelClass> = Simplify<{
2340
2444
  [K in Exclude<ColumnKeys<InstanceType<C>>, OptionalInsertKeys<InstanceType<C>>>]: ColValue<InstanceType<C>[K]>;
2341
2445
  }>;
2342
2446
 
2343
- export { ActiveRecord, type ActiveRecordManager, Agg, type AggregateTerm, type AsyncDriver, AsyncEngine, AsyncResult, AsyncSession, BaseDialect, BaseRepository, type BelongsTo, type ColRef, type ColType, Column, type ColumnFlags, type ColumnType, type ColumnTypeKind, type ColumnTypeMeta, type CompiledQuery, type CondNode, type Condition, type DefaultValue, DeleteBuilder, type DeleteNode, type Dialect, type DriverResult, type EngineOptions, type Executable, type ExprNode, Expression, type FkAction, type ForeignKeyOptions, type ForeignKeyRef, type HasMany, type InferInsert, type InferModel, InsertBuilder, type InsertNode, InvalidDatabaseUrl, JoinBuilder, type JoinClause, type JoinNode, type JoinOn, type JoinSelection, type JoinWhereInput, type LockClause, type LockOptions, Model, type ModelClass, MysqlDialect, type NameMap, type NamingStrategy, NoResultError, NodeSqliteDriver, OPERATORS, type OnConflict, type OnConflictOptions, type OnConflictUpdateOptions, type Operator, type OperatorsFor, type OrderTerm, type PaginationFilter, type PaginationResult, Params, type ParsedDatabaseUrl, type PoolOptions, type PortableExpression, PostgresDialect, QueryExecutionError, type QueryLogger, type QueryNode, RecordNotFound, type Relation, type RelationValue, type ReservedAsyncDriver, type Returning, type RowOf, SelectBuilder, type SelectNode, type SortDirection, type Sources, type SqlExpression, SqliteDialect, type Subquery, type SyncDriver, SyncEngine, SyncResult, SyncSession, type TableConstraint, UpdateBuilder, type UpdateNode, ValidationError, type WhereArg, type WhereInput, type WithRelations, type WritePatch, type WriteValues, activeRecord, and, avg, belongsTo, col, column, columnNamesOf, columnPropsOf, columnsOf, count, createEngine, createSyncEngine, dbColumn, del, detectDialect, fn, foreignKey, fromDict, getDialect, hasMany, insert, isCondition, isExpression, isSqlExpression, isSubquery, join, loadRelations, max, min, not, or, parse, parseDatabaseUrl, select, sql, stringify, sum, toAsyncDriver, toCondNode, toDict, toJSON, toSnakeCase, unique, update, val };
2447
+ export { ActiveRecord, type ActiveRecordManager, Agg, type AggregateTerm, type AsyncDriver, AsyncEngine, AsyncResult, AsyncSession, BaseDialect, BaseRepository, type BelongsTo, BetterSqliteDriver, type ColRef, type ColType, Column, type ColumnFlags, type ColumnType, type ColumnTypeKind, type ColumnTypeMeta, type CompiledQuery, type CondNode, type Condition, type DefaultValue, DeleteBuilder, type DeleteNode, type Dialect, type DriverResult, type EngineOptions, type Executable, type ExprNode, Expression, type FkAction, type ForeignKeyOptions, type ForeignKeyRef, type HasMany, type InferInsert, type InferModel, InsertBuilder, type InsertNode, InvalidDatabaseUrl, JoinBuilder, type JoinClause, type JoinNode, type JoinOn, type JoinSelection, type JoinWhereInput, type LockClause, type LockOptions, Model, type ModelClass, MysqlDialect, type NameMap, type NamingStrategy, NoResultError, NodeSqliteDriver, type NoticeLogger, OPERATORS, type OnConflict, type OnConflictOptions, type OnConflictUpdateOptions, type Operator, type OperatorsFor, type OrderTerm, type PaginationFilter, type PaginationResult, Params, type ParsedDatabaseUrl, type PoolOptions, type PortableExpression, PostgresDialect, QueryExecutionError, type QueryLogger, type QueryNode, RecordNotFound, type Relation, type RelationValue, type ReservedAsyncDriver, type Returning, type RowOf, SelectBuilder, type SelectNode, type SortDirection, type Sources, type SqlExpression, SqliteDialect, type Subquery, type SyncDriver, SyncEngine, SyncResult, SyncSession, type TableConstraint, UpdateBuilder, type UpdateNode, ValidationError, type WhereArg, type WhereInput, type WithRelations, type WritePatch, type WriteValues, activeRecord, and, avg, belongsTo, col, column, columnNamesOf, columnPropsOf, columnsOf, count, createEngine, createSyncEngine, dbColumn, del, detectDialect, fn, foreignKey, fromDict, getDialect, hasMany, insert, isCondition, isExpression, isSqlExpression, isSubquery, join, loadRelations, max, min, not, or, parse, parseDatabaseUrl, select, sql, stringify, sum, toAsyncDriver, toCondNode, toDict, toJSON, toSnakeCase, unique, update, val };
package/dist/index.d.ts CHANGED
@@ -641,7 +641,8 @@ declare class InsertBuilder<Full, Ins, Ret = number> {
641
641
  * @param rows One row, or an array of rows.
642
642
  * @returns A builder carrying the rows.
643
643
  * @throws ValidationError When a value is not a column value the dialect can
644
- * bind (see the `sql` helpers for writing an expression instead).
644
+ * bind (see the `sql` helpers for writing an expression instead), or when the
645
+ * rows of a multi-row insert disagree about a column that has a default.
645
646
  */
646
647
  values(rows: WriteValues<Ins> | readonly WriteValues<Ins>[]): InsertBuilder<Full, Ins, Ret>;
647
648
  /**
@@ -1331,8 +1332,47 @@ declare class NodeSqliteDriver implements SyncDriver {
1331
1332
  */
1332
1333
  private readonly statements;
1333
1334
  constructor(database: any);
1334
- /** Open a `node:sqlite` database at the given path (or `:memory:`). */
1335
- static open(path: string): NodeSqliteDriver;
1335
+ /**
1336
+ * Open a `node:sqlite` database at the given path (or `:memory:`).
1337
+ *
1338
+ * @param path The database file, or `":memory:"`.
1339
+ * @param options Passed straight to `DatabaseSync` (`readOnly`, `timeout`, …).
1340
+ * @returns A driver over the open handle.
1341
+ */
1342
+ static open(path: string, options?: Readonly<Record<string, unknown>>): NodeSqliteDriver;
1343
+ /** Return the cached prepared statement for `sql`, preparing it on first use. */
1344
+ private prepare;
1345
+ execute(sql: string, params: readonly unknown[]): DriverResult;
1346
+ iterate(sql: string, params: readonly unknown[]): IterableIterator<Record<string, unknown>>;
1347
+ close(): void;
1348
+ }
1349
+ /**
1350
+ * SQLite driver backed by the `better-sqlite3` peer dependency.
1351
+ *
1352
+ * Selected with `{ driver: "better-sqlite3" }` or the URL suffix
1353
+ * `sqlite+better-sqlite3://…`; the built-in `node:sqlite` stays the default, so
1354
+ * nothing has to be installed to use SQLite. Pick this one when the service
1355
+ * already runs on better-sqlite3, or needs what it exposes and `node:sqlite`
1356
+ * does not — `pragma()`, loadable extensions, its own WAL helpers.
1357
+ *
1358
+ * Row shape matches {@link NodeSqliteDriver}: plain objects, BLOBs as `Buffer`
1359
+ * (a `Uint8Array` subclass), which is what `coerceRow` already expects.
1360
+ */
1361
+ declare class BetterSqliteDriver implements SyncDriver {
1362
+ private readonly db;
1363
+ /** Prepared-statement cache keyed by SQL text — see {@link NodeSqliteDriver}. */
1364
+ private readonly statements;
1365
+ constructor(database: any);
1366
+ /**
1367
+ * Open a `better-sqlite3` database at the given path (or `":memory:"`).
1368
+ *
1369
+ * @param path The database file, or `":memory:"`.
1370
+ * @param options Passed straight to `new Database()` (`readonly`, `timeout`, …).
1371
+ * @returns A driver over the open handle.
1372
+ * @throws If `better-sqlite3` is not installed — it is an optional peer
1373
+ * dependency, so the error names the package to install.
1374
+ */
1375
+ static open(path: string, options?: Readonly<Record<string, unknown>>): BetterSqliteDriver;
1336
1376
  /** Return the cached prepared statement for `sql`, preparing it on first use. */
1337
1377
  private prepare;
1338
1378
  execute(sql: string, params: readonly unknown[]): DriverResult;
@@ -1550,9 +1590,30 @@ interface PoolOptions {
1550
1590
  /** Give up acquiring a connection after this long (ms). */
1551
1591
  readonly connectTimeoutMs?: number;
1552
1592
  }
1593
+ /**
1594
+ * A server-side notice (a PostgreSQL `NOTICE`). The shape is the driver's own —
1595
+ * passed through untouched rather than normalized, since what is useful in it
1596
+ * differs per database.
1597
+ */
1598
+ type NoticeLogger = (notice: Record<string, unknown>) => void;
1553
1599
  /** Options shared by both engine flavors. */
1554
1600
  interface EngineOptions {
1555
- /** Override the driver detected from the URL (e.g. `"better-sqlite3"`). */
1601
+ /**
1602
+ * Override the driver detected from the URL.
1603
+ *
1604
+ * SQLite ships two: `"node:sqlite"` (the built-in, default — nothing to
1605
+ * install) and `"better-sqlite3"` (the optional peer dependency). PostgreSQL
1606
+ * runs on `"postgres"` (postgres.js) and MySQL on `"mysql2"`; naming those is
1607
+ * a no-op today, kept so the option means the same thing everywhere.
1608
+ *
1609
+ * A name this dialect does not have throws — passing `{ driver: "sqlite3" }`
1610
+ * is a decision that would otherwise be silently ignored.
1611
+ *
1612
+ * The `+suffix` in the URL (`sqlite+better-sqlite3:///app.db`) selects the same
1613
+ * way, with one difference: a suffix naming a driver from another ecosystem
1614
+ * (`sqlite+aiosqlite`, `postgresql+asyncpg`) is ignored rather than rejected,
1615
+ * so a URL copied from a Python service still connects.
1616
+ */
1556
1617
  readonly driver?: string;
1557
1618
  /** Connection-pool tuning (PostgreSQL only). */
1558
1619
  readonly pool?: PoolOptions;
@@ -1561,6 +1622,34 @@ interface EngineOptions {
1561
1622
  * query logging/tracing. Thrown errors are swallowed so it never breaks a query.
1562
1623
  */
1563
1624
  readonly onQuery?: QueryLogger;
1625
+ /**
1626
+ * Called for every server-side notice (`CREATE TABLE IF NOT EXISTS` on an
1627
+ * existing table, `DROP ... IF EXISTS` on a missing one, and so on).
1628
+ *
1629
+ * **Without this, notices are silenced.** postgres.js defaults to printing them
1630
+ * with `console.log`, which drops a nine-line object into the host service's
1631
+ * stdout in the middle of its structured log — on every boot, since a migration
1632
+ * runner is usually the first thing to run. Writing to the host's stdout is the
1633
+ * application's decision, not a library's, so the default is to say nothing and
1634
+ * let you route them:
1635
+ *
1636
+ * ```ts
1637
+ * createEngine(url, { onNotice: (n) => logger.debug({ pg: n }, "postgres notice") });
1638
+ * ```
1639
+ *
1640
+ * Thrown errors are swallowed, like `onQuery`.
1641
+ */
1642
+ readonly onNotice?: NoticeLogger;
1643
+ /**
1644
+ * Options passed straight to the underlying driver, applied **last** so they
1645
+ * win over everything this layer derives (`pool`, `onNotice`).
1646
+ *
1647
+ * The escape hatch for what the typed surface does not model and is not going
1648
+ * to — postgres.js `connection`/`types`/`transform`/`ssl`, mysql2's own
1649
+ * settings, `node:sqlite`'s `readOnly` — so a gap need not become a feature
1650
+ * request.
1651
+ */
1652
+ readonly driverOptions?: Readonly<Record<string, unknown>>;
1564
1653
  }
1565
1654
  /** A synchronous engine (SQLite only). */
1566
1655
  declare class SyncEngine {
@@ -2318,9 +2407,22 @@ type ColValue<Col> = Col extends Column<infer T, infer F> ? F extends {
2318
2407
  type HasDefault<Col> = Col extends Column<unknown, infer F> ? F extends {
2319
2408
  hasDefault: true;
2320
2409
  } ? true : false : false;
2321
- /** Keys of the model whose columns are optional on insert. */
2410
+ /** True when a column accepts NULL — neither `notNull` nor a primary key. */
2411
+ type IsNullable<Col> = Col extends Column<unknown, infer F> ? F extends {
2412
+ notNull: true;
2413
+ } | {
2414
+ primaryKey: true;
2415
+ } ? false : true : false;
2416
+ /**
2417
+ * Keys of the model whose columns may be omitted on insert.
2418
+ *
2419
+ * A column is optional when it has a default **or** when it accepts NULL: SQL
2420
+ * applies `NULL` to an omitted column that declares no other default, so
2421
+ * requiring the caller to write `note: null` adds noise that reads like a
2422
+ * deliberate decision to blank the column. Passing `null` explicitly still works.
2423
+ */
2322
2424
  type OptionalInsertKeys<I> = {
2323
- [K in ColumnKeys<I>]: HasDefault<I[K]> extends true ? K : never;
2425
+ [K in ColumnKeys<I>]: HasDefault<I[K]> extends true ? K : IsNullable<I[K]> extends true ? K : never;
2324
2426
  }[ColumnKeys<I>];
2325
2427
  /**
2326
2428
  * Infer the SELECT row shape from a model class: every column field becomes its
@@ -2331,7 +2433,9 @@ type InferModel<C extends ModelClass> = {
2331
2433
  [K in ColumnKeys<InstanceType<C>>]: ColValue<InstanceType<C>[K]>;
2332
2434
  };
2333
2435
  /**
2334
- * Infer the INSERT shape: columns with a default (or PK) are optional; the rest
2436
+ * Infer the INSERT shape: a column is optional when it has a default (or is a PK)
2437
+ * **or** when it is nullable — matching SQL, where an omitted column with no
2438
+ * `DEFAULT` clause is written as `NULL`. Only `notNull` columns without a default
2335
2439
  * are required. Nullability is preserved on both sides.
2336
2440
  */
2337
2441
  type InferInsert<C extends ModelClass> = Simplify<{
@@ -2340,4 +2444,4 @@ type InferInsert<C extends ModelClass> = Simplify<{
2340
2444
  [K in Exclude<ColumnKeys<InstanceType<C>>, OptionalInsertKeys<InstanceType<C>>>]: ColValue<InstanceType<C>[K]>;
2341
2445
  }>;
2342
2446
 
2343
- export { ActiveRecord, type ActiveRecordManager, Agg, type AggregateTerm, type AsyncDriver, AsyncEngine, AsyncResult, AsyncSession, BaseDialect, BaseRepository, type BelongsTo, type ColRef, type ColType, Column, type ColumnFlags, type ColumnType, type ColumnTypeKind, type ColumnTypeMeta, type CompiledQuery, type CondNode, type Condition, type DefaultValue, DeleteBuilder, type DeleteNode, type Dialect, type DriverResult, type EngineOptions, type Executable, type ExprNode, Expression, type FkAction, type ForeignKeyOptions, type ForeignKeyRef, type HasMany, type InferInsert, type InferModel, InsertBuilder, type InsertNode, InvalidDatabaseUrl, JoinBuilder, type JoinClause, type JoinNode, type JoinOn, type JoinSelection, type JoinWhereInput, type LockClause, type LockOptions, Model, type ModelClass, MysqlDialect, type NameMap, type NamingStrategy, NoResultError, NodeSqliteDriver, OPERATORS, type OnConflict, type OnConflictOptions, type OnConflictUpdateOptions, type Operator, type OperatorsFor, type OrderTerm, type PaginationFilter, type PaginationResult, Params, type ParsedDatabaseUrl, type PoolOptions, type PortableExpression, PostgresDialect, QueryExecutionError, type QueryLogger, type QueryNode, RecordNotFound, type Relation, type RelationValue, type ReservedAsyncDriver, type Returning, type RowOf, SelectBuilder, type SelectNode, type SortDirection, type Sources, type SqlExpression, SqliteDialect, type Subquery, type SyncDriver, SyncEngine, SyncResult, SyncSession, type TableConstraint, UpdateBuilder, type UpdateNode, ValidationError, type WhereArg, type WhereInput, type WithRelations, type WritePatch, type WriteValues, activeRecord, and, avg, belongsTo, col, column, columnNamesOf, columnPropsOf, columnsOf, count, createEngine, createSyncEngine, dbColumn, del, detectDialect, fn, foreignKey, fromDict, getDialect, hasMany, insert, isCondition, isExpression, isSqlExpression, isSubquery, join, loadRelations, max, min, not, or, parse, parseDatabaseUrl, select, sql, stringify, sum, toAsyncDriver, toCondNode, toDict, toJSON, toSnakeCase, unique, update, val };
2447
+ export { ActiveRecord, type ActiveRecordManager, Agg, type AggregateTerm, type AsyncDriver, AsyncEngine, AsyncResult, AsyncSession, BaseDialect, BaseRepository, type BelongsTo, BetterSqliteDriver, type ColRef, type ColType, Column, type ColumnFlags, type ColumnType, type ColumnTypeKind, type ColumnTypeMeta, type CompiledQuery, type CondNode, type Condition, type DefaultValue, DeleteBuilder, type DeleteNode, type Dialect, type DriverResult, type EngineOptions, type Executable, type ExprNode, Expression, type FkAction, type ForeignKeyOptions, type ForeignKeyRef, type HasMany, type InferInsert, type InferModel, InsertBuilder, type InsertNode, InvalidDatabaseUrl, JoinBuilder, type JoinClause, type JoinNode, type JoinOn, type JoinSelection, type JoinWhereInput, type LockClause, type LockOptions, Model, type ModelClass, MysqlDialect, type NameMap, type NamingStrategy, NoResultError, NodeSqliteDriver, type NoticeLogger, OPERATORS, type OnConflict, type OnConflictOptions, type OnConflictUpdateOptions, type Operator, type OperatorsFor, type OrderTerm, type PaginationFilter, type PaginationResult, Params, type ParsedDatabaseUrl, type PoolOptions, type PortableExpression, PostgresDialect, QueryExecutionError, type QueryLogger, type QueryNode, RecordNotFound, type Relation, type RelationValue, type ReservedAsyncDriver, type Returning, type RowOf, SelectBuilder, type SelectNode, type SortDirection, type Sources, type SqlExpression, SqliteDialect, type Subquery, type SyncDriver, SyncEngine, SyncResult, SyncSession, type TableConstraint, UpdateBuilder, type UpdateNode, ValidationError, type WhereArg, type WhereInput, type WithRelations, type WritePatch, type WriteValues, activeRecord, and, avg, belongsTo, col, column, columnNamesOf, columnPropsOf, columnsOf, count, createEngine, createSyncEngine, dbColumn, del, detectDialect, fn, foreignKey, fromDict, getDialect, hasMany, insert, isCondition, isExpression, isSqlExpression, isSubquery, join, loadRelations, max, min, not, or, parse, parseDatabaseUrl, select, sql, stringify, sum, toAsyncDriver, toCondNode, toDict, toJSON, toSnakeCase, unique, update, val };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { ActiveRecord, Agg, AsyncEngine, AsyncResult, AsyncSession, BaseDialect, BaseRepository, Column, DeleteBuilder, Expression, InsertBuilder, InvalidDatabaseUrl, JoinBuilder, Model, MysqlDialect, NoResultError, NodeSqliteDriver, OPERATORS, Params, PostgresDialect, QueryExecutionError, RecordNotFound, SelectBuilder, SqliteDialect, SyncEngine, SyncResult, SyncSession, UpdateBuilder, ValidationError, activeRecord, and, avg, belongsTo, col, column, columnNamesOf, columnPropsOf, columnsOf, count, createEngine, createSyncEngine, dbColumn, del, detectDialect, fn, foreignKey, fromDict, getDialect, hasMany, insert, isCondition, isExpression, isSqlExpression, isSubquery, join, loadRelations, max, min, not, or, parse, parseDatabaseUrl, select, sql, stringify, sum, toAsyncDriver, toCondNode, toDict, toJSON, toSnakeCase, unique, update, val } from './chunk-G7O5DCCC.js';
1
+ export { ActiveRecord, Agg, AsyncEngine, AsyncResult, AsyncSession, BaseDialect, BaseRepository, BetterSqliteDriver, Column, DeleteBuilder, Expression, InsertBuilder, InvalidDatabaseUrl, JoinBuilder, Model, MysqlDialect, NoResultError, NodeSqliteDriver, OPERATORS, Params, PostgresDialect, QueryExecutionError, RecordNotFound, SelectBuilder, SqliteDialect, SyncEngine, SyncResult, SyncSession, UpdateBuilder, ValidationError, activeRecord, and, avg, belongsTo, col, column, columnNamesOf, columnPropsOf, columnsOf, count, createEngine, createSyncEngine, dbColumn, del, detectDialect, fn, foreignKey, fromDict, getDialect, hasMany, insert, isCondition, isExpression, isSqlExpression, isSubquery, join, loadRelations, max, min, not, or, parse, parseDatabaseUrl, select, sql, stringify, sum, toAsyncDriver, toCondNode, toDict, toJSON, toSnakeCase, unique, update, val } from './chunk-NH6K5LTX.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map