AK-21/Graphite-Industrial-Intelligence
0
1import { bindIfParam } from "../sql/expressions/index.js";2import { sql } from "../sql/sql.js";3export * from "../sql/expressions/index.js";4function concat(column, value) {5 return sql`${column} || ${bindIfParam(value, column)}`;6}7function substring(column, { from, for: _for }) {8 const chunks = [sql`substring(`, column];9 if (from !== void 0) {10 chunks.push(sql` from `, bindIfParam(from, column));11 }12 if (_for !== void 0) {13 chunks.push(sql` for `, bindIfParam(_for, column));14 }15 chunks.push(sql`)`);16 return sql.join(chunks);17}18function rowId() {19 return sql`rowid`;20}21export {22 concat,23 rowId,24 substring25};26//# sourceMappingURL=expressions.js.map