UNPKG

lambdaorm-base

Version:
21 lines 821 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CreateSchema = void 0; class CreateSchema { // eslint-disable-next-line no-useless-constructor constructor(schemaService) { this.schemaService = schemaService; } create(dialect, connection) { const schema = this.schemaService.newSchema(); if (dialect && connection) { schema.infrastructure = this.schemaService.newInfrastructure(); schema.infrastructure.sources = []; schema.infrastructure.sources.push({ name: 'default', mapping: 'default', dialect, connection }); schema.infrastructure.mappings = [{ name: 'default', entities: [] }]; } return schema; } } exports.CreateSchema = CreateSchema; //# sourceMappingURL=create.js.map