UNPKG

typeorm

Version:

Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB databases.

40 lines (38 loc) 1.36 kB
/** * Database's table exclusion constraint stored in this class. */ export class TableExclusion { // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- constructor(options) { this["@instanceof"] = Symbol.for("TableExclusion"); this.name = options.name; this.expression = options.expression; } // ------------------------------------------------------------------------- // Public Methods // ------------------------------------------------------------------------- /** * Creates a new copy of this constraint with exactly same properties. */ clone() { return new TableExclusion({ name: this.name, expression: this.expression, }); } // ------------------------------------------------------------------------- // Static Methods // ------------------------------------------------------------------------- /** * Creates exclusions from the exclusion metadata object. */ static create(exclusionMetadata) { return new TableExclusion({ name: exclusionMetadata.name, expression: exclusionMetadata.expression, }); } } //# sourceMappingURL=TableExclusion.js.map