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

Method getConnection

packages/sql/src/query/QueryBuilder.ts:2516–2520  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2514 }
2515
2516 private getConnection(): AbstractSqlConnection {
2517 const write = !this.platform.getConfig().get('preferReadReplicas');
2518 const type = this.connectionType || (write ? 'write' : 'read');
2519 return this.driver.getConnection(type);
2520 }
2521
2522 /**
2523 * Executes the query and returns an async iterable (async generator) that yields results one by one.

Callers 2

executeMethod · 0.95
streamMethod · 0.95

Calls 2

getMethod · 0.65
getConnectionMethod · 0.65

Tested by

no test coverage detected