@514labs/moose-lib 0.6.435 → 0.6.436

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, ap as ApiUtil, a6 as ClickHouseAlias, Y as ClickHouseByteSize, a8 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, aq as ConsumptionUtil, a9 as DateTime, aa as DateTime64, ac as DateTime64String, ab as DateTimeString, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, ao as Decimal, m as ETLPipeline, n as ETLPipelineConfig, E as EgressConfig, ad as FixedString, ae as Float32, af as Float64, F as FrameworkApp, as as IdentifierBrandedString, I as IngestApi, g as IngestConfig, k as IngestPipeline, ah as Int16, ai as Int32, aj as Int64, ag as Int8, L as LifeCycle, a1 as LowCardinality, M as MaterializedView, at as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, av as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, ay as Sql, l as SqlResource, aw as SqlTemplateTag, c as Stream, d as StreamConfig, T as Task, al as UInt16, am as UInt32, an as UInt64, ak as UInt8, au as Value, V as View, o as WebApp, p as WebAppConfig, q as WebAppHandler, a7 as WithDefault, W as Workflow, aD 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, aC as getValueFromParameter, N as getView, P as getViews, K as getWebApp, J as getWebApps, H as getWorkflow, G as getWorkflows, aE as mapToClickHouseType, ar as quoteIdentifier, ax as sql, aA as toQuery, aB as toQueryPreview, az as toStaticQuery } from './index-DaI1orpy.mjs';
1
+ export { A as Aggregated, h as Api, i as ApiConfig, ap as ApiUtil, a6 as ClickHouseAlias, Y as ClickHouseByteSize, a8 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, aq as ConsumptionUtil, a9 as DateTime, aa as DateTime64, ac as DateTime64String, ab as DateTimeString, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, ao as Decimal, m as ETLPipeline, n as ETLPipelineConfig, E as EgressConfig, ad as FixedString, ae as Float32, af as Float64, F as FrameworkApp, as as IdentifierBrandedString, I as IngestApi, g as IngestConfig, k as IngestPipeline, ah as Int16, ai as Int32, aj as Int64, ag as Int8, L as LifeCycle, a1 as LowCardinality, M as MaterializedView, at as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, av as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, ay as Sql, l as SqlResource, aw as SqlTemplateTag, c as Stream, d as StreamConfig, T as Task, al as UInt16, am as UInt32, an as UInt64, ak as UInt8, au as Value, V as View, o as WebApp, p as WebAppConfig, q as WebAppHandler, a7 as WithDefault, W as Workflow, aD 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, aC as getValueFromParameter, N as getView, P as getViews, K as getWebApp, J as getWebApps, H as getWorkflow, G as getWorkflows, aE as mapToClickHouseType, ar as quoteIdentifier, ax as sql, aA as toQuery, aB as toQueryPreview, az as toStaticQuery } from './index-D22Yb8pY.mjs';
2
2
  import 'typia';
3
3
  import 'typia/lib/tags';
4
4
  import 'node:stream';
