MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / createDriver

Method createDriver

packages/mssql/src/MsSqlConnection.ts:34–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 }
33
34 override createDriver(): Driver {
35 const driver = super.createDriver();
36 const onReserveConnection = this.#onReserveConnection;
37
38 if (!onReserveConnection) {
39 return driver;
40 }
41
42 const acquireConnection = driver.acquireConnection.bind(driver);
43 driver.acquireConnection = async (options?: AbortableOperationOptions): Promise<DatabaseConnection> => {
44 const connection = await acquireConnection(options);
45 await onReserveConnection(connection);
46
47 return connection;
48 };
49
50 return driver;
51 }
52}
53
54/** Microsoft SQL Server database connection using the `tedious` driver. */

Callers

nothing calls this directly

Calls 1

bindMethod · 0.80

Tested by

no test coverage detected