@malloydata/malloy 0.0.349 → 0.0.351

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.
Files changed (56) hide show
  1. package/dist/api/foundation/config.d.ts +22 -7
  2. package/dist/api/foundation/config.js +66 -24
  3. package/dist/api/foundation/index.d.ts +1 -0
  4. package/dist/api/foundation/index.js +4 -2
  5. package/dist/api/foundation/runtime.js +9 -4
  6. package/dist/api/foundation/types.d.ts +10 -3
  7. package/dist/api/foundation/types.js +13 -0
  8. package/dist/dialect/databricks/databricks.d.ts +94 -0
  9. package/dist/dialect/databricks/databricks.js +441 -0
  10. package/dist/dialect/databricks/dialect_functions.d.ts +2 -0
  11. package/dist/dialect/databricks/dialect_functions.js +67 -0
  12. package/dist/dialect/databricks/function_overrides.d.ts +2 -0
  13. package/dist/dialect/databricks/function_overrides.js +68 -0
  14. package/dist/dialect/databricks/index.d.ts +1 -0
  15. package/dist/dialect/databricks/index.js +22 -0
  16. package/dist/dialect/dialect.d.ts +24 -1
  17. package/dist/dialect/dialect.js +31 -1
  18. package/dist/dialect/dialect_map.js +2 -0
  19. package/dist/dialect/duckdb/duckdb.d.ts +2 -2
  20. package/dist/dialect/duckdb/duckdb.js +2 -1
  21. package/dist/dialect/index.d.ts +2 -1
  22. package/dist/dialect/index.js +3 -1
  23. package/dist/dialect/mysql/mysql.d.ts +2 -2
  24. package/dist/dialect/mysql/mysql.js +3 -2
  25. package/dist/dialect/postgres/postgres.d.ts +2 -2
  26. package/dist/dialect/postgres/postgres.js +3 -1
  27. package/dist/dialect/snowflake/snowflake.d.ts +2 -2
  28. package/dist/dialect/snowflake/snowflake.js +3 -1
  29. package/dist/dialect/standardsql/standardsql.d.ts +4 -3
  30. package/dist/dialect/standardsql/standardsql.js +6 -1
  31. package/dist/dialect/trino/trino.d.ts +2 -2
  32. package/dist/dialect/trino/trino.js +2 -1
  33. package/dist/index.d.ts +2 -2
  34. package/dist/index.js +4 -2
  35. package/dist/lang/ast/query-elements/query-base.d.ts +1 -1
  36. package/dist/lang/ast/query-elements/query-base.js +2 -2
  37. package/dist/lang/ast/query-elements/query-raw.d.ts +1 -1
  38. package/dist/lang/ast/query-elements/query-raw.js +2 -2
  39. package/dist/lang/ast/query-elements/query-reference.d.ts +1 -1
  40. package/dist/lang/ast/query-elements/query-reference.js +2 -2
  41. package/dist/lang/ast/sql-elements/sql-string.js +1 -1
  42. package/dist/lang/ast/types/query-element.d.ts +1 -1
  43. package/dist/lang/lib/Malloy/MalloyLexer.js +1 -1
  44. package/dist/lang/lib/Malloy/MalloyParser.js +1 -1
  45. package/dist/lang/lib/Malloy/MalloyParserListener.js +1 -1
  46. package/dist/lang/lib/Malloy/MalloyParserVisitor.js +1 -1
  47. package/dist/model/malloy_types.d.ts +11 -7
  48. package/dist/model/query_query.d.ts +2 -2
  49. package/dist/model/query_query.js +60 -22
  50. package/dist/model/sql_compiled.js +3 -3
  51. package/dist/test/resultMatchers.d.ts +5 -3
  52. package/dist/test/resultMatchers.js +160 -150
  53. package/dist/version.d.ts +1 -1
  54. package/dist/version.js +1 -1
  55. package/femto-config.motly +21 -0
  56. package/package.json +8 -6
