"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SqlNode = void 0;
const utils_1 = require("../../../utils");
class SqlNode {
    constructor() {
        /**
         * 子节点
         */
        this.nodes = [];
    }
    /**
     * 追加子节点
     */
    addChildNode(node) {
        this.nodes.push(node);
    }
    /**
     * 获取子节点SQL
     */
    async executeChildren(paramMap, parameters) {
        const sqlBuilder = new utils_1.StringBuilder();
        for (const node of this.nodes) {
            sqlBuilder.append((await node.getSql(paramMap, parameters)) || '');
            sqlBuilder.append(' ');
        }
        return sqlBuilder.toString();
    }
    getParameters() {
        return this.parameters;
    }
}
exports.SqlNode = SqlNode;
//# sourceMappingURL=SqlNode.js.map