@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.
@@ -26,14 +26,35 @@ type Value = NonIdentifierBrandedString | number | boolean | Date | [string, str
26
26
  * Supported value or SQL instance.
27
27
  */
28
28
  type RawValue = Value | Sql;
29
- declare function sql(strings: readonly string[], ...values: readonly (RawValue | Column | OlapTable<any> | View)[]): Sql;
29
+ /**
30
+ * Sql template tag interface with attached helper methods.
31
+ */
32
+ interface SqlTemplateTag {
33
+ (strings: readonly string[], ...values: readonly (RawValue | Column | OlapTable<any> | View)[]): Sql;
34
+ /**
35
+ * Join an array of Sql fragments with a separator.
36
+ * @param fragments - Array of Sql fragments to join
37
+ * @param separator - Optional separator string (defaults to ", ")
38
+ */
39
+ join(fragments: Sql[], separator?: string): Sql;
40
+ /**
41
+ * Create raw SQL from a string without parameterization.
42
+ * WARNING: SQL injection risk if used with untrusted input.
43
+ */
44
+ raw(text: string): Sql;
45
+ }
46
+ declare const sql: SqlTemplateTag;
30
47
  /**
31
48
  * A SQL instance can be nested within each other to build SQL strings.
32
49
  */
33
50
  declare class Sql {
34
51
  readonly values: Value[];
35
52
  readonly strings: string[];
36
- constructor(rawStrings: readonly string[], rawValues: readonly (RawValue | Column | OlapTable<any> | View)[]);
53
+ constructor(rawStrings: readonly string[], rawValues: readonly (RawValue | Column | OlapTable<any> | View | Sql)[]);
54
+ /**
55
+ * Append another Sql fragment, returning a new Sql instance.
56
+ */
57
+ append(other: Sql): Sql;
37
58
  }
38
59
  declare const toStaticQuery: (sql: Sql) => string;
39
60
  declare const toQuery: (sql: Sql) => [string, {
@@ -2356,4 +2377,4 @@ type SimpleAggregated<AggregationFunction extends string, ArgType = any> = {
2356
2377
  _argType?: ArgType;
2357
2378
  };
2358
2379
 
2359
- export { type ClickHouseInt as $, type Aggregated as A, getSqlResource as B, ClickHouseEngines as C, type DeadLetterModel as D, type EgressConfig as E, type FrameworkApp as F, getWorkflows as G, getWorkflow as H, IngestApi as I, getWebApps as J, getWebApp as K, LifeCycle as L, MaterializedView as M, getView as N, OlapTable as O, getViews as P, getMaterializedView as Q, getMaterializedViews as R, type SimpleAggregated as S, Task as T, type ClickHousePrecision as U, View as V, Workflow as W, type ClickHouseDecimal as X, type ClickHouseByteSize as Y, type ClickHouseFixedStringSize as Z, type ClickHouseFloat as _, type OlapConfig as a, type ClickHouseJson as a0, type LowCardinality as a1, type ClickHouseNamedTuple as a2, type ClickHouseDefault as a3, type ClickHouseTTL as a4, type ClickHouseMaterialized as a5, type WithDefault as a6, type ClickHouseCodec as a7, type DateTime as a8, type DateTime64 as a9, getValueFromParameter as aA, createClickhouseParameter as aB, mapToClickHouseType as aC, type MooseUtils as aD, MooseClient as aE, type ClickHousePoint as aF, type ClickHouseRing as aG, type ClickHouseLineString as aH, type ClickHouseMultiLineString as aI, type ClickHousePolygon as aJ, type ClickHouseMultiPolygon as aK, QueryClient as aL, WorkflowClient as aM, getTemporalClient as aN, ApiHelpers as aO, ConsumptionHelpers as aP, joinQueries as aQ, type ConsumerConfig as aR, type TransformConfig as aS, type TaskContext as aT, type TaskConfig as aU, type IngestPipelineConfig as aV, type MaterializedViewConfig as aW, type DateTimeString as aa, type DateTime64String as ab, type FixedString as ac, type Float32 as ad, type Float64 as ae, type Int8 as af, type Int16 as ag, type Int32 as ah, type Int64 as ai, type UInt8 as aj, type UInt16 as ak, type UInt32 as al, type UInt64 as am, type Decimal as an, type ApiUtil as ao, type ConsumptionUtil as ap, quoteIdentifier as aq, type IdentifierBrandedString as ar, type NonIdentifierBrandedString as as, type Value as at, type RawValue as au, sql as av, Sql as aw, toStaticQuery as ax, toQuery as ay, toQueryPreview as az, type S3QueueTableSettings as b, Stream as c, type StreamConfig as d, type DeadLetter as e, DeadLetterQueue as f, type IngestConfig as g, Api as h, type ApiConfig as i, ConsumptionApi as j, IngestPipeline as k, SqlResource as l, ETLPipeline as m, type ETLPipelineConfig as n, WebApp as o, type WebAppConfig as p, type WebAppHandler as q, getTables as r, getTable as s, getStreams as t, getStream as u, getIngestApis as v, getIngestApi as w, getApis as x, getApi as y, getSqlResources as z };
2380
+ export { type ClickHouseInt as $, type Aggregated as A, getSqlResource as B, ClickHouseEngines as C, type DeadLetterModel as D, type EgressConfig as E, type FrameworkApp as F, getWorkflows as G, getWorkflow as H, IngestApi as I, getWebApps as J, getWebApp as K, LifeCycle as L, MaterializedView as M, getView as N, OlapTable as O, getViews as P, getMaterializedView as Q, getMaterializedViews as R, type SimpleAggregated as S, Task as T, type ClickHousePrecision as U, View as V, Workflow as W, type ClickHouseDecimal as X, type ClickHouseByteSize as Y, type ClickHouseFixedStringSize as Z, type ClickHouseFloat as _, type OlapConfig as a, type ClickHouseJson as a0, type LowCardinality as a1, type ClickHouseNamedTuple as a2, type ClickHouseDefault as a3, type ClickHouseTTL as a4, type ClickHouseMaterialized as a5, type WithDefault as a6, type ClickHouseCodec as a7, type DateTime as a8, type DateTime64 as a9, toQueryPreview as aA, getValueFromParameter as aB, createClickhouseParameter as aC, mapToClickHouseType as aD, type MooseUtils as aE, MooseClient as aF, type ClickHousePoint as aG, type ClickHouseRing as aH, type ClickHouseLineString as aI, type ClickHouseMultiLineString as aJ, type ClickHousePolygon as aK, type ClickHouseMultiPolygon as aL, QueryClient as aM, WorkflowClient as aN, getTemporalClient as aO, ApiHelpers as aP, ConsumptionHelpers as aQ, joinQueries as aR, type ConsumerConfig as aS, type TransformConfig as aT, type TaskContext as aU, type TaskConfig as aV, type IngestPipelineConfig as aW, type MaterializedViewConfig as aX, type DateTimeString as aa, type DateTime64String as ab, type FixedString as ac, type Float32 as ad, type Float64 as ae, type Int8 as af, type Int16 as ag, type Int32 as ah, type Int64 as ai, type UInt8 as aj, type UInt16 as ak, type UInt32 as al, type UInt64 as am, type Decimal as an, type ApiUtil as ao, type ConsumptionUtil as ap, quoteIdentifier as aq, type IdentifierBrandedString as ar, type NonIdentifierBrandedString as as, type Value as at, type RawValue as au, type SqlTemplateTag as av, sql as aw, Sql as ax, toStaticQuery as ay, toQuery as az, type S3QueueTableSettings as b, Stream as c, type StreamConfig as d, type DeadLetter as e, DeadLetterQueue as f, type IngestConfig as g, Api as h, type ApiConfig as i, ConsumptionApi as j, IngestPipeline as k, SqlResource as l, ETLPipeline as m, type ETLPipelineConfig as n, WebApp as o, type WebAppConfig as p, type WebAppHandler as q, getTables as r, getTable as s, getStreams as t, getStream as u, getIngestApis as v, getIngestApi as w, getApis as x, getApi as y, getSqlResources as z };
@@ -26,14 +26,35 @@ type Value = NonIdentifierBrandedString | number | boolean | Date | [string, str
26
26
  * Supported value or SQL instance.
27
27
  */
28
28
  type RawValue = Value | Sql;
29
- declare function sql(strings: readonly string[], ...values: readonly (RawValue | Column | OlapTable<any> | View)[]): Sql;
29
+ /**
30
+ * Sql template tag interface with attached helper methods.
31
+ */
32
+ interface SqlTemplateTag {
33
+ (strings: readonly string[], ...values: readonly (RawValue | Column | OlapTable<any> | View)[]): Sql;
34
+ /**
35
+ * Join an array of Sql fragments with a separator.
36
+ * @param fragments - Array of Sql fragments to join
37
+ * @param separator - Optional separator string (defaults to ", ")
38
+ */
39
+ join(fragments: Sql[], separator?: string): Sql;
40
+ /**
41
+ * Create raw SQL from a string without parameterization.
42
+ * WARNING: SQL injection risk if used with untrusted input.
43
+ */
44
+ raw(text: string): Sql;
45
+ }
46
+ declare const sql: SqlTemplateTag;
30
47
  /**
31
48
  * A SQL instance can be nested within each other to build SQL strings.
32
49
  */
33
50
  declare class Sql {
34
51
  readonly values: Value[];
35
52
  readonly strings: string[];
36
- constructor(rawStrings: readonly string[], rawValues: readonly (RawValue | Column | OlapTable<any> | View)[]);
53
+ constructor(rawStrings: readonly string[], rawValues: readonly (RawValue | Column | OlapTable<any> | View | Sql)[]);
54
+ /**
55
+ * Append another Sql fragment, returning a new Sql instance.
56
+ */
57
+ append(other: Sql): Sql;
37
58
  }
38
59
  declare const toStaticQuery: (sql: Sql) => string;
39
60
  declare const toQuery: (sql: Sql) => [string, {
@@ -2356,4 +2377,4 @@ type SimpleAggregated<AggregationFunction extends string, ArgType = any> = {
2356
2377
  _argType?: ArgType;
2357
2378
  };
2358
2379
 
2359
- export { type ClickHouseInt as $, type Aggregated as A, getSqlResource as B, ClickHouseEngines as C, type DeadLetterModel as D, type EgressConfig as E, type FrameworkApp as F, getWorkflows as G, getWorkflow as H, IngestApi as I, getWebApps as J, getWebApp as K, LifeCycle as L, MaterializedView as M, getView as N, OlapTable as O, getViews as P, getMaterializedView as Q, getMaterializedViews as R, type SimpleAggregated as S, Task as T, type ClickHousePrecision as U, View as V, Workflow as W, type ClickHouseDecimal as X, type ClickHouseByteSize as Y, type ClickHouseFixedStringSize as Z, type ClickHouseFloat as _, type OlapConfig as a, type ClickHouseJson as a0, type LowCardinality as a1, type ClickHouseNamedTuple as a2, type ClickHouseDefault as a3, type ClickHouseTTL as a4, type ClickHouseMaterialized as a5, type WithDefault as a6, type ClickHouseCodec as a7, type DateTime as a8, type DateTime64 as a9, getValueFromParameter as aA, createClickhouseParameter as aB, mapToClickHouseType as aC, type MooseUtils as aD, MooseClient as aE, type ClickHousePoint as aF, type ClickHouseRing as aG, type ClickHouseLineString as aH, type ClickHouseMultiLineString as aI, type ClickHousePolygon as aJ, type ClickHouseMultiPolygon as aK, QueryClient as aL, WorkflowClient as aM, getTemporalClient as aN, ApiHelpers as aO, ConsumptionHelpers as aP, joinQueries as aQ, type ConsumerConfig as aR, type TransformConfig as aS, type TaskContext as aT, type TaskConfig as aU, type IngestPipelineConfig as aV, type MaterializedViewConfig as aW, type DateTimeString as aa, type DateTime64String as ab, type FixedString as ac, type Float32 as ad, type Float64 as ae, type Int8 as af, type Int16 as ag, type Int32 as ah, type Int64 as ai, type UInt8 as aj, type UInt16 as ak, type UInt32 as al, type UInt64 as am, type Decimal as an, type ApiUtil as ao, type ConsumptionUtil as ap, quoteIdentifier as aq, type IdentifierBrandedString as ar, type NonIdentifierBrandedString as as, type Value as at, type RawValue as au, sql as av, Sql as aw, toStaticQuery as ax, toQuery as ay, toQueryPreview as az, type S3QueueTableSettings as b, Stream as c, type StreamConfig as d, type DeadLetter as e, DeadLetterQueue as f, type IngestConfig as g, Api as h, type ApiConfig as i, ConsumptionApi as j, IngestPipeline as k, SqlResource as l, ETLPipeline as m, type ETLPipelineConfig as n, WebApp as o, type WebAppConfig as p, type WebAppHandler as q, getTables as r, getTable as s, getStreams as t, getStream as u, getIngestApis as v, getIngestApi as w, getApis as x, getApi as y, getSqlResources as z };
2380
+ export { type ClickHouseInt as $, type Aggregated as A, getSqlResource as B, ClickHouseEngines as C, type DeadLetterModel as D, type EgressConfig as E, type FrameworkApp as F, getWorkflows as G, getWorkflow as H, IngestApi as I, getWebApps as J, getWebApp as K, LifeCycle as L, MaterializedView as M, getView as N, OlapTable as O, getViews as P, getMaterializedView as Q, getMaterializedViews as R, type SimpleAggregated as S, Task as T, type ClickHousePrecision as U, View as V, Workflow as W, type ClickHouseDecimal as X, type ClickHouseByteSize as Y, type ClickHouseFixedStringSize as Z, type ClickHouseFloat as _, type OlapConfig as a, type ClickHouseJson as a0, type LowCardinality as a1, type ClickHouseNamedTuple as a2, type ClickHouseDefault as a3, type ClickHouseTTL as a4, type ClickHouseMaterialized as a5, type WithDefault as a6, type ClickHouseCodec as a7, type DateTime as a8, type DateTime64 as a9, toQueryPreview as aA, getValueFromParameter as aB, createClickhouseParameter as aC, mapToClickHouseType as aD, type MooseUtils as aE, MooseClient as aF, type ClickHousePoint as aG, type ClickHouseRing as aH, type ClickHouseLineString as aI, type ClickHouseMultiLineString as aJ, type ClickHousePolygon as aK, type ClickHouseMultiPolygon as aL, QueryClient as aM, WorkflowClient as aN, getTemporalClient as aO, ApiHelpers as aP, ConsumptionHelpers as aQ, joinQueries as aR, type ConsumerConfig as aS, type TransformConfig as aT, type TaskContext as aU, type TaskConfig as aV, type IngestPipelineConfig as aW, type MaterializedViewConfig as aX, type DateTimeString as aa, type DateTime64String as ab, type FixedString as ac, type Float32 as ad, type Float64 as ae, type Int8 as af, type Int16 as ag, type Int32 as ah, type Int64 as ai, type UInt8 as aj, type UInt16 as ak, type UInt32 as al, type UInt64 as am, type Decimal as an, type ApiUtil as ao, type ConsumptionUtil as ap, quoteIdentifier as aq, type IdentifierBrandedString as ar, type NonIdentifierBrandedString as as, type Value as at, type RawValue as au, type SqlTemplateTag as av, sql as aw, Sql as ax, toStaticQuery as ay, toQuery as az, type S3QueueTableSettings as b, Stream as c, type StreamConfig as d, type DeadLetter as e, DeadLetterQueue as f, type IngestConfig as g, Api as h, type ApiConfig as i, ConsumptionApi as j, IngestPipeline as k, SqlResource as l, ETLPipeline as m, type ETLPipelineConfig as n, WebApp as o, type WebAppConfig as p, type WebAppHandler as q, getTables as r, getTable as s, getStreams as t, getStream as u, getIngestApis as v, getIngestApi as w, getApis as x, getApi as y, getSqlResources as z };
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { JWT, Key } from './browserCompatible.mjs';
2
2
  import * as _clickhouse_client from '@clickhouse/client';
3
3
  import { KafkaJS } from '@514labs/kafka-javascript';
4
- import { aD as MooseUtils, ao as ApiUtil, aE as MooseClient } from './index-Aq9KzsRd.mjs';
5
- export { A as Aggregated, h as Api, i as ApiConfig, aO as ApiHelpers, 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, aH as ClickHouseLineString, a5 as ClickHouseMaterialized, aI as ClickHouseMultiLineString, aK as ClickHouseMultiPolygon, a2 as ClickHouseNamedTuple, aF as ClickHousePoint, aJ as ClickHousePolygon, U as ClickHousePrecision, aG as ClickHouseRing, a4 as ClickHouseTTL, j as ConsumptionApi, aP as ConsumptionHelpers, 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, aL as QueryClient, 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, aM as WorkflowClient, 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, aN as getTemporalClient, aA as getValueFromParameter, N as getView, P as getViews, K as getWebApp, J as getWebApps, H as getWorkflow, G as getWorkflows, aQ as joinQueries, aC as mapToClickHouseType, aq as quoteIdentifier, av as sql, ay as toQuery, az as toQueryPreview, ax as toStaticQuery } from './index-Aq9KzsRd.mjs';
4
+ import { aE as MooseUtils, ao as ApiUtil, aF as MooseClient } from './index-Dp8GJ3-u.mjs';
5
+ export { A as Aggregated, h as Api, i as ApiConfig, aP as ApiHelpers, 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, aI as ClickHouseLineString, a5 as ClickHouseMaterialized, aJ as ClickHouseMultiLineString, aL as ClickHouseMultiPolygon, a2 as ClickHouseNamedTuple, aG as ClickHousePoint, aK as ClickHousePolygon, U as ClickHousePrecision, aH as ClickHouseRing, a4 as ClickHouseTTL, j as ConsumptionApi, aQ as ConsumptionHelpers, 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, aM as QueryClient, 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, aN as WorkflowClient, 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, aO as getTemporalClient, aB as getValueFromParameter, N as getView, P as getViews, K as getWebApp, J as getWebApps, H as getWorkflow, G as getWorkflows, aR as joinQueries, aD as mapToClickHouseType, aq as quoteIdentifier, aw as sql, az as toQuery, aA as toQueryPreview, ay as toStaticQuery } from './index-Dp8GJ3-u.mjs';
6
6
  import http from 'http';
7
7
  import { IsTuple } from 'typia/lib/typings/IsTuple';
8
8
  import { Readable } from 'node:stream';
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { JWT, Key } from './browserCompatible.js';
2
2
  import * as _clickhouse_client from '@clickhouse/client';
3
3
  import { KafkaJS } from '@514labs/kafka-javascript';
4
- import { aD as MooseUtils, ao as ApiUtil, aE as MooseClient } from './index-Aq9KzsRd.js';
5
- export { A as Aggregated, h as Api, i as ApiConfig, aO as ApiHelpers, 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, aH as ClickHouseLineString, a5 as ClickHouseMaterialized, aI as ClickHouseMultiLineString, aK as ClickHouseMultiPolygon, a2 as ClickHouseNamedTuple, aF as ClickHousePoint, aJ as ClickHousePolygon, U as ClickHousePrecision, aG as ClickHouseRing, a4 as ClickHouseTTL, j as ConsumptionApi, aP as ConsumptionHelpers, 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, aL as QueryClient, 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, aM as WorkflowClient, 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, aN as getTemporalClient, aA as getValueFromParameter, N as getView, P as getViews, K as getWebApp, J as getWebApps, H as getWorkflow, G as getWorkflows, aQ as joinQueries, aC as mapToClickHouseType, aq as quoteIdentifier, av as sql, ay as toQuery, az as toQueryPreview, ax as toStaticQuery } from './index-Aq9KzsRd.js';
4
+ import { aE as MooseUtils, ao as ApiUtil, aF as MooseClient } from './index-Dp8GJ3-u.js';
5
+ export { A as Aggregated, h as Api, i as ApiConfig, aP as ApiHelpers, 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, aI as ClickHouseLineString, a5 as ClickHouseMaterialized, aJ as ClickHouseMultiLineString, aL as ClickHouseMultiPolygon, a2 as ClickHouseNamedTuple, aG as ClickHousePoint, aK as ClickHousePolygon, U as ClickHousePrecision, aH as ClickHouseRing, a4 as ClickHouseTTL, j as ConsumptionApi, aQ as ConsumptionHelpers, 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, aM as QueryClient, 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, aN as WorkflowClient, 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, aO as getTemporalClient, aB as getValueFromParameter, N as getView, P as getViews, K as getWebApp, J as getWebApps, H as getWorkflow, G as getWorkflows, aR as joinQueries, aD as mapToClickHouseType, aq as quoteIdentifier, aw as sql, az as toQuery, aA as toQueryPreview, ay as toStaticQuery } from './index-Dp8GJ3-u.js';
6
6
  import http from 'http';
7
7
  import { IsTuple } from 'typia/lib/typings/IsTuple';
8
8
  import { Readable } from 'node:stream';
package/dist/index.js CHANGED
@@ -736,7 +736,7 @@ var init_internal = __esm({
736
736
  });
737
737
 
738
738
  // src/sqlHelpers.ts
739
- function sql(strings, ...values) {
739
+ function sqlImpl(strings, ...values) {
740
740
  return new Sql(strings, values);
741
741
  }
742
742
  function createClickhouseParameter(parameterIndex, value) {
@@ -745,7 +745,7 @@ function createClickhouseParameter(parameterIndex, value) {
745
745
  function emptyIfUndefined(value) {
746
746
  return value === void 0 ? "" : value;
747
747
  }
748
- var quoteIdentifier, isTable, isView, isColumn, instanceofSql, Sql, toStaticQuery, toQuery, toQueryPreview, getValueFromParameter, mapToClickHouseType;
748
+ var quoteIdentifier, isTable, isView, isColumn, sql, instanceofSql, Sql, toStaticQuery, toQuery, toQueryPreview, getValueFromParameter, mapToClickHouseType;
749
749
  var init_sqlHelpers = __esm({
750
750
  "src/sqlHelpers.ts"() {
751
751
  "use strict";
@@ -755,8 +755,9 @@ var init_sqlHelpers = __esm({
755
755
  isTable = (value) => typeof value === "object" && value !== null && "kind" in value && value.kind === "OlapTable";
756
756
  isView = (value) => typeof value === "object" && value !== null && "kind" in value && value.kind === "View";
757
757
  isColumn = (value) => typeof value === "object" && value !== null && !("kind" in value) && "name" in value && "annotations" in value;
758
+ sql = sqlImpl;
758
759
  instanceofSql = (value) => typeof value === "object" && "values" in value && "strings" in value;
759
- Sql = class {
760
+ Sql = class _Sql {
760
761
  values;
761
762
  strings;
762
763
  constructor(rawStrings, rawValues) {
@@ -813,6 +814,23 @@ var init_sqlHelpers = __esm({
813
814
  }
814
815
  }
815
816
  }
817
+ /**
818
+ * Append another Sql fragment, returning a new Sql instance.
819
+ */
820
+ append(other) {
821
+ return new _Sql([...this.strings, ""], [...this.values, other]);
822
+ }
823
+ };
824
+ sql.join = function(fragments, separator) {
825
+ if (fragments.length === 0) return new Sql([""], []);
826
+ if (fragments.length === 1) return fragments[0];
827
+ const sep = separator ?? ", ";
828
+ const normalized = sep.includes(" ") ? sep : ` ${sep} `;
829
+ const strings = ["", ...Array(fragments.length - 1).fill(normalized), ""];
830
+ return new Sql(strings, fragments);
831
+ };
832
+ sql.raw = function(text) {
833
+ return new Sql([text], []);
816
834
  };
817
835
  toStaticQuery = (sql3) => {
818
836
  const [query, params] = toQuery(sql3);