@@ -13,12 +13,19 @@ export interface MalloyProjectConfig {
13
13
  * In-memory manifest store. Reads, updates, and serializes manifest data.
14
14
  *
15
15
  * Always valid — starts empty, call load() to populate from a file.
16
- * The internal BuildManifest object is stable: load() and update() mutate
17
- * the same object, so any reference obtained via `buildManifest` stays current.
16
+ * The BuildManifest object returned by `buildManifest` is stable: load()
17
+ * and update() mutate the same entries object, so any reference obtained
18
+ * via `buildManifest` stays current without re-assignment.
19
+ *
20
+ * The `strict` flag controls what happens when a persist source's BuildID
21
+ * is not found in the manifest. When strict, the compiler throws an error
22
+ * instead of falling through to inline SQL. The flag is loaded from the
23
+ * manifest file and can be overridden by the application before creating
24
+ * a Runtime.
18
25
  */
19
26
  export declare class Manifest {
20
27
  private readonly _urlReader?;
21
- private readonly _data;
28
+ private readonly _manifest;
22
29
  private readonly _touched;
23
30
  constructor(urlReader?: URLReader);
24
31
  /**
@@ -36,9 +43,15 @@ export declare class Manifest {
36
43
  /**
37
44
  * The live BuildManifest. This is a stable reference — load() and update()
38
45
  * mutate the same object, so passing this to a Runtime means the Runtime
39
- * always sees current data.
46
+ * always sees current data including the strict flag.
40
47
  */
41
48
  get buildManifest(): BuildManifest;
49
+ /**
50
+ * Whether missing manifest entries should cause errors.
51
+ * Loaded from the manifest file; can be overridden by the application.
52
+ */
53
+ get strict(): boolean;
54
+ set strict(value: boolean);
42
55
  /**
43
56
  * Add or replace a manifest entry. Also marks it as touched.
44
57
  */
@@ -49,11 +62,13 @@ export declare class Manifest {
49
62
  */
50
63
  touch(buildId: BuildID): void;
51
64
  /**
52
- * Returns only entries that were update()d or touch()ed.
53
- * This is the manifest a builder should write — it reflects
54
- * exactly what the current build references.
65
+ * Returns a BuildManifest with only entries that were update()d or touch()ed.
66
+ * This is the manifest a builder should write — it reflects exactly what the
67
+ * current build references. Preserves the strict flag.
55
68
  */
56
69
  get activeEntries(): BuildManifest;
70
+ private _clearEntries;
71
+ private _loadParsed;
57
72
  }
58
73
  /**
59
74
  * Loads and holds a Malloy project configuration (connections + manifest).
@@ -12,12 +12,19 @@ const MANIFEST_FILENAME = 'malloy-manifest.json';
12
12
  * In-memory manifest store. Reads, updates, and serializes manifest data.
13
13
  *
14
14
  * Always valid — starts empty, call load() to populate from a file.
15
- * The internal BuildManifest object is stable: load() and update() mutate
16
- * the same object, so any reference obtained via `buildManifest` stays current.
15
+ * The BuildManifest object returned by `buildManifest` is stable: load()
16
+ * and update() mutate the same entries object, so any reference obtained
17
+ * via `buildManifest` stays current without re-assignment.
18
+ *
19
+ * The `strict` flag controls what happens when a persist source's BuildID
20
+ * is not found in the manifest. When strict, the compiler throws an error
21
+ * instead of falling through to inline SQL. The flag is loaded from the
22
+ * manifest file and can be overridden by the application before creating
23
+ * a Runtime.
17
24
  */
18
25
  class Manifest {
19
26
  constructor(urlReader) {
20
- this._data = {};
27
+ this._manifest = { entries: {}, strict: false };
21
28
  this._touched = new Set();
22
29
  this._urlReader = urlReader;
23
30
  }
@@ -28,11 +35,9 @@ class Manifest {
28
35
  * is available, clears to empty.
29
36
  */
30
37
  async load(manifestRoot) {
31
- // Clear existing entries and touched set
32
- for (const key of Object.keys(this._data)) {
33
- delete this._data[key];
34
- }
38
+ this._clearEntries();
35
39
  this._touched.clear();
40
+ this._manifest.strict = false;
36
41
  if (!this._urlReader)
37
42
  return;
38
43
  const dir = manifestRoot.toString().endsWith('/')
@@ -48,34 +53,42 @@ class Manifest {
48
53
  // No manifest file — stay empty
49
54
  return;
50
55
  }
51
- const loaded = JSON.parse(contents);
52
- Object.assign(this._data, loaded);
56
+ this._loadParsed(JSON.parse(contents));
53
57
  }
54
58
  /**
55
59
  * Load manifest data from a JSON string.
56
60
  * Replaces any existing data.
57
61
  */
58
62
  loadText(jsonText) {
59
- for (const key of Object.keys(this._data)) {
60
- delete this._data[key];
61
- }
63
+ this._clearEntries();
62
64
  this._touched.clear();
63
- const loaded = JSON.parse(jsonText);
64
- Object.assign(this._data, loaded);
65
+ this._manifest.strict = false;
66
+ this._loadParsed(JSON.parse(jsonText));
65
67
  }
66
68
  /**
67
69
  * The live BuildManifest. This is a stable reference — load() and update()
68
70
  * mutate the same object, so passing this to a Runtime means the Runtime
69
- * always sees current data.
71
+ * always sees current data including the strict flag.
70
72
  */
71
73
  get buildManifest() {
72
- return this._data;
74
+ return this._manifest;
75
+ }
76
+ /**
77
+ * Whether missing manifest entries should cause errors.
78
+ * Loaded from the manifest file; can be overridden by the application.
79
+ */
80
+ get strict() {
81
+ var _a;
82
+ return (_a = this._manifest.strict) !== null && _a !== void 0 ? _a : false;
83
+ }
84
+ set strict(value) {
85
+ this._manifest.strict = value;
73
86
  }
74
87
  /**
75
88
  * Add or replace a manifest entry. Also marks it as touched.
76
89
  */
77
90
  update(buildId, entry) {
78
- this._data[buildId] = entry;
91
+ this._manifest.entries[buildId] = entry;
79
92
  this._touched.add(buildId);
80
93
  }
81
94
  /**
@@ -86,18 +99,47 @@ class Manifest {
86
99
  this._touched.add(buildId);
87
100
  }
88
101
  /**
89
- * Returns only entries that were update()d or touch()ed.
90
- * This is the manifest a builder should write — it reflects
91
- * exactly what the current build references.
102
+ * Returns a BuildManifest with only entries that were update()d or touch()ed.
103
+ * This is the manifest a builder should write — it reflects exactly what the
104
+ * current build references. Preserves the strict flag.
92
105
  */
93
106
  get activeEntries() {
94
- const result = {};
107
+ const entries = {};
95
108
  for (const id of this._touched) {
96
- if (this._data[id]) {
97
- result[id] = this._data[id];
109
+ if (this._manifest.entries[id]) {
110
+ entries[id] = this._manifest.entries[id];
111
+ }
112
+ }
113
+ return { entries, strict: this._manifest.strict };
114
+ }
115
+ _clearEntries() {
116
+ for (const key of Object.keys(this._manifest.entries)) {
117
+ delete this._manifest.entries[key];
118
+ }
119
+ }
120
+ _loadParsed(parsed) {
121
+ if (typeof parsed['strict'] === 'boolean') {
122
+ this._manifest.strict = parsed['strict'];
123
+ }
124
+ // New format: {entries: {...}, strict?: boolean}
125
+ // Old format: {buildId: {tableName}, ...} (flat record, no "entries" key)
126
+ let entries;
127
+ if (parsed['entries'] && typeof parsed['entries'] === 'object') {
128
+ entries = parsed['entries'];
129
+ }
130
+ else {
131
+ // Treat as old flat-record format: every key with a tableName is an entry
132
+ entries = {};
133
+ for (const [key, val] of Object.entries(parsed)) {
134
+ if (key !== 'strict' &&
135
+ val &&
136
+ typeof val === 'object' &&
137
+ 'tableName' in val) {
138
+ entries[key] = val;
139
+ }
98
140
  }
99
141
  }
100
- return result;
142
+ Object.assign(this._manifest.entries, entries);
101
143
  }
102
144
  }
103
145
  exports.Manifest = Manifest;
@@ -1,4 +1,5 @@
1
1
  export type { Taggable, Loggable, ParseOptions, CompileOptions, CompileQueryOptions, BuildNode, BuildGraph, } from './types';
2
+ export { EMPTY_BUILD_MANIFEST } from './types';
2
3
  export { EmptyURLReader, InMemoryURLReader, FixedConnectionMap, hashForInvalidationKey, isInternalURL, readURL, getInvalidationKey, } from './readers';
3
4
  export type { ModelCache, CachedModel } from './cache';
4
5
  export { CacheManager, InMemoryModelCache } from './cache';
@@ -4,8 +4,10 @@
4
4
  * SPDX-License-Identifier: MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.Manifest = exports.ExploreMaterializer = exports.PreparedResultMaterializer = exports.QueryMaterializer = exports.ModelMaterializer = exports.SingleConnectionRuntime = exports.ConnectionRuntime = exports.Runtime = exports.CSVWriter = exports.JSONWriter = exports.DataWriter = exports.DataRecord = exports.DataArray = exports.Result = exports.PreparedResult = exports.PreparedQuery = exports.PersistSource = exports.Model = exports.QueryField = exports.Query = exports.StringField = exports.UnsupportedField = exports.JSONField = exports.BooleanField = exports.NumberField = exports.TimestampField = exports.DateField = exports.AtomicField = exports.ExploreField = exports.Explore = exports.JoinRelationship = exports.TimestampTimeframe = exports.DateTimeframe = exports.AtomicFieldType = exports.SourceRelationship = exports.DocumentCompletion = exports.DocumentSymbol = exports.DocumentPosition = exports.DocumentRange = exports.DocumentTablePath = exports.Parse = exports.InMemoryModelCache = exports.CacheManager = exports.getInvalidationKey = exports.readURL = exports.isInternalURL = exports.hashForInvalidationKey = exports.FixedConnectionMap = exports.InMemoryURLReader = exports.EmptyURLReader = void 0;
8
- exports.MalloyError = exports.Malloy = exports.MalloyConfig = void 0;
7
+ exports.ExploreMaterializer = exports.PreparedResultMaterializer = exports.QueryMaterializer = exports.ModelMaterializer = exports.SingleConnectionRuntime = exports.ConnectionRuntime = exports.Runtime = exports.CSVWriter = exports.JSONWriter = exports.DataWriter = exports.DataRecord = exports.DataArray = exports.Result = exports.PreparedResult = exports.PreparedQuery = exports.PersistSource = exports.Model = exports.QueryField = exports.Query = exports.StringField = exports.UnsupportedField = exports.JSONField = exports.BooleanField = exports.NumberField = exports.TimestampField = exports.DateField = exports.AtomicField = exports.ExploreField = exports.Explore = exports.JoinRelationship = exports.TimestampTimeframe = exports.DateTimeframe = exports.AtomicFieldType = exports.SourceRelationship = exports.DocumentCompletion = exports.DocumentSymbol = exports.DocumentPosition = exports.DocumentRange = exports.DocumentTablePath = exports.Parse = exports.InMemoryModelCache = exports.CacheManager = exports.getInvalidationKey = exports.readURL = exports.isInternalURL = exports.hashForInvalidationKey = exports.FixedConnectionMap = exports.InMemoryURLReader = exports.EmptyURLReader = exports.EMPTY_BUILD_MANIFEST = void 0;
8
+ exports.MalloyError = exports.Malloy = exports.MalloyConfig = exports.Manifest = void 0;
9
+ var types_1 = require("./types");
10
+ Object.defineProperty(exports, "EMPTY_BUILD_MANIFEST", { enumerable: true, get: function () { return types_1.EMPTY_BUILD_MANIFEST; } });
9
11
  // URL readers and connection helpers
10
12
  var readers_1 = require("./readers");
11
13
  Object.defineProperty(exports, "EmptyURLReader", { enumerable: true, get: function () { return readers_1.EmptyURLReader; } });
@@ -577,18 +577,24 @@ class QueryMaterializer extends FluentState {
577
577
  ...options,
578
578
  };
579
579
  // Use manifest from options if provided, otherwise fall back to Runtime's manifest.
580
- // Pass an empty {} in options to explicitly suppress manifest substitution.
580
+ // Pass EMPTY_BUILD_MANIFEST in options to explicitly suppress manifest substitution.
581
581
  const explicitManifest = mergedOptions.buildManifest !== undefined;
582
582
  let buildManifest = (_a = mergedOptions.buildManifest) !== null && _a !== void 0 ? _a : this.runtime.buildManifest;
583
- // If we have a manifest, compute connectionDigests for manifest lookups
583
+ // If we have a manifest with entries, compute connectionDigests for lookups.
584
584
  // TODO: This is inefficient - we call getBuildPlan just to find connection names.
585
585
  // Consider adding a listConnections() method to LookupConnection, or caching this.
586
586
  let connectionDigests;
587
+ if (buildManifest &&
588
+ Object.keys(buildManifest.entries).length === 0 &&
589
+ !buildManifest.strict) {
590
+ // Empty non-strict manifest — nothing to substitute, skip persistence checks
591
+ buildManifest = undefined;
592
+ }
587
593
  if (buildManifest) {
588
594
  const modelTag = preparedQuery.model.tagParse({ prefix: /^##! / }).tag;
589
595
  if (!modelTag.has('experimental', 'persistence')) {
590
596
  if (explicitManifest) {
591
- // Explicitly passed manifest requires persistence support
597
+ // Explicitly passed non-empty manifest requires persistence support
592
598
  throw new Error('Model must have ##! experimental.persistence to use buildManifest');
593
599
  }
594
600
  // Runtime-level manifest (e.g. from config): silently ignore
@@ -609,7 +615,6 @@ class QueryMaterializer extends FluentState {
609
615
  defaultRowLimit: mergedOptions.defaultRowLimit,
610
616
  buildManifest,
611
617
  connectionDigests,
612
- strictPersist: mergedOptions.strictPersist,
613
618
  };
614
619
  return preparedQuery.getPreparedResult({
615
620
  ...mergedOptions,
@@ -1,5 +1,14 @@
1
1
  import type { EventStream } from '../../runtime_types';
2
2
  import type { BuildManifest } from '../../model';
3
+ /**
4
+ * An empty BuildManifest with no entries and strict mode off.
5
+ * Use this to explicitly suppress manifest substitution in a query:
6
+ *
7
+ * runtime.loadQuery(url, {buildManifest: EMPTY_BUILD_MANIFEST}).getSQL()
8
+ *
9
+ * Frozen to prevent accidental mutation of the shared sentinel.
10
+ */
11
+ export declare const EMPTY_BUILD_MANIFEST: BuildManifest;
3
12
  export type { Taggable } from '../../taggable';
4
13
  export interface Loggable {
5
14
  debug: (message?: any, ...optionalParams: any[]) => void;
@@ -20,12 +29,10 @@ export interface CompileOptions {
20
29
  export interface CompileQueryOptions {
21
30
  eventStream?: EventStream;
22
31
  defaultRowLimit?: number;
23
- /** Manifest of built tables (BuildID → entry) for persist substitution */
32
+ /** Manifest of built tables for persist source substitution */
24
33
  buildManifest?: BuildManifest;
25
34
  /** Map from connectionName to connectionDigest (from Connection.getDigest()) */
26
35
  connectionDigests?: Record<string, string>;
27
- /** If true, throw when a persist source's BuildID is not in the manifest */
28
- strictPersist?: boolean;
29
36
  }
30
37
  /**
31
38
  * A node in the build graph (recursive DAG structure).
@@ -4,4 +4,17 @@
4
4
  * SPDX-License-Identifier: MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.EMPTY_BUILD_MANIFEST = void 0;
8
+ /**
9
+ * An empty BuildManifest with no entries and strict mode off.
10
+ * Use this to explicitly suppress manifest substitution in a query:
11
+ *
12
+ * runtime.loadQuery(url, {buildManifest: EMPTY_BUILD_MANIFEST}).getSQL()
13
+ *
14
+ * Frozen to prevent accidental mutation of the shared sentinel.
15
+ */
16
+ exports.EMPTY_BUILD_MANIFEST = Object.freeze({
17
+ entries: Object.freeze({}),
18
+ strict: false,
19
+ });
7
20
  //# sourceMappingURL=types.js.map
@@ -0,0 +1,94 @@
1
+ import type { Sampling, MeasureTimeExpr, RegexMatchExpr, TimeExtractExpr, TypecastExpr, BasicAtomicTypeDef, AtomicTypeDef, ArrayLiteralNode, RecordLiteralNode } from '../../model/malloy_types';
2
+ import type { BooleanTypeSupport, CompiledOrderBy, DialectFieldList, FieldReferenceType, LateralJoinExpression, OrderByClauseType, OrderByRequest, QueryInfo } from '../dialect';
3
+ import { Dialect } from '../dialect';
4
+ import type { DialectFunctionOverloadDef } from '../functions';
5
+ export declare class DatabricksDialect extends Dialect {
6
+ name: string;
7
+ defaultNumberType: string;
8
+ defaultDecimalType: string;
9
+ udfPrefix: string;
10
+ hasFinalStage: boolean;
11
+ stringTypeName: string;
12
+ divisionIsInteger: boolean;
13
+ supportsSumDistinctFunction: boolean;
14
+ unnestWithNumbers: boolean;
15
+ defaultSampling: {
16
+ rows: number;
17
+ };
18
+ supportUnnestArrayAgg: boolean;
19
+ supportsAggDistinct: boolean;
20
+ supportsCTEinCoorelatedSubQueries: boolean;
21
+ supportsSafeCast: boolean;
22
+ dontUnionIndex: boolean;
23
+ supportsQualify: boolean;
24
+ supportsNesting: boolean;
25
+ hasLateralColumnAliasInSelect: boolean;
26
+ cantPartitionWindowFunctionsOnExpressions: boolean;
27
+ experimental: boolean;
28
+ supportsFullJoin: boolean;
29
+ supportsPipelinesInViews: boolean;
30
+ readsNestedData: boolean;
31
+ supportsComplexFilteredSources: boolean;
32
+ supportsArraysInData: boolean;
33
+ compoundObjectInSchema: boolean;
34
+ booleanType: BooleanTypeSupport;
35
+ likeEscape: boolean;
36
+ orderByClause: OrderByClauseType;
37
+ hasTimestamptz: boolean;
38
+ supportsBigIntPrecision: boolean;
39
+ maxIdentifierLength: number;
40
+ malloyTypeToSQLType(malloyType: AtomicTypeDef): string;
41
+ sqlTypeToMalloyType(sqlType: string): BasicAtomicTypeDef;
42
+ quoteTablePath(tablePath: string): string;
43
+ sqlGroupSetTable(groupSetCount: number): string;
44
+ sqlLateralJoinBag(expressions: LateralJoinExpression[]): string;
45
+ sqlOrderBy(orderTerms: string[], obr?: OrderByRequest): string;
46
+ sqlAnyValue(groupSet: number, fieldName: string): string;
47
+ private buildNamedStructExpression;
48
+ sqlAggregateTurtle(groupSet: number, fieldList: DialectFieldList, orderBy: CompiledOrderBy[] | undefined): string;
49
+ private buildArraySortComparator;
50
+ sqlAnyValueTurtle(groupSet: number, fieldList: DialectFieldList): string;
51
+ sqlAnyValueLastTurtle(name: string, groupSet: number, sqlName: string): string;
52
+ sqlCoaleseMeasuresInline(groupSet: number, fieldList: DialectFieldList): string;
53
+ sqlUnnestAlias(source: string, alias: string, _fieldList: DialectFieldList, needDistinctKey: boolean, isArray: boolean, _isInNestedPipeline: boolean): string;
54
+ sqlUnnestPipelineHead(isSingleton: boolean, sourceSQLExpression: string, _fieldList?: DialectFieldList): string;
55
+ sqlSumDistinctHashedKey(sqlDistinctKey: string): string;
56
+ sqlSumDistinct(key: string, value: string, funcName: string): string;
57
+ sqlStringAggDistinct(distinctKey: string, valueSQL: string, separatorSQL: string): string;
58
+ sqlGenerateUUID(): string;
59
+ sqlFieldReference(parentAlias: string, _parentType: FieldReferenceType, childName: string, _childType: string): string;
60
+ sqlCreateFunction(id: string, funcText: string): string;
61
+ sqlCreateFunctionCombineLastStage(lastStageName: string, fieldList: DialectFieldList): string;
62
+ sqlSelectAliasAsStruct(alias: string, fieldList: DialectFieldList): string;
63
+ sqlMaybeQuoteIdentifier(identifier: string): string;
64
+ sqlCreateTableAsSelect(tableName: string, sql: string): string;
65
+ sqlNowExpr(): string;
66
+ sqlConvertToCivilTime(expr: string, timezone: string, _typeDef: AtomicTypeDef): {
67
+ sql: string;
68
+ typeDef: AtomicTypeDef;
69
+ };
70
+ sqlConvertFromCivilTime(expr: string, timezone: string, _destTypeDef: AtomicTypeDef): string;
71
+ sqlTruncate(expr: string, unit: string, _typeDef: AtomicTypeDef, _inCivilTime: boolean, _timezone?: string): string;
72
+ sqlOffsetTime(expr: string, op: '+' | '-', magnitude: string, unit: string, _typeDef: AtomicTypeDef, _inCivilTime: boolean, _timezone?: string): string;
73
+ sqlTimeExtractExpr(qi: QueryInfo, te: TimeExtractExpr): string;
74
+ sqlCast(qi: QueryInfo, cast: TypecastExpr): string;
75
+ sqlRegexpMatch(df: RegexMatchExpr): string;
76
+ sqlDateLiteral(_qi: QueryInfo, literal: string): string;
77
+ sqlTimestampLiteral(qi: QueryInfo, literal: string, timezone: string | undefined): string;
78
+ sqlTimestamptzLiteral(_qi: QueryInfo, _literal: string, _timezone: string): string;
79
+ sqlMeasureTimeExpr(df: MeasureTimeExpr): string;
80
+ sqlSampleTable(tableSQL: string, sample: Sampling | undefined): string;
81
+ sqlLiteralString(literal: string): string;
82
+ sqlLiteralRegexp(literal: string): string;
83
+ getDialectFunctionOverrides(): {
84
+ [name: string]: DialectFunctionOverloadDef[];
85
+ };
86
+ getDialectFunctions(): {
87
+ [name: string]: DialectFunctionOverloadDef[];
88
+ };
89
+ castToString(expression: string): string;
90
+ concat(...values: string[]): string;
91
+ validateTypeName(sqlType: string): boolean;
92
+ sqlLiteralArray(lit: ArrayLiteralNode): string;
93
+ sqlLiteralRecord(lit: RecordLiteralNode): string;
94
+ }