@leonardovida-md/drizzle-neo-duckdb 1.3.5 → 1.5.1

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 CHANGED
@@ -19,10 +19,7 @@ Works with local DuckDB files, in-memory databases, and [MotherDuck](https://mot
19
19
 
20
20
  > **Status:** Experimental. Core query building, migrations, and type inference work well. Some DuckDB-specific types and edge cases are still being refined.
21
21
 
22
- > **Note:** The main NPM package is now `@duckdbfan/drizzle-duckdb`.
23
- > The previous package `@leonardovida-md/drizzle-neo-duckdb` remains published but will be deprecated.
24
- > Updates will land in both packages through May 2, 2026.
25
- > After that date, only `@duckdbfan/drizzle-duckdb` will receive updates.
22
+ > **Note:** The npm package is `@duckdbfan/drizzle-duckdb`.
26
23
 
27
24
  Docs tip: every docs page has a **Markdown (raw)** button for LLM-friendly source.
28
25
 
@@ -40,7 +37,7 @@ npm install @duckdbfan/drizzle-duckdb @duckdb/node-api
40
37
  pnpm add @duckdbfan/drizzle-duckdb @duckdb/node-api
41
38
  ```
42
39
 
43
- Recommended client version is `@duckdb/node-api@1.4.4-r.1`, which bundles DuckDB 1.4.4.
40
+ Supported client versions include `@duckdb/node-api@1.4.4-r.1` and `@duckdb/node-api@1.5.1-r.1`. The repo now develops against `1.5.1-r.1`, and `1.4.4-r.1` remains supported.
44
41
 
45
42
  ## Quick Start
46
43
 
@@ -0,0 +1,3 @@
1
+ export declare function isPgArrayLiteral(value: string): boolean;
2
+ export declare function coerceArrayString(value: string): unknown[] | undefined;
3
+ export declare function parsePgArrayLiteral(value: string): unknown;
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type DuckDBConnection } from '@duckdb/node-api';
1
+ import { type DuckDBConnection, type DuckDBInstance } from '@duckdb/node-api';
2
2
  import type { PreparedStatementCacheConfig } from './options.ts';
3
3
  export type DuckDBClientLike = DuckDBConnection | DuckDBConnectionPool;
4
4
  export type RowData = Record<string, unknown>;
@@ -21,6 +21,7 @@ export interface PrepareParamsOptions {
21
21
  }
22
22
  export declare function prepareParams(params: unknown[], options?: PrepareParamsOptions): unknown[];
23
23
  export declare function closeClientConnection(connection: DuckDBConnection): Promise<void>;
24
+ export declare function closeDuckDbInstance(instance: DuckDBInstance): Promise<void>;
24
25
  export declare function executeOnClient(client: DuckDBClientLike, query: string, params: unknown[], options?: ExecuteClientOptions): Promise<RowData[]>;
25
26
  export declare function executeArraysOnClient(client: DuckDBClientLike, query: string, params: unknown[], options?: ExecuteClientOptions): Promise<ExecuteArraysResult>;
26
27
  export interface ExecuteInBatchesOptions {
package/dist/columns.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { type SQL } from 'drizzle-orm';
2
2
  import type { SQLWrapper } from 'drizzle-orm/sql/sql';
3
3
  import { type ListValueWrapper, type ArrayValueWrapper, type MapValueWrapper, type BlobValueWrapper, type JsonValueWrapper, type TimestampValueWrapper } from './value-wrappers-core.ts';
4
+ export { coerceArrayString } from './array-literals.ts';
4
5
  type IntColType = 'SMALLINT' | 'INTEGER' | 'BIGINT' | 'HUGEINT' | 'USMALLINT' | 'UINTEGER' | 'UBIGINT' | 'UHUGEINT' | 'INT' | 'INT16' | 'INT32' | 'INT64' | 'INT128' | 'LONG' | 'VARINT';
5
6
  type FloatColType = 'FLOAT' | 'DOUBLE';
6
7
  type StringColType = 'STRING' | 'VARCHAR' | 'TEXT';
@@ -12,7 +13,6 @@ type ListColType = `${AnyColType}[]`;
12
13
  type ArrayColType = `${AnyColType}[${number}]`;
13
14
  type StructColType = `STRUCT (${string})`;
14
15
  type Primitive = AnyColType | ListColType | ArrayColType | StructColType;
15
- export declare function coerceArrayString(value: string): unknown[] | undefined;
16
16
  export declare function formatLiteral(value: unknown, typeHint?: string): string;
17
17
  export declare function buildListLiteral(values: unknown[], elementType?: string): SQL;
18
18
  export declare function buildStructLiteral(value: Record<string, unknown>, schema?: Record<string, Primitive>): SQL;
@@ -22,7 +22,7 @@ export declare const duckDbList: <TData = unknown>(name: string, elementType: An
22
22
  dataType: "custom";
23
23
  columnType: "PgCustomColumn";
24
24
  data: TData[];
25
- driverParam: string | ListValueWrapper | unknown[];
25
+ driverParam: string | unknown[] | ListValueWrapper;
26
26
  enumValues: undefined;
27
27
  }>;
28
28
  export declare const duckDbArray: <TData = unknown>(name: string, elementType: AnyColType, fixedLength?: number) => import("drizzle-orm/pg-core").PgCustomColumnBuilder<{
@@ -140,4 +140,3 @@ export declare const duckDbTime: (name: string) => import("drizzle-orm/pg-core")
140
140
  export declare function duckDbArrayContains(column: SQLWrapper, values: unknown[] | SQLWrapper): SQL;
141
141
  export declare function duckDbArrayContained(column: SQLWrapper, values: unknown[] | SQLWrapper): SQL;
142
142
  export declare function duckDbArrayOverlaps(column: SQLWrapper, values: unknown[] | SQLWrapper): SQL;
143
- export {};