ddl-manager
Version:
store postgres procedures and triggers in files
33 lines • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CacheWithoutTriggersOn = void 0;
const psql_lang_1 = require("psql-lang");
class CacheWithoutTriggersOn extends psql_lang_1.AbstractNode {
static entry(cursor) {
return (cursor.beforePhrase("without", "triggers") ||
cursor.beforePhrase("without", "trigger"));
}
static parse(cursor) {
this.parseEntry(cursor);
const withoutTriggersOn = cursor.parse(psql_lang_1.TableReference);
return { withoutTriggersOn };
}
static parseEntry(cursor) {
cursor.readWord("without");
if (cursor.beforeWord("trigger")) {
cursor.readWord("trigger");
}
else {
cursor.readWord("triggers");
}
cursor.readWord("on");
}
template() {
return [
...["without", "triggers", "on"].map(psql_lang_1.keyword),
this.row.withoutTriggersOn
];
}
}
exports.CacheWithoutTriggersOn = CacheWithoutTriggersOn;
//# sourceMappingURL=CacheWithoutTriggersOn.js.map