@514labs/moose-lib 0.6.337 → 0.6.338

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- export { A as Aggregated, h as Api, i as ApiConfig, ao as ApiUtil, Y as ClickHouseByteSize, a7 as ClickHouseCodec, X as ClickHouseDecimal, a3 as ClickHouseDefault, C as ClickHouseEngines, Z as ClickHouseFixedStringSize, _ as ClickHouseFloat, $ as ClickHouseInt, a0 as ClickHouseJson, a5 as ClickHouseMaterialized, a2 as ClickHouseNamedTuple, U as ClickHousePrecision, a4 as ClickHouseTTL, j as ConsumptionApi, ap as ConsumptionUtil, a8 as DateTime, a9 as DateTime64, ab as DateTime64String, aa as DateTimeString, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, an as Decimal, m as ETLPipeline, n as ETLPipelineConfig, E as EgressConfig, ac as FixedString, ad as Float32, ae as Float64, F as FrameworkApp, ar as IdentifierBrandedString, I as IngestApi, g as IngestConfig, k as IngestPipeline, ag as Int16, ah as Int32, ai as Int64, af as Int8, L as LifeCycle, a1 as LowCardinality, M as MaterializedView, as as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, au as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, aw as Sql, l as SqlResource, c as Stream, d as StreamConfig, T as Task, ak as UInt16, al as UInt32, am as UInt64, aj as UInt8, at as Value, V as View, o as WebApp, p as WebAppConfig, q as WebAppHandler, a6 as WithDefault, W as Workflow, aB as createClickhouseParameter, y as getApi, x as getApis, w as getIngestApi, v as getIngestApis, Q as getMaterializedView, R as getMaterializedViews, B as getSqlResource, z as getSqlResources, u as getStream, t as getStreams, s as getTable, r as getTables, aA as getValueFromParameter, N as getView, P as getViews, K as getWebApp, J as getWebApps, H as getWorkflow, G as getWorkflows, aC as mapToClickHouseType, aq as quoteIdentifier, av as sql, ay as toQuery, az as toQueryPreview, ax as toStaticQuery } from './index-Aq9KzsRd.mjs';
1
+ export { A as Aggregated, h as Api, i as ApiConfig, ao as ApiUtil, Y as ClickHouseByteSize, a7 as ClickHouseCodec, X as ClickHouseDecimal, a3 as ClickHouseDefault, C as ClickHouseEngines, Z as ClickHouseFixedStringSize, _ as ClickHouseFloat, $ as ClickHouseInt, a0 as ClickHouseJson, a5 as ClickHouseMaterialized, a2 as ClickHouseNamedTuple, U as ClickHousePrecision, a4 as ClickHouseTTL, j as ConsumptionApi, ap as ConsumptionUtil, a8 as DateTime, a9 as DateTime64, ab as DateTime64String, aa as DateTimeString, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, an as Decimal, m as ETLPipeline, n as ETLPipelineConfig, E as EgressConfig, ac as FixedString, ad as Float32, ae as Float64, F as FrameworkApp, ar as IdentifierBrandedString, I as IngestApi, g as IngestConfig, k as IngestPipeline, ag as Int16, ah as Int32, ai as Int64, af as Int8, L as LifeCycle, a1 as LowCardinality, M as MaterializedView, as as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, au as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, ax as Sql, l as SqlResource, av as SqlTemplateTag, c as Stream, d as StreamConfig, T as Task, ak as UInt16, al as UInt32, am as UInt64, aj as UInt8, at as Value, V as View, o as WebApp, p as WebAppConfig, q as WebAppHandler, a6 as WithDefault, W as Workflow, aC as createClickhouseParameter, y as getApi, x as getApis, w as getIngestApi, v as getIngestApis, Q as getMaterializedView, R as getMaterializedViews, B as getSqlResource, z as getSqlResources, u as getStream, t as getStreams, s as getTable, r as getTables, aB as getValueFromParameter, N as getView, P as getViews, K as getWebApp, J as getWebApps, H as getWorkflow, G as getWorkflows, aD as mapToClickHouseType, aq as quoteIdentifier, aw as sql, az as toQuery, aA as toQueryPreview, ay as toStaticQuery } from './index-Dp8GJ3-u.mjs';
2
2
  import 'typia';
