@knestjs/core
Version:
Knestjs search to be a Nestjs ORM in which you write the models once and only once. This is done creating migrations automatically from the models that you create.
12 lines (8 loc) • 355 B
text/typescript
import { Operation } from "./operation.type";
export abstract class AbstractTableOperation implements Operation {
protected abstract getInternalChanges(): Operation[]
abstract apply():string
applyInternalChanges(): string {
return `(table) => {${this.getInternalChanges().map(c => `\n table.${c.apply()};`).join('')}\n}`
}
}