drizzle-databend 0.1.9 → 0.1.11
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/client.d.ts +8 -4
- package/dist/dialect.d.ts +2 -2
- package/dist/driver.d.ts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +705 -589
- package/dist/session.d.ts +5 -4
- package/package.json +11 -5
- package/src/client.ts +71 -27
- package/src/columns.ts +1 -1
- package/src/dialect.ts +17 -7
- package/src/driver.ts +9 -9
- package/src/index.ts +3 -3
- package/src/migrator.ts +1 -1
- package/src/pool.ts +3 -1
- package/src/session.ts +15 -15
- package/src/sql/result-mapper.ts +3 -4
- package/src/sql/selection.ts +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Connection } from 'databend-driver';
|
|
2
|
+
import type { QueryTypingsValue } from 'drizzle-orm';
|
|
2
3
|
export interface DatabendConnectionPool {
|
|
3
4
|
acquire(): Promise<Connection>;
|
|
4
5
|
release(connection: Connection): void | Promise<void>;
|
|
@@ -14,9 +15,12 @@ export declare function isPool(client: DatabendClientLike): client is DatabendCo
|
|
|
14
15
|
/**
|
|
15
16
|
* Convert Drizzle param array to a JSON value accepted by databend-driver's Params.
|
|
16
17
|
* Databend's Params is serde_json::Value, so we pass an array of JSON-serializable values.
|
|
18
|
+
*
|
|
19
|
+
* The databend-driver does client-side parameter substitution with no string escaping,
|
|
20
|
+
* so we must pre-escape single quotes here (SQL standard '' escaping).
|
|
17
21
|
*/
|
|
18
|
-
export declare function prepareParams(params: unknown[]): unknown[];
|
|
19
|
-
export declare function executeOnClient(client: DatabendClientLike, query: string, params: unknown[]): Promise<RowData[]>;
|
|
20
|
-
export declare function executeArraysOnClient(client: DatabendClientLike, query: string, params: unknown[]): Promise<ExecuteArraysResult>;
|
|
21
|
-
export declare function execOnClient(client: DatabendClientLike, query: string, params: unknown[]): Promise<number>;
|
|
22
|
+
export declare function prepareParams(params: unknown[], typings?: QueryTypingsValue[]): unknown[];
|
|
23
|
+
export declare function executeOnClient(client: DatabendClientLike, query: string, params: unknown[], typings?: QueryTypingsValue[]): Promise<RowData[]>;
|
|
24
|
+
export declare function executeArraysOnClient(client: DatabendClientLike, query: string, params: unknown[], typings?: QueryTypingsValue[]): Promise<ExecuteArraysResult>;
|
|
25
|
+
export declare function execOnClient(client: DatabendClientLike, query: string, params: unknown[], typings?: QueryTypingsValue[]): Promise<number>;
|
|
22
26
|
export declare function closeClientConnection(connection: Connection): Promise<void>;
|
package/dist/dialect.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { type DriverValueEncoder, type QueryTypingsValue } from 'drizzle-orm';
|
|
1
2
|
import { entityKind } from 'drizzle-orm/entity';
|
|
2
3
|
import type { MigrationConfig, MigrationMeta } from 'drizzle-orm/migrator';
|
|
3
|
-
import { PgDialect, PgSession } from 'drizzle-orm/pg-core';
|
|
4
|
-
import { type DriverValueEncoder, type QueryTypingsValue } from 'drizzle-orm';
|
|
4
|
+
import { PgDialect, type PgSession } from 'drizzle-orm/pg-core';
|
|
5
5
|
export declare class DatabendDialect extends PgDialect {
|
|
6
6
|
static readonly [entityKind]: string;
|
|
7
7
|
areSavepointsUnsupported(): boolean;
|
package/dist/driver.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { entityKind } from 'drizzle-orm/entity';
|
|
|
3
3
|
import type { Logger } from 'drizzle-orm/logger';
|
|
4
4
|
import { PgDatabase } from 'drizzle-orm/pg-core/db';
|
|
5
5
|
import { type ExtractTablesWithRelations, type RelationalSchemaConfig, type TablesRelationalConfig } from 'drizzle-orm/relations';
|
|
6
|
-
import {
|
|
7
|
-
import type { DatabendClientLike, DatabendQueryResultHKT, DatabendTransaction } from './session.ts';
|
|
8
|
-
import { DatabendSession } from './session.ts';
|
|
6
|
+
import type { DrizzleConfig } from 'drizzle-orm/utils';
|
|
9
7
|
import { DatabendDialect } from './dialect.ts';
|
|
10
8
|
import { type DatabendPoolConfig } from './pool.ts';
|
|
9
|
+
import type { DatabendClientLike, DatabendQueryResultHKT, DatabendTransaction } from './session.ts';
|
|
10
|
+
import { DatabendSession } from './session.ts';
|
|
11
11
|
export interface DatabendDriverOptions {
|
|
12
12
|
logger?: Logger;
|
|
13
13
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './session.ts';
|
|
1
|
+
export * from './client.ts';
|
|
3
2
|
export * from './columns.ts';
|
|
3
|
+
export * from './driver.ts';
|
|
4
4
|
export * from './migrator.ts';
|
|
5
|
-
export * from './client.ts';
|
|
6
5
|
export * from './pool.ts';
|
|
6
|
+
export * from './session.ts';
|