"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AbstractRunQuery = void 0;
const sequelize_1 = require("sequelize");
class AbstractRunQuery {
    constructor(sequelize) {
        this.sequelize = sequelize;
        this.replacements = {};
    }
    runQuery(options = {}) {
        var _a;
        const queryOptions = {
            transaction: options.transaction,
            logging: options.logging,
            replacements: this.replacements,
            type: sequelize_1.QueryTypes.SELECT,
            nest: (_a = options.nest) !== null && _a !== void 0 ? _a : false
        };
        return this.sequelize.query(this.query, queryOptions);
    }
    buildSelect(entities) {
        return `SELECT ${entities.join(', ')} `;
    }
}
exports.AbstractRunQuery = AbstractRunQuery;
//# sourceMappingURL=abstract-run-query.js.map