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

Method mapOptions

packages/oracledb/src/OracleConnection.ts:125–140  ·  view source on GitHub ↗
(overrides: PoolAttributes)

Source from the content-addressed store, hash-verified

123 }
124
125 mapOptions(overrides: PoolAttributes): PoolAttributes {
126 const ret = { ...this.getConnectionOptions() } as PoolAttributes;
127 const dbName = this.config.get('dbName');
128 const pool = this.config.get('pool');
129 ret.poolMin = pool?.min;
130 ret.poolMax = pool?.max;
131 ret.poolTimeout = pool?.idleTimeoutMillis;
132 const user = this.config.get('user', dbName)!;
133 ret.user = user.startsWith('"') || user === 'system' ? user : this.platform.quoteIdentifier(user);
134 ret.connectionString = this.options.clientUrl ?? this.platform.getDefaultClientUrl();
135 Reflect.deleteProperty(ret, 'database');
136 Reflect.deleteProperty(ret, 'port');
137 Reflect.deleteProperty(ret, 'host');
138
139 return Utils.mergeConfig(ret, overrides);
140 }
141
142 override async execute<
143 T extends QueryResult | EntityData<AnyEntity> | EntityData<AnyEntity>[] = EntityData<AnyEntity>[],

Callers 2

createKyselyDialectMethod · 0.95
createDatabaseMethod · 0.45

Calls 4

mergeConfigMethod · 0.80
getMethod · 0.65
quoteIdentifierMethod · 0.45
getDefaultClientUrlMethod · 0.45

Tested by

no test coverage detected