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 rowId: () => rowId,24 substring: () => substring25});26module.exports = __toCommonJS(expressions_exports);27var import_expressions = require("../sql/expressions/index.cjs");28var import_sql = require("../sql/sql.cjs");29__reExport(expressions_exports, require("../sql/expressions/index.cjs"), module.exports);30function concat(column, value) {31 return import_sql.sql`${column} || ${(0, import_expressions.bindIfParam)(value, column)}`;32}33function substring(column, { from, for: _for }) {34 const chunks = [import_sql.sql`substring(`, column];35 if (from !== void 0) {36 chunks.push(import_sql.sql` from `, (0, import_expressions.bindIfParam)(from, column));37 }38 if (_for !== void 0) {39 chunks.push(import_sql.sql` for `, (0, import_expressions.bindIfParam)(_for, column));40 }41 chunks.push(import_sql.sql`)`);42 return import_sql.sql.join(chunks);43}44function rowId() {45 return import_sql.sql`rowid`;46}47// Annotate the CommonJS export names for ESM import in node:480 && (module.exports = {49 concat,50 rowId,51 substring,52 ...require("../sql/expressions/index.cjs")53});54//# sourceMappingURL=expressions.cjs.map