@hamelin.sh/compiler 0.1.8 → 0.1.9

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.
package/dist/main.d.ts CHANGED
@@ -1,15 +1,24 @@
1
1
  type StatementDatasetsResult = { Ok: string[] } | { Err: ContextualTranslationErrors };
2
2
 
3
- interface FunctionDescription {
3
+ type HamelinType = "binary" | "boolean" | "interval" | "int" | "double" | "rows" | "string" | "timestamp" | "unknown" | { decimal: { precision: number; scale: number } } | { array: { element_type: HamelinType } } | { map: { key_type: HamelinType; value_type: HamelinType } } | { tuple: { elements: HamelinType[] } } | "variant" | { range: { of: HamelinType } } | { struct: Column[] };
4
+
5
+ interface Column {
4
6
  name: string;
5
- parameters: string;
7
+ type: HamelinType;
6
8
  }
7
9
 
10
+ type Catalog = Record<string, Column[]>;
11
+
8
12
  interface Translation {
9
13
  sql: string;
10
14
  columns: Column[];
11
15
  }
12
16
 
17
+ interface FunctionDescription {
18
+ name: string;
19
+ parameters: string;
20
+ }
21
+
13
22
  interface ContextualTranslationErrors {
14
23
  hamelin: string;
15
24
  errors: TranslationErrors;
@@ -38,15 +47,6 @@ type LanguageArea = "FunctionCall" | "Operator" | "Deref" | "IndexAccess" | "Par
38
47
 
39
48
  type Level = "Error" | "Warning" | "Info";
40
49
 
41
- type HamelinType = "binary" | "boolean" | "interval" | "int" | "double" | "rows" | "string" | "timestamp" | "unknown" | { decimal: { precision: number; scale: number } } | { array: { element_type: HamelinType } } | { map: { key_type: HamelinType; value_type: HamelinType } } | { tuple: { elements: HamelinType[] } } | "variant" | { range: { of: HamelinType } } | { struct: Column[] };
42
-
43
- interface Column {
44
- name: string;
45
- type: HamelinType;
46
- }
47
-
48
- type Catalog = Record<string, Column[]>;
49
-
50
50
  type AugmentedCompileResult = {
51
51
  Ok: Translation;
52
52
  } | {