@prisma/adapter-neon 6.13.0-dev.2 → 6.13.0-dev.21
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.mts +56 -1
- package/dist/index.d.ts +56 -1
- package/dist/index.js +3 -0
- package/dist/index.mjs +3 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
|
+
import type { ConnectionInfo } from '@prisma/driver-adapter-utils';
|
|
2
|
+
import type { IsolationLevel } from '@prisma/driver-adapter-utils';
|
|
1
3
|
import * as neon from '@neondatabase/serverless';
|
|
2
4
|
import type { SqlDriverAdapter } from '@prisma/driver-adapter-utils';
|
|
3
5
|
import type { SqlDriverAdapterFactory } from '@prisma/driver-adapter-utils';
|
|
6
|
+
import type { SqlQuery } from '@prisma/driver-adapter-utils';
|
|
7
|
+
import type { SqlQueryable } from '@prisma/driver-adapter-utils';
|
|
8
|
+
import type { SqlResultSet } from '@prisma/driver-adapter-utils';
|
|
9
|
+
import type { Transaction } from '@prisma/driver-adapter-utils';
|
|
10
|
+
|
|
11
|
+
declare type ARRAY_MODE_ENABLED = true;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Base class for http client, ws client and ws transaction
|
|
15
|
+
*/
|
|
16
|
+
declare abstract class NeonQueryable implements SqlQueryable {
|
|
17
|
+
readonly provider = "postgres";
|
|
18
|
+
readonly adapterName: string;
|
|
19
|
+
/**
|
|
20
|
+
* Execute a query given as SQL, interpolating the given parameters.
|
|
21
|
+
*/
|
|
22
|
+
queryRaw(query: SqlQuery): Promise<SqlResultSet>;
|
|
23
|
+
/**
|
|
24
|
+
* Execute a query given as SQL, interpolating the given parameters and
|
|
25
|
+
* returning the number of affected rows.
|
|
26
|
+
* Note: Queryable expects a u64, but napi.rs only supports u32.
|
|
27
|
+
*/
|
|
28
|
+
executeRaw(query: SqlQuery): Promise<number>;
|
|
29
|
+
/**
|
|
30
|
+
* Run a query against the database, returning the result set.
|
|
31
|
+
* Should the query fail due to a connection error, the connection is
|
|
32
|
+
* marked as unhealthy.
|
|
33
|
+
*/
|
|
34
|
+
abstract performIO(query: SqlQuery): Promise<PerformIOResult>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Base class for WS-based queryables: top-level client and transaction
|
|
39
|
+
*/
|
|
40
|
+
declare class NeonWsQueryable<ClientT extends neon.Pool | neon.PoolClient> extends NeonQueryable {
|
|
41
|
+
protected client: ClientT;
|
|
42
|
+
constructor(client: ClientT);
|
|
43
|
+
performIO(query: SqlQuery): Promise<PerformIOResult>;
|
|
44
|
+
protected onError(e: any): never;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare type PerformIOResult = neon.QueryResult<any> | neon.FullQueryResults<ARRAY_MODE_ENABLED>;
|
|
4
48
|
|
|
5
49
|
export declare class PrismaNeon implements SqlDriverAdapterFactory {
|
|
6
50
|
private readonly config;
|
|
@@ -8,7 +52,18 @@ export declare class PrismaNeon implements SqlDriverAdapterFactory {
|
|
|
8
52
|
readonly provider = "postgres";
|
|
9
53
|
readonly adapterName: string;
|
|
10
54
|
constructor(config: neon.PoolConfig, options?: PrismaNeonOptions | undefined);
|
|
11
|
-
connect(): Promise<
|
|
55
|
+
connect(): Promise<PrismaNeonAdapter>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare class PrismaNeonAdapter extends NeonWsQueryable<neon.Pool> implements SqlDriverAdapter {
|
|
59
|
+
private options?;
|
|
60
|
+
private isRunning;
|
|
61
|
+
constructor(pool: neon.Pool, options?: PrismaNeonOptions | undefined);
|
|
62
|
+
executeScript(_script: string): Promise<void>;
|
|
63
|
+
startTransaction(isolationLevel?: IsolationLevel): Promise<Transaction>;
|
|
64
|
+
getConnectionInfo(): ConnectionInfo;
|
|
65
|
+
dispose(): Promise<void>;
|
|
66
|
+
underlyingDriver(): neon.Pool;
|
|
12
67
|
}
|
|
13
68
|
|
|
14
69
|
export declare class PrismaNeonHTTP implements SqlDriverAdapterFactory {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
|
+
import type { ConnectionInfo } from '@prisma/driver-adapter-utils';
|
|
2
|
+
import type { IsolationLevel } from '@prisma/driver-adapter-utils';
|
|
1
3
|
import * as neon from '@neondatabase/serverless';
|
|
2
4
|
import type { SqlDriverAdapter } from '@prisma/driver-adapter-utils';
|
|
3
5
|
import type { SqlDriverAdapterFactory } from '@prisma/driver-adapter-utils';
|
|
6
|
+
import type { SqlQuery } from '@prisma/driver-adapter-utils';
|
|
7
|
+
import type { SqlQueryable } from '@prisma/driver-adapter-utils';
|
|
8
|
+
import type { SqlResultSet } from '@prisma/driver-adapter-utils';
|
|
9
|
+
import type { Transaction } from '@prisma/driver-adapter-utils';
|
|
10
|
+
|
|
11
|
+
declare type ARRAY_MODE_ENABLED = true;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Base class for http client, ws client and ws transaction
|
|
15
|
+
*/
|
|
16
|
+
declare abstract class NeonQueryable implements SqlQueryable {
|
|
17
|
+
readonly provider = "postgres";
|
|
18
|
+
readonly adapterName: string;
|
|
19
|
+
/**
|
|
20
|
+
* Execute a query given as SQL, interpolating the given parameters.
|
|
21
|
+
*/
|
|
22
|
+
queryRaw(query: SqlQuery): Promise<SqlResultSet>;
|
|
23
|
+
/**
|
|
24
|
+
* Execute a query given as SQL, interpolating the given parameters and
|
|
25
|
+
* returning the number of affected rows.
|
|
26
|
+
* Note: Queryable expects a u64, but napi.rs only supports u32.
|
|
27
|
+
*/
|
|
28
|
+
executeRaw(query: SqlQuery): Promise<number>;
|
|
29
|
+
/**
|
|
30
|
+
* Run a query against the database, returning the result set.
|
|
31
|
+
* Should the query fail due to a connection error, the connection is
|
|
32
|
+
* marked as unhealthy.
|
|
33
|
+
*/
|
|
34
|
+
abstract performIO(query: SqlQuery): Promise<PerformIOResult>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Base class for WS-based queryables: top-level client and transaction
|
|
39
|
+
*/
|
|
40
|
+
declare class NeonWsQueryable<ClientT extends neon.Pool | neon.PoolClient> extends NeonQueryable {
|
|
41
|
+
protected client: ClientT;
|
|
42
|
+
constructor(client: ClientT);
|
|
43
|
+
performIO(query: SqlQuery): Promise<PerformIOResult>;
|
|
44
|
+
protected onError(e: any): never;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare type PerformIOResult = neon.QueryResult<any> | neon.FullQueryResults<ARRAY_MODE_ENABLED>;
|
|
4
48
|
|
|
5
49
|
export declare class PrismaNeon implements SqlDriverAdapterFactory {
|
|
6
50
|
private readonly config;
|
|
@@ -8,7 +52,18 @@ export declare class PrismaNeon implements SqlDriverAdapterFactory {
|
|
|
8
52
|
readonly provider = "postgres";
|
|
9
53
|
readonly adapterName: string;
|
|
10
54
|
constructor(config: neon.PoolConfig, options?: PrismaNeonOptions | undefined);
|
|
11
|
-
connect(): Promise<
|
|
55
|
+
connect(): Promise<PrismaNeonAdapter>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare class PrismaNeonAdapter extends NeonWsQueryable<neon.Pool> implements SqlDriverAdapter {
|
|
59
|
+
private options?;
|
|
60
|
+
private isRunning;
|
|
61
|
+
constructor(pool: neon.Pool, options?: PrismaNeonOptions | undefined);
|
|
62
|
+
executeScript(_script: string): Promise<void>;
|
|
63
|
+
startTransaction(isolationLevel?: IsolationLevel): Promise<Transaction>;
|
|
64
|
+
getConnectionInfo(): ConnectionInfo;
|
|
65
|
+
dispose(): Promise<void>;
|
|
66
|
+
underlyingDriver(): neon.Pool;
|
|
12
67
|
}
|
|
13
68
|
|
|
14
69
|
export declare class PrismaNeonHTTP implements SqlDriverAdapterFactory {
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-neon",
|
|
3
|
-
"version": "6.13.0-dev.
|
|
3
|
+
"version": "6.13.0-dev.21",
|
|
4
4
|
"description": "Prisma's driver adapter for \"@neondatabase/serverless\"",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"postgres-array": "3.0.4",
|
|
35
35
|
"@neondatabase/serverless": ">0.6.0 <2",
|
|
36
|
-
"@prisma/driver-adapter-utils": "6.13.0-dev.
|
|
36
|
+
"@prisma/driver-adapter-utils": "6.13.0-dev.21"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@swc/core": "1.11.5",
|