@@ -1,4 +1,4 @@
1
- export { A as Aggregated, h as Api, i as ApiConfig, ap as ApiUtil, a6 as ClickHouseAlias, Y as ClickHouseByteSize, a8 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, aq as ConsumptionUtil, a9 as DateTime, aa as DateTime64, ac as DateTime64String, ab as DateTimeString, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, ao as Decimal, m as ETLPipeline, n as ETLPipelineConfig, E as EgressConfig, ad as FixedString, ae as Float32, af as Float64, F as FrameworkApp, as as IdentifierBrandedString, I as IngestApi, g as IngestConfig, k as IngestPipeline, ah as Int16, ai as Int32, aj as Int64, ag as Int8, L as LifeCycle, a1 as LowCardinality, M as MaterializedView, at as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, av as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, ay as Sql, l as SqlResource, aw as SqlTemplateTag, c as Stream, d as StreamConfig, T as Task, al as UInt16, am as UInt32, an as UInt64, ak as UInt8, au as Value, V as View, o as WebApp, p as WebAppConfig, q as WebAppHandler, a7 as WithDefault, W as Workflow, aD 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, aC as getValueFromParameter, N as getView, P as getViews, K as getWebApp, J as getWebApps, H as getWorkflow, G as getWorkflows, aE as mapToClickHouseType, ar as quoteIdentifier, ax as sql, aA as toQuery, aB as toQueryPreview, az as toStaticQuery } from './index-DaI1orpy.js';
1
+ export { A as Aggregated, h as Api, i as ApiConfig, ap as ApiUtil, a6 as ClickHouseAlias, Y as ClickHouseByteSize, a8 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, aq as ConsumptionUtil, a9 as DateTime, aa as DateTime64, ac as DateTime64String, ab as DateTimeString, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, ao as Decimal, m as ETLPipeline, n as ETLPipelineConfig, E as EgressConfig, ad as FixedString, ae as Float32, af as Float64, F as FrameworkApp, as as IdentifierBrandedString, I as IngestApi, g as IngestConfig, k as IngestPipeline, ah as Int16, ai as Int32, aj as Int64, ag as Int8, L as LifeCycle, a1 as LowCardinality, M as MaterializedView, at as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, av as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, ay as Sql, l as SqlResource, aw as SqlTemplateTag, c as Stream, d as StreamConfig, T as Task, al as UInt16, am as UInt32, an as UInt64, ak as UInt8, au as Value, V as View, o as WebApp, p as WebAppConfig, q as WebAppHandler, a7 as WithDefault, W as Workflow, aD 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, aC as getValueFromParameter, N as getView, P as getViews, K as getWebApp, J as getWebApps, H as getWorkflow, G as getWorkflows, aE as mapToClickHouseType, ar as quoteIdentifier, ax as sql, aA as toQuery, aB as toQueryPreview, az as toStaticQuery } from './index-D22Yb8pY.js';
2
2
  import 'typia';
3
3
  import 'typia/lib/tags';
4
4
  import 'node:stream';
@@ -697,11 +697,18 @@ function sqlImpl(strings, ...values) {
697
697
  return new Sql(strings, values);
698
698
  }
699
699
  var sql = sqlImpl;
700
+ sql.statement = function(strings, ...values) {
701
+ return new Sql(strings, values, false);
702
+ };
703
+ sql.fragment = function(strings, ...values) {
704
+ return new Sql(strings, values, true);
705
+ };
700
706
  var instanceofSql = (value) => typeof value === "object" && "values" in value && "strings" in value;
701
707
  var Sql = class _Sql {
702
708
  values;
703
709
  strings;
704
- constructor(rawStrings, rawValues) {
710
+ isFragment;
711
+ constructor(rawStrings, rawValues, isFragment) {
705
712
  if (rawStrings.length - 1 !== rawValues.length) {
706
713
  if (rawStrings.length === 0) {
707
714
  throw new TypeError("Expected at least 1 string");
@@ -716,6 +723,7 @@ var Sql = class _Sql {
716
723
  );
717
724
  this.values = new Array(valuesLength);
718
725
  this.strings = new Array(valuesLength + 1);
726
+ this.isFragment = isFragment;
719
727
  this.strings[0] = rawStrings[0];
720
728
  let i = 0, pos = 0;
721
729
  while (i < rawValues.length) {
@@ -762,19 +770,26 @@ var Sql = class _Sql {
762
770
  * Append another Sql fragment, returning a new Sql instance.
763
771
  */
764
772
  append(other) {
765
- return new _Sql([...this.strings, ""], [...this.values, other]);
773
+ return new _Sql(
774
+ [...this.strings, ""],
775
+ [...this.values, other],
776
+ this.isFragment
777
+ );
766
778
  }
767
779
  };
768
780
  sql.join = function(fragments, separator) {
769
- if (fragments.length === 0) return new Sql([""], []);
770
- if (fragments.length === 1) return fragments[0];
781
+ if (fragments.length === 0) return new Sql([""], [], true);
782
+ if (fragments.length === 1) {
783
+ const frag = fragments[0];
784
+ return new Sql(frag.strings, frag.values, true);
785
+ }
771
786
  const sep = separator ?? ", ";
772
787
  const normalized = sep.includes(" ") ? sep : ` ${sep} `;
773
788
  const strings = ["", ...Array(fragments.length - 1).fill(normalized), ""];
774
- return new Sql(strings, fragments);
789
+ return new Sql(strings, fragments, true);
775
790
  };
776
791
  sql.raw = function(text) {
777
- return new Sql([text], []);
792
+ return new Sql([text], [], true);
778
793
  };
779
794
  var toStaticQuery = (sql3) => {
780
795
  const [query, params] = toQuery(sql3);