@sequeljs/ast
Version:
A SQL AST manager for JavaScript
23 lines • 740 B
JavaScript
/** @internal */ /** */
import Attribute from '../attributes/Attribute';
import SelectManager from '../managers/SelectManager';
import Table from '../Table';
import Casted from './Casted';
import Node from './Node';
import Quoted from './Quoted';
import SQLLiteral from './SQLLiteral';
function buildQuoted(other, attribute = null) {
if (other instanceof Attribute ||
other instanceof Node ||
other instanceof SQLLiteral ||
other instanceof SelectManager ||
other instanceof Table) {
return other;
}
if (attribute instanceof Attribute) {
return new Casted(other, attribute);
}
return new Quoted(other);
}
export default buildQuoted;
//# sourceMappingURL=buildQuoted.js.map