@hamelin.sh/compiler 0.1.35 → 0.1.36
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 +41 -41
- package/dist/main.js +1 -1
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -7,11 +7,52 @@ type CompileResult = { Ok: Translation } | { Err: ContextualTranslationErrors };
|
|
|
7
7
|
|
|
8
8
|
type StatementDatasetsResult = { Ok: string[] } | { Err: ContextualTranslationErrors };
|
|
9
9
|
|
|
10
|
+
type HamelinType = "binary" | "boolean" | "interval" | "calendar_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[] };
|
|
11
|
+
|
|
12
|
+
interface Column {
|
|
13
|
+
name: string;
|
|
14
|
+
type: HamelinType;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type Catalog = Record<string, Column[]>;
|
|
18
|
+
|
|
10
19
|
interface FunctionDescription {
|
|
11
20
|
name: string;
|
|
12
21
|
parameters: string;
|
|
13
22
|
}
|
|
14
23
|
|
|
24
|
+
interface ContextualTranslationErrors {
|
|
25
|
+
hamelin: string;
|
|
26
|
+
errors: ContextualTranslationError[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type TranslationErrors = TranslationError[];
|
|
30
|
+
|
|
31
|
+
interface Context {
|
|
32
|
+
interval: { start: number; end: number };
|
|
33
|
+
message: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface ContextualTranslationError {
|
|
37
|
+
error: TranslationError;
|
|
38
|
+
pretty: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface TranslationError {
|
|
42
|
+
area: LanguageArea | undefined;
|
|
43
|
+
stage: Stage;
|
|
44
|
+
level: Level;
|
|
45
|
+
primary: Context;
|
|
46
|
+
supporting: Context[] | undefined;
|
|
47
|
+
source_desc: string | undefined;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
type Stage = "Translation" | "Parsing" | "SemanticAnalysis";
|
|
51
|
+
|
|
52
|
+
type LanguageArea = "FunctionCall" | "Operator" | "Deref" | "IndexAccess" | "Parsing";
|
|
53
|
+
|
|
54
|
+
type Level = "Error" | "Warning" | "Info";
|
|
55
|
+
|
|
15
56
|
interface ContextualResult {
|
|
16
57
|
hamelin: string;
|
|
17
58
|
errors: ContextualTranslationError[];
|
|
@@ -65,47 +106,6 @@ interface Translation {
|
|
|
65
106
|
columns: Column[];
|
|
66
107
|
}
|
|
67
108
|
|
|
68
|
-
interface ContextualTranslationErrors {
|
|
69
|
-
hamelin: string;
|
|
70
|
-
errors: ContextualTranslationError[];
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
type TranslationErrors = TranslationError[];
|
|
74
|
-
|
|
75
|
-
interface Context {
|
|
76
|
-
interval: { start: number; end: number };
|
|
77
|
-
message: string;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
interface ContextualTranslationError {
|
|
81
|
-
error: TranslationError;
|
|
82
|
-
pretty: string;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
interface TranslationError {
|
|
86
|
-
area: LanguageArea | undefined;
|
|
87
|
-
stage: Stage;
|
|
88
|
-
level: Level;
|
|
89
|
-
primary: Context;
|
|
90
|
-
supporting: Context[] | undefined;
|
|
91
|
-
source_desc: string | undefined;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
type Stage = "Translation" | "Parsing" | "SemanticAnalysis";
|
|
95
|
-
|
|
96
|
-
type LanguageArea = "FunctionCall" | "Operator" | "Deref" | "IndexAccess" | "Parsing";
|
|
97
|
-
|
|
98
|
-
type Level = "Error" | "Warning" | "Info";
|
|
99
|
-
|
|
100
|
-
type HamelinType = "binary" | "boolean" | "interval" | "calendar_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[] };
|
|
101
|
-
|
|
102
|
-
interface Column {
|
|
103
|
-
name: string;
|
|
104
|
-
type: HamelinType;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
type Catalog = Record<string, Column[]>;
|
|
108
|
-
|
|
109
109
|
declare class CatalogProvider {
|
|
110
110
|
private constructor();
|
|
111
111
|
free(): void;
|