3
3
  import 'typia/src/schemas/json/IJsonSchemaCollection';
4
4
  import 'typia/lib/tags';
@@ -1,4 +1,4 @@
1
- export { A as Aggregated, h as Api, i as ApiConfig, ao as ApiUtil, Y as ClickHouseByteSize, a7 as ClickHouseCodec, X as ClickHouseDecimal, a3 as ClickHouseDefault, C as ClickHouseEngines, Z as ClickHouseFixedStringSize, _ as ClickHouseFloat, $ as ClickHouseInt, a0 as ClickHouseJson, a5 as ClickHouseMaterialized, a2 as ClickHouseNamedTuple, U as ClickHousePrecision, a4 as ClickHouseTTL, j as ConsumptionApi, ap as ConsumptionUtil, a8 as DateTime, a9 as DateTime64, ab as DateTime64String, aa as DateTimeString, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, an as Decimal, m as ETLPipeline, n as ETLPipelineConfig, E as EgressConfig, ac as FixedString, ad as Float32, ae as Float64, F as FrameworkApp, ar as IdentifierBrandedString, I as IngestApi, g as IngestConfig, k as IngestPipeline, ag as Int16, ah as Int32, ai as Int64, af as Int8, L as LifeCycle, a1 as LowCardinality, M as MaterializedView, as as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, au as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, aw as Sql, l as SqlResource, c as Stream, d as StreamConfig, T as Task, ak as UInt16, al as UInt32, am as UInt64, aj as UInt8, at as Value, V as View, o as WebApp, p as WebAppConfig, q as WebAppHandler, a6 as WithDefault, W as Workflow, aB as createClickhouseParameter, y as getApi, x as getApis, w as getIngestApi, v as getIngestApis, Q as getMaterializedView, R as getMaterializedViews, B as getSqlResource, z as getSqlResources, u as getStream, t as getStreams, s as getTable, r as getTables, aA as getValueFromParameter, N as getView, P as getViews, K as getWebApp, J as getWebApps, H as getWorkflow, G as getWorkflows, aC as mapToClickHouseType, aq as quoteIdentifier, av as sql, ay as toQuery, az as toQueryPreview, ax as toStaticQuery } from './index-Aq9KzsRd.js';
1
+ export { A as Aggregated, h as Api, i as ApiConfig, ao as ApiUtil, Y as ClickHouseByteSize, a7 as ClickHouseCodec, X as ClickHouseDecimal, a3 as ClickHouseDefault, C as ClickHouseEngines, Z as ClickHouseFixedStringSize, _ as ClickHouseFloat, $ as ClickHouseInt, a0 as ClickHouseJson, a5 as ClickHouseMaterialized, a2 as ClickHouseNamedTuple, U as ClickHousePrecision, a4 as ClickHouseTTL, j as ConsumptionApi, ap as ConsumptionUtil, a8 as DateTime, a9 as DateTime64, ab as DateTime64String, aa as DateTimeString, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, an as Decimal, m as ETLPipeline, n as ETLPipelineConfig, E as EgressConfig, ac as FixedString, ad as Float32, ae as Float64, F as FrameworkApp, ar as IdentifierBrandedString, I as IngestApi, g as IngestConfig, k as IngestPipeline, ag as Int16, ah as Int32, ai as Int64, af as Int8, L as LifeCycle, a1 as LowCardinality, M as MaterializedView, as as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, au as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, ax as Sql, l as SqlResource, av as SqlTemplateTag, c as Stream, d as StreamConfig, T as Task, ak as UInt16, al as UInt32, am as UInt64, aj as UInt8, at as Value, V as View, o as WebApp, p as WebAppConfig, q as WebAppHandler, a6 as WithDefault, W as Workflow, aC as createClickhouseParameter, y as getApi, x as getApis, w as getIngestApi, v as getIngestApis, Q as getMaterializedView, R as getMaterializedViews, B as getSqlResource, z as getSqlResources, u as getStream, t as getStreams, s as getTable, r as getTables, aB as getValueFromParameter, N as getView, P as getViews, K as getWebApp, J as getWebApps, H as getWorkflow, G as getWorkflows, aD as mapToClickHouseType, aq as quoteIdentifier, aw as sql, az as toQuery, aA as toQueryPreview, ay as toStaticQuery } from './index-Dp8GJ3-u.js';
2
2
  import 'typia';
