@mikro-orm/oracledb 7.2.0-dev.4 → 7.2.0-dev.6

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.
@@ -1,6 +1,6 @@
1
1
  import { AbstractSqlConnection, type AnyEntity, type EntityData, type LoggingOptions, NativeQueryBuilder, OracleDialect, type QueryResult, type RawQueryFragment, type Transaction } from '@mikro-orm/sql';
2
2
  import type { Routine } from '@mikro-orm/core';
3
- import { type PoolAttributes } from 'oracledb';
3
+ import oracledb, { type PoolAttributes } from 'oracledb';
4
4
  export declare class OracleConnection extends AbstractSqlConnection {
5
5
  private oraclePool?;
6
6
  private acquireOracleConnection?;
@@ -9,6 +9,8 @@ export declare class OracleConnection extends AbstractSqlConnection {
9
9
  execute<T extends QueryResult | EntityData<AnyEntity> | EntityData<AnyEntity>[] = EntityData<AnyEntity>[]>(query: string | NativeQueryBuilder | RawQueryFragment, params?: readonly unknown[], method?: 'all' | 'get' | 'run', ctx?: Transaction, loggerContext?: LoggingOptions): Promise<T>;
10
10
  /** @inheritDoc */
11
11
  executeDump(dump: string): Promise<void>;
12
+ /** Returns the `oracledb` connection pool backing this connection. */
13
+ getNativeClient(): Promise<oracledb.Pool>;
12
14
  /**
13
15
  * Oracle routines acquire their own pool connection with `autoCommit: true` (refcursor binds
14
16
  * and DML need to resolve in one round-trip), so they cannot share the EM's transaction. Wrapping
@@ -176,6 +176,11 @@ export class OracleConnection extends AbstractSqlConnection {
176
176
  }
177
177
  }
178
178
  }
179
+ /** Returns the `oracledb` connection pool backing this connection. */
180
+ async getNativeClient() {
181
+ await this.ensureConnection();
182
+ return this.requireNativeClient(this.oraclePool);
183
+ }
179
184
  /**
180
185
  * Oracle routines acquire their own pool connection with `autoCommit: true` (refcursor binds
181
186
  * and DML need to resolve in one round-trip), so they cannot share the EM's transaction. Wrapping
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/oracledb",
3
- "version": "7.2.0-dev.4",
3
+ "version": "7.2.0-dev.6",
4
4
  "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL, SQLite, MSSQL and Oracle databases.",
5
5
  "keywords": [
6
6
  "data-mapper",
@@ -42,7 +42,7 @@
42
42
  "copy": "node ../../scripts/copy.mjs"
43
43
  },
44
44
  "dependencies": {
45
- "@mikro-orm/sql": "7.2.0-dev.4",
45
+ "@mikro-orm/sql": "7.2.0-dev.6",
46
46
  "kysely": "0.29.4",
47
47
  "oracledb": "7.0.1"
48
48
  },
@@ -50,7 +50,7 @@
50
50
  "@mikro-orm/core": "^7.1.11"
51
51
  },
52
52
  "peerDependencies": {
53
- "@mikro-orm/core": "7.2.0-dev.4"
53
+ "@mikro-orm/core": "7.2.0-dev.6"
54
54
  },
55
55
  "engines": {
56
56
  "node": ">= 22.17.0"