@m6d/cortex 0.13.1 → 0.14.0

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/drizzle.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  filterRefs,
6
6
  isColumnValue,
7
7
  FUNCTION_SIGNATURES
8
- } from "./index-j0kpmpfv.js";
8
+ } from "./index-4n21s4ns.js";
9
9
 
10
10
  // src/datasets/drizzle.ts
11
11
  import {
@@ -929,42 +929,5 @@ function firstColumnOf(catalog, from, path) {
929
929
  }
930
930
  return dataset?.columns[0]?.name ?? "";
931
931
  }
932
- // ../../internal/contracts/src/datasets/dataset-sql.ts
933
- var AGGREGATE_WORDS = {
934
- COUNT: "count",
935
- SUM: "sum",
936
- AVG: "avg",
937
- MIN: "min",
938
- MAX: "max"
939
- };
940
- var FUNCTION_WORDS = {
941
- LOWER: "lower",
942
- UPPER: "upper",
943
- TRIM: "trim",
944
- LENGTH: "length",
945
- LEN: "length",
946
- CHAR_LENGTH: "length",
947
- ABS: "abs",
948
- ROUND: "round",
949
- COALESCE: "coalesce"
950
- };
951
- var DATE_PART_WORDS = {
952
- YEAR: "year",
953
- QUARTER: "quarter",
954
- MONTH: "month",
955
- WEEK: "week",
956
- DAY: "day",
957
- DAYOFWEEK: "dayOfWeek"
958
- };
959
- var FUNCTIONS = [
960
- ...Object.keys(AGGREGATE_WORDS),
961
- "DATE_TRUNC('unit', x)",
962
- "EXTRACT(part FROM x)",
963
- ...Object.keys(DATE_PART_WORDS),
964
- ...Object.keys(FUNCTION_WORDS),
965
- "NOW()",
966
- "RANK() OVER (...)"
967
- ].join(", ");
968
- // ../../internal/contracts/src/datasets/dataset-sql-guide.ts
969
- var DATASET_SQL_GRAMMAR = "One SELECT over one dataset. LEFT JOIN related datasets exactly as the dataset's description lists them (LEFT JOIN keeps rows without a match; JOIN or INNER JOIN drops them); reference dataset.column. " + "SELECT: columns, DATE_TRUNC('unit', column), EXTRACT(part FROM column), CASE WHEN ... END, LOWER/UPPER/TRIM/LENGTH/ABS/ROUND/COALESCE, COUNT/SUM/AVG/MIN/MAX over a column or arithmetic each with an optional FILTER (WHERE ...), and named arithmetic between aggregates (SUM(a) / COUNT(*) AS avg). " + "WHERE and HAVING: AND, OR, NOT, parentheses, comparisons with literals or other columns, IN, BETWEEN, LIKE, IS NULL; CURRENT_DATE and INTERVAL arithmetic on it. " + "GROUP BY columns or select aliases. An aggregate with OVER () or OVER (PARTITION BY ...) is a window: that aggregate over the rows sharing the partition, on every row (SUM(COUNT(*)) OVER () is the grand total); name it AS, use it in arithmetic, and QUALIFY filters the finished rows. " + "QUALIFY RANK() OVER (PARTITION BY ... ORDER BY ...) <= n for the top n per group (rows tied on every ORDER BY key share a rank and all stay); ORDER BY; LIMIT; OFFSET. " + "Rows nest qualified columns under the qualifier as written (pets.name comes back as row.pets.name); aliases and aggregates are top-level.";
932
+
970
933
  export { BACKEND_ERROR_STATUS, backendErrorSchema, errorEnvelope, isRecord, readJsonPointer, CortexError2, malformedBody, envelopeOf, protocolBodyLimit, contentVersion, datasetIdentifierSchema, datasetColumnSchema, datasetDefinitionSchema, DATASET_REQUEST_MAX_BYTES, datasetRequestSchema, datasetCatalogOf, groupKeyName, filterRefs, isColumnValue, checkDatasetQuery, boundDatasetResult, FUNCTION_SIGNATURES };