UNPKG

@uwdata/mosaic-sql

Version:

SQL query construction and analysis.

26 lines 673 B
import { FUNCTION } from '../constants.js'; import { ExprNode } from './node.js'; export class FunctionNode extends ExprNode { /** The function name. */ name; /** The function arguments. */ args; /** * Instantiate a function node. * @param name The function name. * @param args The function arguments. */ constructor(name, args = []) { super(FUNCTION); this.name = name; this.args = args; } /** * Generate a SQL query string for this node. */ toString() { const { name, args } = this; return `${name}(${args.join(', ')})`; } } //# sourceMappingURL=function.js.map