@hamelin.sh/compiler 0.1.4 → 0.1.5

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,3 +1,22 @@
1
+ interface Translation {
2
+ sql: string;
3
+ columns: Column[];
4
+ }
5
+
6
+ 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[] };
7
+
8
+ interface Column {
9
+ name: string;
10
+ type: HamelinType;
11
+ }
12
+
13
+ type Catalog = Record<string, Column[]>;
14
+
15
+ interface FunctionDescription {
16
+ name: string;
17
+ parameters: string;
18
+ }
19
+
1
20
  interface ContextualTranslationErrors {
2
21
  hamelin: string;
3
22
  errors: TranslationErrors;
@@ -26,25 +45,6 @@ type LanguageArea = "FunctionCall" | "Operator" | "Deref" | "IndexAccess" | "Par
26
45
 
27
46
  type Level = "Error" | "Warning" | "Info";
28
47
 
29
- 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[] };
30
-
31
- interface Column {
32
- name: string;
33
- type: HamelinType;
34
- }
35
-
36
- type Catalog = Record<string, Column[]>;
37
-
38
- interface Translation {
39
- sql: string;
40
- columns: Column[];
41
- }
42
-
43
- interface FunctionDescription {
44
- name: string;
45
- parameters: string;
46
- }
47
-
48
48
  type AugmentedCompileResult = {
49
49
  Ok: Translation;
50
50
  } | {