UNPKG

@sequeljs/ast

Version:

A SQL AST manager for JavaScript

25 lines 949 B
"use strict"; /** @internal */ /** */ Object.defineProperty(exports, "__esModule", { value: true }); const Attribute_1 = require("../attributes/Attribute"); const SelectManager_1 = require("../managers/SelectManager"); const Table_1 = require("../Table"); const Casted_1 = require("./Casted"); const Node_1 = require("./Node"); const Quoted_1 = require("./Quoted"); const SQLLiteral_1 = require("./SQLLiteral"); function buildQuoted(other, attribute = null) { if (other instanceof Attribute_1.default || other instanceof Node_1.default || other instanceof SQLLiteral_1.default || other instanceof SelectManager_1.default || other instanceof Table_1.default) { return other; } if (attribute instanceof Attribute_1.default) { return new Casted_1.default(other, attribute); } return new Quoted_1.default(other); } exports.default = buildQuoted; //# sourceMappingURL=buildQuoted.js.map