@malloydata/malloy 0.0.36-dev230525034638 → 0.0.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/dialect/duckdb.js +5 -5
- package/dist/dialect/postgres.js +17 -17
- package/package.json +1 -1
package/dist/dialect/duckdb.js
CHANGED
|
@@ -29,12 +29,12 @@ const dialect_1 = require("./dialect");
|
|
|
29
29
|
// need to refactor runSQL to take a SQLBlock instead of just a sql string.
|
|
30
30
|
const hackSplitComment = '-- hack: split on this';
|
|
31
31
|
const castMap = {
|
|
32
|
-
number: 'double precision',
|
|
33
|
-
string: 'varchar',
|
|
32
|
+
'number': 'double precision',
|
|
33
|
+
'string': 'varchar',
|
|
34
34
|
};
|
|
35
35
|
const pgExtractionMap = {
|
|
36
|
-
day_of_week: 'dow',
|
|
37
|
-
day_of_year: 'doy',
|
|
36
|
+
'day_of_week': 'dow',
|
|
37
|
+
'day_of_year': 'doy',
|
|
38
38
|
};
|
|
39
39
|
class DuckDBDialect extends dialect_1.Dialect {
|
|
40
40
|
constructor() {
|
|
@@ -52,7 +52,7 @@ class DuckDBDialect extends dialect_1.Dialect {
|
|
|
52
52
|
this.dontUnionIndex = true;
|
|
53
53
|
this.supportsQualify = true;
|
|
54
54
|
this.functionInfo = {
|
|
55
|
-
concat: { returnType: 'string' },
|
|
55
|
+
'concat': { returnType: 'string' },
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
// hack until they support temporary macros.
|
package/dist/dialect/postgres.js
CHANGED
|
@@ -27,28 +27,28 @@ const utils_1 = require("../model/utils");
|
|
|
27
27
|
const malloy_types_1 = require("../model/malloy_types");
|
|
28
28
|
const dialect_1 = require("./dialect");
|
|
29
29
|
const castMap = {
|
|
30
|
-
number: 'double precision',
|
|
31
|
-
string: 'varchar',
|
|
30
|
+
'number': 'double precision',
|
|
31
|
+
'string': 'varchar',
|
|
32
32
|
};
|
|
33
33
|
const pgExtractionMap = {
|
|
34
|
-
day_of_week: 'dow',
|
|
35
|
-
day_of_year: 'doy',
|
|
34
|
+
'day_of_week': 'dow',
|
|
35
|
+
'day_of_year': 'doy',
|
|
36
36
|
};
|
|
37
37
|
const pgMakeIntervalMap = {
|
|
38
|
-
year: 'years',
|
|
39
|
-
month: 'months',
|
|
40
|
-
week: 'weeks',
|
|
41
|
-
day: 'days',
|
|
42
|
-
hour: 'hours',
|
|
43
|
-
minute: 'mins',
|
|
44
|
-
second: 'secs',
|
|
38
|
+
'year': 'years',
|
|
39
|
+
'month': 'months',
|
|
40
|
+
'week': 'weeks',
|
|
41
|
+
'day': 'days',
|
|
42
|
+
'hour': 'hours',
|
|
43
|
+
'minute': 'mins',
|
|
44
|
+
'second': 'secs',
|
|
45
45
|
};
|
|
46
46
|
const inSeconds = {
|
|
47
|
-
second: 1,
|
|
48
|
-
minute: 60,
|
|
49
|
-
hour: 3600,
|
|
50
|
-
day: 24 * 3600,
|
|
51
|
-
week: 7 * 24 * 3600,
|
|
47
|
+
'second': 1,
|
|
48
|
+
'minute': 60,
|
|
49
|
+
'hour': 3600,
|
|
50
|
+
'day': 24 * 3600,
|
|
51
|
+
'week': 7 * 24 * 3600,
|
|
52
52
|
};
|
|
53
53
|
class PostgresDialect extends dialect_1.Dialect {
|
|
54
54
|
constructor() {
|
|
@@ -67,7 +67,7 @@ class PostgresDialect extends dialect_1.Dialect {
|
|
|
67
67
|
this.dontUnionIndex = false;
|
|
68
68
|
this.supportsQualify = false;
|
|
69
69
|
this.functionInfo = {
|
|
70
|
-
concat: { returnType: 'string' },
|
|
70
|
+
'concat': { returnType: 'string' },
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
quoteTablePath(tablePath) {
|