@malloydata/malloy
Advanced tools
Comparing version 0.0.19-dev230106235212 to 0.0.19-dev230107152820
@@ -5,3 +5,3 @@ /// <reference types="node" /> | ||
import { DocumentHelpContext } from "./lang/parse-tree-walkers/document-help-context-walker"; | ||
import { CompiledQuery, FieldBooleanDef, FieldDateDef, FieldNumberDef, FieldStringDef, FieldTimestampDef, FieldTypeDef, FilterExpression, ModelDef, Query as InternalQuery, QueryData, QueryDataRow, QueryResult, StructDef, TurtleDef, SQLBlock, DocumentReference, DocumentPosition as ModelDocumentPosition, SearchIndexResult, SearchValueMapResult, NamedQuery, SQLBlockStructDef } from "./model"; | ||
import { CompiledQuery, FieldBooleanDef, FieldDateDef, FieldNumberDef, FieldStringDef, FieldTimestampDef, FieldTypeDef, FilterExpression, ModelDef, Query as InternalQuery, QueryData, QueryDataRow, QueryResult, StructDef, TurtleDef, SQLBlock, DocumentReference, DocumentPosition as ModelDocumentPosition, SearchIndexResult, SearchValueMapResult, NamedQuery, SQLBlockStructDef, FieldJSONDef } from "./model"; | ||
import { LookupConnection, ModelString, ModelURL, QueryString, QueryURL, URLReader, Connection } from "./runtime_types"; | ||
@@ -500,3 +500,4 @@ export interface Loggable { | ||
Date = "date", | ||
Timestamp = "timestamp" | ||
Timestamp = "timestamp", | ||
Json = "json" | ||
} | ||
@@ -523,2 +524,3 @@ export declare class AtomicField extends Entity { | ||
isBoolean(): this is BooleanField; | ||
isJSON(): this is JSONField; | ||
isTimestamp(): this is TimestampField; | ||
@@ -563,2 +565,6 @@ get parentExplore(): Explore; | ||
} | ||
export declare class JSONField extends AtomicField { | ||
private fieldJSONDef; | ||
constructor(fieldJSONDef: FieldJSONDef, parent: Explore, source?: AtomicField); | ||
} | ||
export declare class StringField extends AtomicField { | ||
@@ -1019,3 +1025,3 @@ private fieldStringDef; | ||
} | ||
export declare type DataColumn = DataArray | DataRecord | DataString | DataBoolean | DataNumber | DataDate | DataTimestamp | DataNull | DataBytes; | ||
export declare type DataColumn = DataArray | DataRecord | DataString | DataBoolean | DataNumber | DataDate | DataTimestamp | DataNull | DataBytes | DataJSON; | ||
export declare type DataArrayOrRecord = DataArray | DataRecord; | ||
@@ -1063,2 +1069,7 @@ declare abstract class Data<T> { | ||
} | ||
declare class DataJSON extends ScalarData<string> { | ||
protected _field: JSONField; | ||
constructor(value: string, field: JSONField); | ||
get field(): JSONField; | ||
} | ||
declare class DataNumber extends ScalarData<number> { | ||
@@ -1065,0 +1076,0 @@ protected _field: NumberField; |
@@ -244,3 +244,3 @@ /// <reference types="node" /> | ||
export declare function isTimeFieldType(s: string): s is TimeFieldType; | ||
export declare type AtomicFieldType = "string" | "number" | TimeFieldType | "boolean"; | ||
export declare type AtomicFieldType = "string" | "number" | TimeFieldType | "boolean" | "json"; | ||
export declare function isAtomicFieldType(s: string): s is AtomicFieldType; | ||
@@ -267,2 +267,6 @@ /** All scalars can have an optional expression */ | ||
} | ||
/** Scalar JSON Field */ | ||
export interface FieldJSONDef extends FieldAtomicDef { | ||
type: "json"; | ||
} | ||
export declare type DateUnit = "day" | "week" | "month" | "quarter" | "year"; | ||
@@ -451,3 +455,3 @@ export declare function isDateUnit(str: string): str is DateUnit; | ||
/** any of the different field types */ | ||
export declare type FieldTypeDef = FieldStringDef | FieldDateDef | FieldTimestampDef | FieldNumberDef | FieldBooleanDef; | ||
export declare type FieldTypeDef = FieldStringDef | FieldDateDef | FieldTimestampDef | FieldNumberDef | FieldBooleanDef | FieldJSONDef; | ||
export declare function isFieldTypeDef(f: FieldDef): f is FieldTypeDef; | ||
@@ -454,0 +458,0 @@ export declare function isFieldTimeBased(f: FieldDef): f is FieldTimestampDef | FieldDateDef; |
@@ -190,3 +190,3 @@ "use strict"; | ||
function isAtomicFieldType(s) { | ||
return ["string", "number", "date", "timestamp", "boolean"].includes(s); | ||
return ["string", "number", "date", "timestamp", "boolean", "json"].includes(s); | ||
} | ||
@@ -292,3 +292,4 @@ exports.isAtomicFieldType = isAtomicFieldType; | ||
f.type === "timestamp" || | ||
f.type === "boolean"); | ||
f.type === "boolean" || | ||
f.type === "json"); | ||
} | ||
@@ -295,0 +296,0 @@ exports.isFieldTypeDef = isFieldTypeDef; |
{ | ||
"name": "@malloydata/malloy", | ||
"version": "0.0.19-dev230106235212", | ||
"version": "0.0.19-dev230107152820", | ||
"license": "GPL-2.0", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1593383
41410