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

Method getSchema

packages/sql/src/query/QueryBuilder.ts:4268–4278  ·  view source on GitHub ↗
(alias: Alias<any>)

Source from the content-addressed store, hash-verified

4266 }
4267
4268 private getSchema(alias: Alias<any>): string | undefined {
4269 const { meta } = alias;
4270 const metaSchema = meta.schema && meta.schema !== '*' ? meta.schema : undefined;
4271 const schema = this.#state.schema ?? metaSchema ?? this.em?.schema ?? this.em?.config.getSchema(true);
4272
4273 if (schema === this.platform.getDefaultSchemaName()) {
4274 return undefined;
4275 }
4276
4277 return schema;
4278 }
4279
4280 /** @internal */
4281 createAlias<U = unknown>(

Callers 5

getNativeQueryMethod · 0.95
getQueryBaseMethod · 0.95
finalizeMethod · 0.95
wrapPaginateSubQueryMethod · 0.95
wrapModifySubQueryMethod · 0.95

Calls 2

getSchemaMethod · 0.65
getDefaultSchemaNameMethod · 0.45

Tested by

no test coverage detected