UNPKG

ddl-manager

Version:

store postgres procedures and triggers in files

32 lines 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CacheOption = void 0; const psql_lang_1 = require("psql-lang"); const CacheIndex_1 = require("./CacheIndex"); const CacheWithoutInsertOn_1 = require("./CacheWithoutInsertOn"); const CacheWithoutTriggersOn_1 = require("./CacheWithoutTriggersOn"); class CacheOption extends psql_lang_1.AbstractNode { static entry(cursor) { return (cursor.before(CacheIndex_1.CacheIndex) || cursor.before(CacheWithoutInsertOn_1.CacheWithoutInsertOn) || cursor.before(CacheWithoutTriggersOn_1.CacheWithoutTriggersOn)); } static parse(cursor) { const option = this.parseOption(cursor); return { option }; } static parseOption(cursor) { if (cursor.before(CacheIndex_1.CacheIndex)) { return cursor.parse(CacheIndex_1.CacheIndex); } if (cursor.before(CacheWithoutInsertOn_1.CacheWithoutInsertOn)) { return cursor.parse(CacheWithoutInsertOn_1.CacheWithoutInsertOn); } return cursor.parse(CacheWithoutTriggersOn_1.CacheWithoutTriggersOn); } template() { return [this.row.option]; } } exports.CacheOption = CacheOption; //# sourceMappingURL=CacheOption.js.map