@malloydata/malloy 0.0.199 → 0.0.200-dev241012235421
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/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DuckDBDialect, StandardSQLDialect, TrinoDialect, PostgresDialect, SnowflakeDialect, MySQLDialect, registerDialect, arg, qtz, overload, minScalar, anyExprType, minAggregate, maxScalar, sql, makeParam, param, variadicParam, literal, spread, Dialect, } from './dialect';
|
|
2
2
|
export type { DialectFieldList, DialectFunctionOverloadDef, QueryInfo, MalloyStandardFunctionImplementations, DefinitionBlueprint, DefinitionBlueprintMap, OverloadedDefinitionBlueprint, } from './dialect';
|
|
3
|
-
export type { QueryDataRow, StructDef, TableSourceDef, SQLSourceDef, SourceDef, JoinFieldDef, NamedSourceDefs, MalloyQueryData, DateUnit, ExtractUnit, TimestampUnit, TemporalFieldType, QueryData, QueryValue, Expr, FilterCondition, SQLSentence, FieldDef, PipeSegment, QueryFieldDef, IndexFieldDef, TurtleDef, SearchValueMapResult, SearchIndexResult, ModelDef, Query, QueryResult, QueryRunStats, NamedQuery, NamedModelObject, ExpressionType, FunctionDef, FunctionOverloadDef, FunctionParameterDef, ExpressionValueType, TypeDesc, FieldValueType, ExpressionTypeDesc, FunctionParamTypeDesc, DocumentLocation, DocumentRange, DocumentPosition, Sampling, Annotation, LeafAtomicTypeDef, LeafAtomicDef, AtomicTypeDef, AtomicFieldDef,
|
|
3
|
+
export type { QueryDataRow, StructDef, TableSourceDef, SQLSourceDef, SourceDef, JoinFieldDef, NamedSourceDefs, MalloyQueryData, DateUnit, ExtractUnit, TimestampUnit, TemporalFieldType, QueryData, QueryValue, Expr, FilterCondition, SQLSentence, FieldDef, PipeSegment, QueryFieldDef, IndexFieldDef, TurtleDef, SearchValueMapResult, SearchIndexResult, ModelDef, Query, QueryResult, QueryRunStats, NamedQuery, NamedModelObject, ExpressionType, FunctionDef, FunctionOverloadDef, FunctionParameterDef, ExpressionValueType, TypeDesc, FieldValueType, ExpressionTypeDesc, FunctionParamTypeDesc, DocumentLocation, DocumentRange, DocumentPosition, Sampling, Annotation, LeafAtomicTypeDef, LeafAtomicDef, AtomicTypeDef, AtomicFieldDef, ArrayDef, ArrayTypeDef, RecordTypeDef, RepeatedRecordTypeDef, } from './model';
|
|
4
4
|
export { arrayEachFields, isRepeatedRecord, isSourceDef, Segment, isLeafAtomic, isJoined, isJoinedSource, isSamplingEnable, isSamplingPercent, isSamplingRows, expressionIsCalculation, indent, composeSQLExpr, } from './model';
|
|
5
5
|
export { MalloyTranslator, } from './lang';
|
|
6
6
|
export type { LogMessage, TranslateResponse } from './lang';
|
|
@@ -70,7 +70,7 @@ class ReferenceView extends view_1.View {
|
|
|
70
70
|
if (fieldDef === undefined) {
|
|
71
71
|
throw new Error('Expected field to have definition');
|
|
72
72
|
}
|
|
73
|
-
if ((0, malloy_types_1.
|
|
73
|
+
if ((0, malloy_types_1.isAtomic)(fieldDef)) {
|
|
74
74
|
const newSegment = {
|
|
75
75
|
type: 'reduce',
|
|
76
76
|
queryFields: [this.reference.refToField],
|
|
@@ -660,7 +660,7 @@ describe('query:', () => {
|
|
|
660
660
|
expect('run:ab->{ select: b.astr }').toTranslate();
|
|
661
661
|
});
|
|
662
662
|
const afields = test_translator_1.aTableDef.fields
|
|
663
|
-
.filter(f => (0, model_1.
|
|
663
|
+
.filter(f => (0, model_1.isAtomic)(f))
|
|
664
664
|
.map(f => f.name)
|
|
665
665
|
.sort();
|
|
666
666
|
test('expands star correctly', () => {
|
|
@@ -369,16 +369,12 @@ export interface NativeUnsupportedTypeDef {
|
|
|
369
369
|
rawType?: string;
|
|
370
370
|
}
|
|
371
371
|
export type NativeUnsupportedFieldDef = NativeUnsupportedTypeDef & AtomicFieldDef;
|
|
372
|
-
export interface ArrayTypeDef {
|
|
372
|
+
export interface ArrayTypeDef extends JoinBase, StructDefBase {
|
|
373
373
|
type: 'array';
|
|
374
374
|
elementTypeDef: Exclude<AtomicTypeDef, RecordTypeDef> | RecordElementTypeDef;
|
|
375
|
-
}
|
|
376
|
-
export type ArrayFieldDef = ArrayTypeDef & AtomicFieldDef;
|
|
377
|
-
export interface JoinedArrayTypeDef extends ArrayTypeDef, JoinBase, StructDefBase {
|
|
378
|
-
type: 'array';
|
|
379
375
|
join: 'many';
|
|
380
376
|
}
|
|
381
|
-
export type
|
|
377
|
+
export type ArrayDef = ArrayTypeDef & AtomicFieldDef;
|
|
382
378
|
export declare function arrayEachFields(arrayOf: AtomicTypeDef): AtomicFieldDef[];
|
|
383
379
|
export interface RecordTypeDef extends StructDefBase, JoinBase {
|
|
384
380
|
type: 'record';
|
|
@@ -387,7 +383,7 @@ export interface RecordTypeDef extends StructDefBase, JoinBase {
|
|
|
387
383
|
export interface RecordElementTypeDef {
|
|
388
384
|
type: 'record_element';
|
|
389
385
|
}
|
|
390
|
-
export interface RepeatedRecordTypeDef extends
|
|
386
|
+
export interface RepeatedRecordTypeDef extends ArrayDef {
|
|
391
387
|
type: 'array';
|
|
392
388
|
elementTypeDef: RecordElementTypeDef;
|
|
393
389
|
join: 'many';
|
|
@@ -410,7 +406,7 @@ export interface JoinBase {
|
|
|
410
406
|
matrixOperation?: MatrixOperation;
|
|
411
407
|
onExpression?: Expr;
|
|
412
408
|
}
|
|
413
|
-
export type Joinable = TableSourceDef | SQLSourceDef | QuerySourceDef | RecordFieldDef |
|
|
409
|
+
export type Joinable = TableSourceDef | SQLSourceDef | QuerySourceDef | RecordFieldDef | ArrayDef;
|
|
414
410
|
export type JoinFieldDef = JoinBase & Joinable;
|
|
415
411
|
export type JoinFieldTypes = 'table' | 'sql_select' | 'query_source' | 'array' | 'record';
|
|
416
412
|
export declare function isJoinable(sd: StructDef): sd is Joinable;
|
|
@@ -604,7 +600,7 @@ export type SourceDef = TableSourceDef | SQLSourceDef | QuerySourceDef | QueryRe
|
|
|
604
600
|
/** Is this the "FROM" table of a query tree */
|
|
605
601
|
export declare function isBaseTable(def: StructDef): def is SourceDef;
|
|
606
602
|
export declare function isScalarArray(def: FieldDef | StructDef): boolean;
|
|
607
|
-
export type StructDef = SourceDef | RecordFieldDef |
|
|
603
|
+
export type StructDef = SourceDef | RecordFieldDef | ArrayDef;
|
|
608
604
|
export type ExpressionValueType = AtomicFieldType | 'null' | 'duration' | 'any' | 'regular expression';
|
|
609
605
|
export type FieldValueType = ExpressionValueType | 'turtle' | JoinFieldTypes;
|
|
610
606
|
export interface ExpressionTypeDesc {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const MALLOY_VERSION = "0.0.
|
|
1
|
+
export declare const MALLOY_VERSION = "0.0.200";
|
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.
|
|
5
|
+
exports.MALLOY_VERSION = '0.0.200';
|
|
6
6
|
//# sourceMappingURL=version.js.map
|