@happyvertical/sql 0.102.0 → 0.102.2
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/aggregate.d.ts +2 -2
- package/dist/backup/index.d.ts +2 -2
- package/dist/backup/index.d.ts.map +1 -1
- package/dist/doctor.d.ts +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/duckdb.d.ts +1 -1
- package/dist/duckdb.d.ts.map +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/json.d.ts +2 -2
- package/dist/json.d.ts.map +1 -1
- package/dist/postgres.d.ts +3 -3
- package/dist/postgres.d.ts.map +1 -1
- package/dist/schema-manager.d.ts +5 -1
- package/dist/shared/alter-utils.d.ts +7 -1
- package/dist/shared/connection-cache.d.ts +1 -1
- package/dist/shared/connection-cache.d.ts.map +1 -1
- package/dist/shared/sqlite-connection-cache.d.ts +1 -1
- package/dist/shared/sqlite-connection-cache.d.ts.map +1 -1
- package/dist/shared/utils.d.ts +4 -1
- package/dist/sqlite-native.d.ts +2 -2
- package/dist/sqlite.d.ts +2 -2
- package/dist/sqlite.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/aggregate.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WhereClause } from './shared/types.js';
|
|
2
|
-
import { SqlAdapterType } from './shared/utils.js';
|
|
1
|
+
import type { WhereClause } from './shared/types.js';
|
|
2
|
+
import { type SqlAdapterType } from './shared/utils.js';
|
|
3
3
|
export type AggregateTimeBucketUnit = 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
4
4
|
export type AggregateFunction = 'count' | 'sum' | 'avg' | 'min' | 'max' | (string & {});
|
|
5
5
|
export type AggregateSelectExpr = {
|
package/dist/backup/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BackupManifest } from
|
|
2
|
-
export { BACKUP_KIND, BACKUP_VERSION, type BackupManifest, type BackupManifestDatabase, type BackupManifestFiles, DEFAULT_DUMP_FILE, DEFAULT_FILES_DIR, DEFAULT_MANIFEST_FILE, readBackupManifest, timestampForBackup, writeBackupManifest, } from
|
|
1
|
+
import { type BackupManifest } from "./manifest.js";
|
|
2
|
+
export { BACKUP_KIND, BACKUP_VERSION, type BackupManifest, type BackupManifestDatabase, type BackupManifestFiles, DEFAULT_DUMP_FILE, DEFAULT_FILES_DIR, DEFAULT_MANIFEST_FILE, readBackupManifest, timestampForBackup, writeBackupManifest, } from "./manifest.js";
|
|
3
3
|
export interface ExportBackupContext {
|
|
4
4
|
backupPath: string;
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/backup/index.ts"],"names":[],"mappings":"AAuBA,OAAO,EAGL,KAAK,cAAc,EAOpB,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/backup/index.ts"],"names":[],"mappings":"AAuBA,OAAO,EAGL,KAAK,cAAc,EAOpB,MAAM,eAAY,CAAC;AAEpB,OAAO,EACL,WAAW,EACX,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,eAAY,CAAC;AAEpB,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB,CAAC,KAAK,GAAG,OAAO;IACjD,6CAA6C;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,QAAQ,EAAE,cAAc,GAAG;QAAE,KAAK,CAAC,EAAE,KAAK,CAAA;K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AAI,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,oBAAoB,EAAE,iBAAiB,CAAC;CAAG;AAE1D,wFAAwF;AACxF,wBAAgB,iBAAiB,IAAI,MAAM,CAK1C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,YAAY,CAAC,KAAK,GAAG,OAAO,EAChD,OAAO,EAAE,mBAAmB,CAAC,KAAK,CAAC,GAClC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CA+EpC;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,cAAc,CAAC,CAmCzB;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,cAAc,CAAC,CAyBzB"}
|
package/dist/doctor.d.ts
CHANGED
package/dist/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAgB,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,iBAAiB,CAAC;IACtB,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACrB;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;AAEzE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,iBAAiB,CAAC;IACtB,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,YAAY,CAAC,CAevB;AAmBD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,WAAW,CAa5E;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,gBAAgB,GAAG,WAAW,CAkBrE;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,gBAAgB,GAAG,WAAW,CAsBrE"}
|
package/dist/duckdb.d.ts
CHANGED
package/dist/duckdb.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duckdb.d.ts","sourceRoot":"","sources":["../src/duckdb.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAGV,iBAAiB,EACjB,aAAa,EAQd,MAAM,
|
|
1
|
+
{"version":3,"file":"duckdb.d.ts","sourceRoot":"","sources":["../src/duckdb.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAGV,iBAAiB,EACjB,aAAa,EAQd,MAAM,mBAAgB,CAAC;AAsQxB;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CA6yC5B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { PostgresOptions } from
|
|
2
|
-
import { DatabaseInterface, DuckDBOptions, JSONOptions } from
|
|
3
|
-
import { SqliteOptions } from
|
|
4
|
-
import { buildWhere, formatDbError, raw } from './shared/utils';
|
|
5
|
-
import { convertUniqueIndexesToInlineConstraints } from './shared/duckdb-schema-utils';
|
|
1
|
+
import type { PostgresOptions } from "./postgres.js";
|
|
2
|
+
import type { DatabaseInterface, DuckDBOptions, JSONOptions } from "./shared/types.js";
|
|
3
|
+
import type { SqliteOptions } from "./sqlite.js";
|
|
6
4
|
/**
|
|
7
5
|
* Union type of options for creating different database types
|
|
8
6
|
*/
|
|
@@ -84,23 +82,25 @@ export declare function escapeSqlValue(value: any): string;
|
|
|
84
82
|
* @throws Error if the column name contains invalid characters
|
|
85
83
|
*/
|
|
86
84
|
export declare function validateColumnName(column: string): string;
|
|
85
|
+
import { buildWhere, formatDbError, raw } from "./shared/utils.js";
|
|
87
86
|
export { type AggregateBuildResult, type AggregateFunction, type AggregateSelectExpr, type AggregateSpec, type AggregateTimeBucketUnit, bucketExpr, buildAggregate, } from './aggregate.js';
|
|
88
|
-
export type { RawSqlKey, SqlAdapterType } from
|
|
87
|
+
export type { RawSqlKey, SqlAdapterType } from "./shared/utils.js";
|
|
89
88
|
export { buildWhere, formatDbError, raw };
|
|
90
|
-
|
|
89
|
+
import { convertUniqueIndexesToInlineConstraints } from "./shared/duckdb-schema-utils.js";
|
|
90
|
+
export { checkExpectedTables, checkRelationship, checkUniqueColumn, type DoctorCheck, type DoctorContext, type DoctorIssue, type DoctorLevel, type DoctorResult, type RelationshipSpec, type RunDoctorOptions, runDoctor, type UniqueColumnSpec, } from "./doctor.js";
|
|
91
91
|
export { clearConnectionCache } from './json.js';
|
|
92
92
|
export { clearPostgresConnectionCache } from './postgres.js';
|
|
93
|
-
export { assertCanExportDatabase, assertCanImportDatabase, type CreateDropOptions, createPostgresDatabase, type DumpOptions, databaseNameFromUrl, dropPostgresDatabase, dumpPostgresDatabase, isLocalDatabaseUrl, type PostgresImportLocalityOptions, type PostgresLocalityOptions, postgresEnvFromUrl, type RestoreOptions, redactDatabaseUrl, restorePostgresDatabase, } from
|
|
94
|
-
export type { SchemaInitializationResult } from
|
|
95
|
-
export { DatabaseSchemaManager } from
|
|
96
|
-
export * from
|
|
93
|
+
export { assertCanExportDatabase, assertCanImportDatabase, type CreateDropOptions, createPostgresDatabase, type DumpOptions, databaseNameFromUrl, dropPostgresDatabase, dumpPostgresDatabase, isLocalDatabaseUrl, type PostgresImportLocalityOptions, type PostgresLocalityOptions, postgresEnvFromUrl, type RestoreOptions, redactDatabaseUrl, restorePostgresDatabase, } from "./postgres-cli.js";
|
|
94
|
+
export type { SchemaInitializationResult } from "./schema-manager.js";
|
|
95
|
+
export { DatabaseSchemaManager } from "./schema-manager.js";
|
|
96
|
+
export * from "./shared/types.js";
|
|
97
97
|
export type { SecureSqliteFileOptions, SqliteOptions } from './sqlite.js';
|
|
98
98
|
export { convertUniqueIndexesToInlineConstraints };
|
|
99
99
|
declare const _default: {
|
|
100
100
|
getDatabase: typeof getDatabase;
|
|
101
101
|
syncSchema: typeof syncSchema;
|
|
102
102
|
tableExists: typeof tableExists;
|
|
103
|
-
buildWhere: (where: import(
|
|
103
|
+
buildWhere: (where: import("./index.js").WhereClause, startIndex?: number, adapterType?: import("./index.js").SqlAdapterType) => {
|
|
104
104
|
sql: string;
|
|
105
105
|
values: any[];
|
|
106
106
|
};
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAY,CAAC;AAClD,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EACb,WAAW,EACZ,MAAM,mBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAU,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,CAAC,eAAe,GAAG;IAAE,IAAI,CAAC,EAAE,UAAU,CAAA;CAAE,CAAC,GACzC,CAAC,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC,GACrC,CAAC,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC,GACrC,WAAW,CAAC;AAmBhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,WAAW,CAC/B,OAAO,GAAE,kBAAkB,GAAG,iBAAsB,GACnD,OAAO,CAAC,iBAAiB,CAAC,CAiD5B;AAaD;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE;IACxC,EAAE,EAAE,iBAAiB,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,iBAYA;AAED;;;;;;GAMG;AACH,wBAAsB,WAAW,CAAC,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,oBAEzE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAejD;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CASzD;AAGD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,mBAAgB,CAAC;AAEh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gB;AAChB,eAAO,MAAM,2BAA2B,OAAO,CAAC"}
|
package/dist/json.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConnectionCache } from
|
|
2
|
-
import { DatabaseInterface, JSONOptions } from
|
|
1
|
+
import { ConnectionCache } from "./shared/connection-cache.js";
|
|
2
|
+
import type { DatabaseInterface, JSONOptions } from "./shared/types.js";
|
|
3
3
|
/**
|
|
4
4
|
* Extend globalThis to include our connection cache properties.
|
|
5
5
|
* Using globalThis ensures all module instances share the same cache,
|
package/dist/json.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../src/json.ts"],"names":[],"mappings":"AASA,OAAO,EACL,eAAe,EAEhB,MAAM,
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../src/json.ts"],"names":[],"mappings":"AASA,OAAO,EACL,eAAe,EAEhB,MAAM,8BAA2B,CAAC;AAQnC,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EAOZ,MAAM,mBAAgB,CAAC;AASxB;;;;;;;GAOG;AACH,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,4BAA4B,EAC5B,eAAe,CAAC,iBAAiB,CAAC,GAClC,SAAS,CAAC;CACf;AAuPD;;;GAGG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAE1D;AAwuBD;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,iBAAiB,CAAC,CAmB5B"}
|
package/dist/postgres.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConnectionCache } from
|
|
2
|
-
import { DatabaseCacheOptions, DatabaseInterface } from
|
|
1
|
+
import { ConnectionCache } from "./shared/connection-cache.js";
|
|
2
|
+
import type { DatabaseCacheOptions, DatabaseInterface } from "./shared/types.js";
|
|
3
3
|
/**
|
|
4
4
|
* Configuration options for PostgreSQL database connections
|
|
5
5
|
*/
|
|
@@ -61,7 +61,7 @@ export interface PostgresOptions extends DatabaseCacheOptions {
|
|
|
61
61
|
* The option exists so callers can pass schemas uniformly to all adapters
|
|
62
62
|
* without knowing the adapter type. Only JSON/DuckDB adapters resolve it.
|
|
63
63
|
*/
|
|
64
|
-
schemas?: import(
|
|
64
|
+
schemas?: import("./shared/types.js").SchemasOption;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Module-level cache for PostgreSQL connections.
|
package/dist/postgres.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../src/postgres.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,eAAe,EAEhB,MAAM,
|
|
1
|
+
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../src/postgres.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,eAAe,EAEhB,MAAM,8BAA2B,CAAC;AACnC,OAAO,KAAK,EAIV,oBAAoB,EACpB,iBAAiB,EAYlB,MAAM,mBAAgB,CAAC;AAUxB;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,oBAAoB;IAC3D;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,mBAAgB,EAAE,aAAa,CAAC;CAClD;AAED;;;;GAIG;AACH,OAAO,CAAC,MAAM,CAAC;IAIb,IAAI,6BAA6B,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAElE,IAAI,gCAAgC,EAChC,eAAe,CAAC,iBAAiB,CAAC,GAClC,SAAS,CAAC;CACf;AAkBD;;;GAGG;AACH,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,IAAI,CAAC,CAElE;AA6HD,yDAAyD;AACzD,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAM7B;AAicD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,WAAW,CAC/B,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,iBAAiB,CAAC,CAU5B"}
|
package/dist/schema-manager.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Schema management and dependency resolution for JSON manifests
|
|
3
|
+
* Moved from SMRT package to SQL package for proper separation of concerns
|
|
4
|
+
*/
|
|
5
|
+
import type { DatabaseInterface, SchemaInitializationOptions } from './shared/types.js';
|
|
2
6
|
/**
|
|
3
7
|
* Result returned by DatabaseSchemaManager.initializeSchemas()
|
|
4
8
|
*
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for ALTER TABLE operations
|
|
3
|
+
*
|
|
4
|
+
* Provides database-agnostic utilities for generating ALTER TABLE statements,
|
|
5
|
+
* handling column definitions, and creating indexes.
|
|
6
|
+
*/
|
|
7
|
+
import type { ColumnDefinitionWithName, IndexDefinition } from './types.js';
|
|
2
8
|
/**
|
|
3
9
|
* Database dialect type for SQL generation
|
|
4
10
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatabaseCacheOptions } from
|
|
1
|
+
import type { DatabaseCacheOptions } from "./types.js";
|
|
2
2
|
declare const CACHED_VALIDATION_CAPABILITY: unique symbol;
|
|
3
3
|
/** Race-safe async resource cache used by database adapters. */
|
|
4
4
|
export declare class ConnectionCache<T> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-cache.d.ts","sourceRoot":"","sources":["../../src/shared/connection-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"connection-cache.d.ts","sourceRoot":"","sources":["../../src/shared/connection-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAS,CAAC;AAEpD,QAAA,MAAM,4BAA4B,eAEjC,CAAC;AAqBF,gEAAgE;AAChE,qBAAa,eAAe,CAAC,CAAC;;IAC5B,QAAQ,CAAC,CAAC,4BAA4B,CAAC,QAAQ;IAWzC,WAAW,CACf,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,OAAO,EAAE,oBAAoB,EAC7B,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACxB,KAAK,EAAE,CAAC,UAAU,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,EACvC,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,GACnD,OAAO,CAAC,CAAC,CAAC;IA2FP,KAAK,CACT,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,CAAC,UAAU,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,EACvC,YAAY,GAAE,OAAO,GAAG,OAAiB;IA8ErC,KAAK,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC;IAwBnD,MAAM,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI;IAQ3B,yEAAyE;IACzE,IAAI,IAAI,IAAI,MAAM,CASjB;CAuEF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GACxB,eAAe,CAAC,CAAC,CAAC,CAkIpB;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,oBAAoB,QAIzE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatabaseInterface, DatabaseOptions } from
|
|
1
|
+
import type { DatabaseInterface, DatabaseOptions } from "./types.js";
|
|
2
2
|
export type SqliteAdapterPath = 'libsql' | 'native' | 'secure';
|
|
3
3
|
export declare function getCachedSqliteDatabase(path: SqliteAdapterPath, options: DatabaseOptions, create: () => Promise<DatabaseInterface>): Promise<DatabaseInterface>;
|
|
4
4
|
//# sourceMappingURL=sqlite-connection-cache.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-connection-cache.d.ts","sourceRoot":"","sources":["../../src/shared/sqlite-connection-cache.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sqlite-connection-cache.d.ts","sourceRoot":"","sources":["../../src/shared/sqlite-connection-cache.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,YAAS,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AA0E/D,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,GACvC,OAAO,CAAC,iBAAiB,CAAC,CAqC5B"}
|
package/dist/shared/utils.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared SQL utilities that work in both browser and Node.js environments
|
|
3
|
+
*/
|
|
1
4
|
import { DatabaseError } from '@happyvertical/utils';
|
|
2
|
-
import { WhereClause } from './types.js';
|
|
5
|
+
import type { WhereClause } from './types.js';
|
|
3
6
|
/**
|
|
4
7
|
* Formats a database error to include its useful non-secret details.
|
|
5
8
|
*
|
package/dist/sqlite-native.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DatabaseInterface } from './shared/types.js';
|
|
2
|
-
import { SqliteOptions } from './sqlite.js';
|
|
1
|
+
import type { DatabaseInterface } from './shared/types.js';
|
|
2
|
+
import type { SqliteOptions } from './sqlite.js';
|
|
3
3
|
type NativeCloseable = {
|
|
4
4
|
close?: () => void;
|
|
5
5
|
};
|
package/dist/sqlite.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatabaseInterface, DatabaseOptions, SqliteCapabilitiesOptions } from
|
|
1
|
+
import type { DatabaseInterface, DatabaseOptions, SqliteCapabilitiesOptions } from "./shared/types.js";
|
|
2
2
|
export declare function toSafeSqliteCount(value: unknown): number;
|
|
3
3
|
/** Options for the trusted-parent SQLite file acquisition boundary. */
|
|
4
4
|
export interface SecureSqliteFileOptions {
|
|
@@ -97,7 +97,7 @@ export interface SqliteOptions extends DatabaseOptions {
|
|
|
97
97
|
* When provided, these schemas will be used for table creation.
|
|
98
98
|
* Accepts a lazy function to defer schema building until needed.
|
|
99
99
|
*/
|
|
100
|
-
schemas?: import(
|
|
100
|
+
schemas?: import("./shared/types.js").SchemasOption;
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* Creates a SQLite database adapter
|
package/dist/sqlite.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../src/sqlite.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAGV,iBAAiB,EACjB,eAAe,EAIf,yBAAyB,EAK1B,MAAM,
|
|
1
|
+
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../src/sqlite.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAGV,iBAAiB,EACjB,eAAe,EAIf,yBAAyB,EAK1B,MAAM,mBAAgB,CAAC;AAsKxB,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CASxD;AAixBD,uEAAuE;AACvE,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,MAAM,EAAE,aAAa,CAAC;IAEtB;;;;;OAKG;IACH,OAAO,EAAE,gBAAgB,CAAC;IAE1B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,eAAe;IACpD;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,yBAAyB,CAAC;IAEzC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAAC;IAE/C;;;;;;;;;;;;;;;;;;OAkBG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,mBAAgB,EAAE,aAAa,CAAC;CAClD;AA+ED;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAuE5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/sql",
|
|
3
|
-
"version": "0.102.
|
|
3
|
+
"version": "0.102.2",
|
|
4
4
|
"description": "Database interface with support for SQLite, PostgreSQL, and DuckDB",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"license": "ISC",
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@duckdb/node-api": "1.4.3-r.3",
|
|
46
|
-
"@happyvertical/utils": "0.102.
|
|
46
|
+
"@happyvertical/utils": "0.102.2",
|
|
47
47
|
"@libsql/client": "0.17.2",
|
|
48
48
|
"pg": "^8.20.0",
|
|
49
49
|
"sqlite-vss": "^0.1.2"
|