UNPKG

rhombic

Version:

SQL parsing, lineage extraction and manipulation

15 lines 524 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.needToBeEscaped = void 0; const reserved_1 = require("../reserved"); /** * Returns `true` if the identifier needs to be escaped * @param identifier */ const needToBeEscaped = (identifier) => { if (identifier === "*") return false; return reserved_1.reserved.includes(identifier.toUpperCase()) || !/^[a-zA-Z]\w*$/.exec(identifier); }; exports.needToBeEscaped = needToBeEscaped; //# sourceMappingURL=needToBeEscaped.js.map