@hamelin.sh/compiler 0.1.24 → 0.1.25
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 +14 -14
- package/dist/main.js +1 -1
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -4,6 +4,20 @@ type CompileResult = { Ok: Translation } | { Err: ContextualTranslationErrors };
|
|
|
4
4
|
|
|
5
5
|
type StatementDatasetsResult = { Ok: string[] } | { Err: ContextualTranslationErrors };
|
|
6
6
|
|
|
7
|
+
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[] };
|
|
8
|
+
|
|
9
|
+
interface Column {
|
|
10
|
+
name: string;
|
|
11
|
+
type: HamelinType;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
type Catalog = Record<string, Column[]>;
|
|
15
|
+
|
|
16
|
+
interface Translation {
|
|
17
|
+
sql: string;
|
|
18
|
+
columns: Column[];
|
|
19
|
+
}
|
|
20
|
+
|
|
7
21
|
interface FunctionDescription {
|
|
8
22
|
name: string;
|
|
9
23
|
parameters: string;
|
|
@@ -39,20 +53,6 @@ type LanguageArea = "FunctionCall" | "Operator" | "Deref" | "IndexAccess" | "Par
|
|
|
39
53
|
|
|
40
54
|
type Level = "Error" | "Warning" | "Info";
|
|
41
55
|
|
|
42
|
-
interface Translation {
|
|
43
|
-
sql: string;
|
|
44
|
-
columns: Column[];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
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[] };
|
|
48
|
-
|
|
49
|
-
interface Column {
|
|
50
|
-
name: string;
|
|
51
|
-
type: HamelinType;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
type Catalog = Record<string, Column[]>;
|
|
55
|
-
|
|
56
56
|
declare const compileHamelin: (catalog: Catalog, hamelinInput: string, timeRange?: string) => Promise<CompileResult>;
|
|
57
57
|
|
|
58
58
|
declare const getFunctionDescriptions: () => Promise<FunctionDescription[]>;
|