Merge pull request #273 from bknd-io/feat/schema-batch-statements

feat: batch schema manager statements
This commit is contained in:
dswbx
2025-10-01 09:39:19 +02:00
committed by GitHub
4 changed files with 56 additions and 38 deletions
+1 -6
View File
@@ -34,7 +34,6 @@ export class EntityManager<TBD extends object = DefaultDB> {
private _entities: Entity[] = [];
private _relations: EntityRelation[] = [];
private _indices: EntityIndex[] = [];
private _schema?: SchemaManager;
readonly emgr: EventManager<typeof EntityManager.Events>;
static readonly Events = { ...MutatorEvents, ...RepositoryEvents };
@@ -249,11 +248,7 @@ export class EntityManager<TBD extends object = DefaultDB> {
}
schema() {
if (!this._schema) {
this._schema = new SchemaManager(this);
}
return this._schema;
return new SchemaManager(this);
}
// @todo: centralize and add tests