3
3
  import 'typia/src/schemas/json/IJsonSchemaCollection';
4
4
  import 'typia/lib/tags';
@@ -473,7 +473,7 @@ var init_secrets = __esm({
473
473
  });
474
474
 
475
475
  // src/sqlHelpers.ts
476
- function sql(strings, ...values) {
476
+ function sqlImpl(strings, ...values) {
477
477
  return new Sql(strings, values);
478
478
  }
479
479
  function createClickhouseParameter(parameterIndex, value) {
@@ -482,7 +482,7 @@ function createClickhouseParameter(parameterIndex, value) {
482
482
  function emptyIfUndefined(value) {
483
483
  return value === void 0 ? "" : value;
484
484
  }
485
- var quoteIdentifier, isTable, isView, isColumn, instanceofSql, Sql, toStaticQuery, toQuery, toQueryPreview, getValueFromParameter, mapToClickHouseType;
485
+ var quoteIdentifier, isTable, isView, isColumn, sql, instanceofSql, Sql, toStaticQuery, toQuery, toQueryPreview, getValueFromParameter, mapToClickHouseType;
486
486
  var init_sqlHelpers = __esm({
487
487
  "src/sqlHelpers.ts"() {
488
488
  "use strict";
@@ -492,8 +492,9 @@ var init_sqlHelpers = __esm({
492
492
  isTable = (value) => typeof value === "object" && value !== null && "kind" in value && value.kind === "OlapTable";
493
493
  isView = (value) => typeof value === "object" && value !== null && "kind" in value && value.kind === "View";
494
494
  isColumn = (value) => typeof value === "object" && value !== null && !("kind" in value) && "name" in value && "annotations" in value;
495
+ sql = sqlImpl;
495
496
  instanceofSql = (value) => typeof value === "object" && "values" in value && "strings" in value;
496
- Sql = class {
497
+ Sql = class _Sql {
497
498
  values;
498
499
  strings;
499
500
  constructor(rawStrings, rawValues) {
@@ -550,6 +551,23 @@ var init_sqlHelpers = __esm({
550
551
  }
551
552
  }
552
553
  }
554
+ /**
555
+ * Append another Sql fragment, returning a new Sql instance.
556
+ */
557
+ append(other) {
558
+ return new _Sql([...this.strings, ""], [...this.values, other]);
559
+ }
560
+ };
561
+ sql.join = function(fragments, separator) {
562
+ if (fragments.length === 0) return new Sql([""], []);
563
+ if (fragments.length === 1) return fragments[0];
564
+ const sep = separator ?? ", ";
565
+ const normalized = sep.includes(" ") ? sep : ` ${sep} `;
566
+ const strings = ["", ...Array(fragments.length - 1).fill(normalized), ""];
567
+ return new Sql(strings, fragments);
568
+ };
569
+ sql.raw = function(text) {
570
+ return new Sql([text], []);
553
571
  };
554
572
  toStaticQuery = (sql3) => {
555
573
  const [query, params] = toQuery(sql3);