AK-21/Graphite-Industrial-Intelligence
0
1"use strict";2var __defProp = Object.defineProperty;3var __getOwnPropDesc = Object.getOwnPropertyDescriptor;4var __getOwnPropNames = Object.getOwnPropertyNames;5var __hasOwnProp = Object.prototype.hasOwnProperty;6var __export = (target, all) => {7 for (var name in all)8 __defProp(target, name, { get: all[name], enumerable: true });9};10var __copyProps = (to, from, except, desc) => {11 if (from && typeof from === "object" || typeof from === "function") {12 for (let key of __getOwnPropNames(from))13 if (!__hasOwnProp.call(to, key) && key !== except)14 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });15 }16 return to;17};18var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));19var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);20var expressions_exports = {};21__export(expressions_exports, {22 concat: () => concat,23 substring: () => substring24});25module.exports = __toCommonJS(expressions_exports);26var import_expressions = require("../sql/expressions/index.cjs");27var import_sql = require("../sql/sql.cjs");28__reExport(expressions_exports, require("../sql/expressions/index.cjs"), module.exports);29function concat(column, value) {30 return import_sql.sql`${column} || ${(0, import_expressions.bindIfParam)(value, column)}`;31}32function substring(column, { from, for: _for }) {33 const chunks = [import_sql.sql`substring(`, column];34 if (from !== void 0) {35 chunks.push(import_sql.sql` from `, (0, import_expressions.bindIfParam)(from, column));36 }37 if (_for !== void 0) {38 chunks.push(import_sql.sql` for `, (0, import_expressions.bindIfParam)(_for, column));39 }40 chunks.push(import_sql.sql`)`);41 return import_sql.sql.join(chunks);42}43// Annotate the CommonJS export names for ESM import in node:440 && (module.exports = {45 concat,46 substring,47 ...require("../sql/expressions/index.cjs")48});49//# sourceMappingURL=expressions.cjs.map