@prisma/adapter-mariadb 6.13.0-dev.19 → 6.13.0-dev.20

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 CHANGED
@@ -1,6 +1,32 @@
1
+ import type { ConnectionInfo } from '@prisma/driver-adapter-utils';
2
+ import type { IsolationLevel } from '@prisma/driver-adapter-utils';
1
3
  import * as mariadb from 'mariadb';
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 ArrayModeResult = unknown[][] & {
12
+ meta?: mariadb.FieldInfo[];
13
+ affectedRows?: number;
14
+ insertId?: BigInt;
15
+ };
16
+
17
+ declare type Capabilities = {
18
+ supportsRelationJoins: boolean;
19
+ };
20
+
21
+ declare class MariaDbQueryable<Connection extends mariadb.Pool | mariadb.Connection> implements SqlQueryable {
22
+ protected client: Connection;
23
+ readonly provider = "mysql";
24
+ readonly adapterName: string;
25
+ constructor(client: Connection);
26
+ queryRaw(query: SqlQuery): Promise<SqlResultSet>;
27
+ executeRaw(query: SqlQuery): Promise<number>;
28
+ protected performIO(query: SqlQuery): Promise<ArrayModeResult>;
29
+ }
4
30
 
5
31
  export declare class PrismaMariaDb implements SqlDriverAdapterFactory {
6
32
  #private;
@@ -9,7 +35,18 @@ export declare class PrismaMariaDb implements SqlDriverAdapterFactory {
9
35
  readonly provider = "mysql";
10
36
  readonly adapterName: string;
11
37
  constructor(config: mariadb.PoolConfig | string, options?: PrismaMariadbOptions | undefined);
12
- connect(): Promise<SqlDriverAdapter>;
38
+ connect(): Promise<PrismaMariaDbAdapter>;
39
+ }
40
+
41
+ declare class PrismaMariaDbAdapter extends MariaDbQueryable<mariadb.Pool> implements SqlDriverAdapter {
42
+ private readonly capabilities;
43
+ private readonly options?;
44
+ constructor(client: mariadb.Pool, capabilities: Capabilities, options?: PrismaMariadbOptions | undefined);
45
+ executeScript(_script: string): Promise<void>;
46
+ getConnectionInfo(): ConnectionInfo;
47
+ startTransaction(isolationLevel?: IsolationLevel): Promise<Transaction>;
48
+ dispose(): Promise<void>;
49
+ underlyingDriver(): mariadb.Pool;
13
50
  }
14
51
 
15
52
  declare type PrismaMariadbOptions = {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,32 @@
1
+ import type { ConnectionInfo } from '@prisma/driver-adapter-utils';
2
+ import type { IsolationLevel } from '@prisma/driver-adapter-utils';
1
3
  import * as mariadb from 'mariadb';
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 ArrayModeResult = unknown[][] & {
12
+ meta?: mariadb.FieldInfo[];
13
+ affectedRows?: number;
14
+ insertId?: BigInt;
15
+ };
16
+
17
+ declare type Capabilities = {
18
+ supportsRelationJoins: boolean;
19
+ };
20
+
21
+ declare class MariaDbQueryable<Connection extends mariadb.Pool | mariadb.Connection> implements SqlQueryable {
22
+ protected client: Connection;
23
+ readonly provider = "mysql";
24
+ readonly adapterName: string;
25
+ constructor(client: Connection);
26
+ queryRaw(query: SqlQuery): Promise<SqlResultSet>;
27
+ executeRaw(query: SqlQuery): Promise<number>;
28
+ protected performIO(query: SqlQuery): Promise<ArrayModeResult>;
29
+ }
4
30
 
5
31
  export declare class PrismaMariaDb implements SqlDriverAdapterFactory {
6
32
  #private;
@@ -9,7 +35,18 @@ export declare class PrismaMariaDb implements SqlDriverAdapterFactory {
9
35
  readonly provider = "mysql";
10
36
  readonly adapterName: string;
11
37
  constructor(config: mariadb.PoolConfig | string, options?: PrismaMariadbOptions | undefined);
12
- connect(): Promise<SqlDriverAdapter>;
38
+ connect(): Promise<PrismaMariaDbAdapter>;
39
+ }
40
+
41
+ declare class PrismaMariaDbAdapter extends MariaDbQueryable<mariadb.Pool> implements SqlDriverAdapter {
42
+ private readonly capabilities;
43
+ private readonly options?;
44
+ constructor(client: mariadb.Pool, capabilities: Capabilities, options?: PrismaMariadbOptions | undefined);
45
+ executeScript(_script: string): Promise<void>;
46
+ getConnectionInfo(): ConnectionInfo;
47
+ startTransaction(isolationLevel?: IsolationLevel): Promise<Transaction>;
48
+ dispose(): Promise<void>;
49
+ underlyingDriver(): mariadb.Pool;
13
50
  }
14
51
 
15
52
  declare type PrismaMariadbOptions = {
package/dist/index.js CHANGED
@@ -359,6 +359,9 @@ var PrismaMariaDbAdapter = class extends MariaDbQueryable {
359
359
  async dispose() {
360
360
  await this.client.end();
361
361
  }
362
+ underlyingDriver() {
363
+ return this.client;
364
+ }
362
365
  };
363
366
  var PrismaMariaDbAdapterFactory = class {
364
367
  constructor(config, options) {
package/dist/index.mjs CHANGED
@@ -323,6 +323,9 @@ var PrismaMariaDbAdapter = class extends MariaDbQueryable {
323
323
  async dispose() {
324
324
  await this.client.end();
325
325
  }
326
+ underlyingDriver() {
327
+ return this.client;
328
+ }
326
329
  };
327
330
  var PrismaMariaDbAdapterFactory = class {
328
331
  constructor(config, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/adapter-mariadb",
3
- "version": "6.13.0-dev.19",
3
+ "version": "6.13.0-dev.20",
4
4
  "description": "Prisma's driver adapter for \"mariadb\"",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -32,7 +32,7 @@
32
32
  "sideEffects": false,
33
33
  "dependencies": {
34
34
  "mariadb": "3.4.2",
35
- "@prisma/driver-adapter-utils": "6.13.0-dev.19"
35
+ "@prisma/driver-adapter-utils": "6.13.0-dev.20"
36
36
  },
37
37
  "devDependencies": {
38
38
  "vitest": "3.0.9"