@malloydata/malloy 0.0.394 → 0.0.395

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.
Files changed (50) hide show
  1. package/dist/api/foundation/config.d.ts +2 -3
  2. package/dist/api/foundation/config.js +23 -11
  3. package/dist/api/foundation/core.js +1 -1
  4. package/dist/api/foundation/runtime.js +21 -1
  5. package/dist/api/util.js +4 -0
  6. package/dist/connection/base_connection.js +6 -0
  7. package/dist/connection/validate_table_path.d.ts +10 -0
  8. package/dist/connection/validate_table_path.js +56 -0
  9. package/dist/dialect/databricks/databricks.d.ts +4 -4
  10. package/dist/dialect/databricks/databricks.js +17 -22
  11. package/dist/dialect/dialect.d.ts +100 -4
  12. package/dist/dialect/dialect.js +145 -1
  13. package/dist/dialect/duckdb/duckdb.d.ts +2 -3
  14. package/dist/dialect/duckdb/duckdb.js +12 -14
  15. package/dist/dialect/duckdb/table-path-parser.d.ts +2 -0
  16. package/dist/dialect/duckdb/table-path-parser.js +57 -0
  17. package/dist/dialect/index.d.ts +2 -0
  18. package/dist/dialect/index.js +4 -1
  19. package/dist/dialect/mysql/mysql.d.ts +4 -4
  20. package/dist/dialect/mysql/mysql.js +25 -20
  21. package/dist/dialect/pg_impl.d.ts +3 -1
  22. package/dist/dialect/pg_impl.js +6 -3
  23. package/dist/dialect/postgres/postgres.d.ts +1 -3
  24. package/dist/dialect/postgres/postgres.js +8 -16
  25. package/dist/dialect/snowflake/snowflake.d.ts +4 -4
  26. package/dist/dialect/snowflake/snowflake.js +11 -27
  27. package/dist/dialect/standardsql/standardsql.d.ts +6 -4
  28. package/dist/dialect/standardsql/standardsql.js +36 -15
  29. package/dist/dialect/table-path.d.ts +54 -0
  30. package/dist/dialect/table-path.js +144 -0
  31. package/dist/dialect/trino/trino.d.ts +0 -3
  32. package/dist/dialect/trino/trino.js +7 -20
  33. package/dist/index.d.ts +2 -2
  34. package/dist/index.js +4 -2
  35. package/dist/lang/ast/source-elements/table-source.d.ts +1 -7
  36. package/dist/lang/ast/source-elements/table-source.js +20 -19
  37. package/dist/lang/parse-log.d.ts +1 -0
  38. package/dist/lang/parse-malloy.js +37 -7
  39. package/dist/lang/parse-tree-walkers/find-external-references.d.ts +2 -15
  40. package/dist/lang/parse-tree-walkers/find-external-references.js +6 -23
  41. package/dist/lang/translate-response.d.ts +1 -1
  42. package/dist/model/filter_compilers.js +1 -1
  43. package/dist/model/query_model_impl.js +7 -7
  44. package/dist/model/query_query.js +37 -33
  45. package/dist/model/sql_compiled.d.ts +2 -4
  46. package/dist/model/sql_compiled.js +14 -15
  47. package/dist/test/test-models.js +2 -2
  48. package/dist/version.d.ts +1 -1
  49. package/dist/version.js +1 -1
  50. package/package.json +4 -4
@@ -194,7 +194,7 @@ function generateSQL(dialect, rows) {
194
194
  const sql = exprToSQL(typedValue.expr, dialect);
195
195
  if (idx === 0) {
196
196
  // First row: include column aliases and explicit casts if needed
197
- const quotedName = dialect.sqlMaybeQuoteIdentifier(colName);
197
+ const quotedName = dialect.sqlQuoteIdentifier(colName);
198
198
  if (typedValue.needsCast) {
199
199
  const sqlType = dialect.malloyTypeToSQLType(typedValue.malloyType);
200
200
  fields.push(`CAST(${sql} AS ${sqlType}) AS ${quotedName}`);
@@ -225,7 +225,7 @@ function generateSQL(dialect, rows) {
225
225
  }
226
226
  // Multiple rows: wrap for sorting
227
227
  const quotedColumns = columnList
228
- .map(col => dialect.sqlMaybeQuoteIdentifier(col))
228
+ .map(col => dialect.sqlQuoteIdentifier(col))
229
229
  .join(', ');
230
230
  const innerQuery = selects.join('\nUNION ALL ');
231
231
  // Generate ORDER BY based on dialect preference
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const MALLOY_VERSION = "0.0.394";
1
+ export declare const MALLOY_VERSION = "0.0.395";
package/dist/version.js CHANGED
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MALLOY_VERSION = void 0;
4
4
  // generated with 'generate-version-file' script; do not edit manually
5
- exports.MALLOY_VERSION = '0.0.394';
5
+ exports.MALLOY_VERSION = '0.0.395';
6
6
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.394",
3
+ "version": "0.0.395",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -51,9 +51,9 @@
51
51
  "generate-version-file": "VERSION=$(npm pkg get version --workspaces=false | tr -d \\\")\necho \"// generated with 'generate-version-file' script; do not edit manually\\nexport const MALLOY_VERSION = '$VERSION';\" > src/version.ts"
52
52
  },
53
53
  "dependencies": {
54
- "@malloydata/malloy-filter": "0.0.394",
55
- "@malloydata/malloy-interfaces": "0.0.394",
56
- "@malloydata/malloy-tag": "0.0.394",
54
+ "@malloydata/malloy-filter": "0.0.395",
55
+ "@malloydata/malloy-interfaces": "0.0.395",
56
+ "@malloydata/malloy-tag": "0.0.395",
57
57
  "@noble/hashes": "^1.8.0",
58
58
  "antlr4ts": "^0.5.0-alpha.4",
59
59
  "assert": "^2.0.0",