On this page
Rust performs parsing and every step; this interface does no source fetching.
Members
Methods
Parse host-provided bytes; fatal failures throw QueryError.
Execute an ordered plan; cell errors stay in the typed output buffers.
Declaration
View full TypeScript declaration
export interface QueryEngine {
Referenced by
Public exports naming QueryEngine
type QuerySource =
| {
readonly format: "json";
readonly columns: readonly QueryColumnSpec[];
readonly path?: readonly string[];
}
| {
readonly format: "csv";
readonly columns: readonly QueryColumnSpec[];
readonly delimiter?: number;
readonly headers?: boolean;
readonly emptyIsNull?: boolean;
};type QuerySource =
| {
readonly format: "json";
readonly columns: readonly QueryColumnSpec[];
readonly path?: readonly string[];
}
| {
readonly format: "csv";
readonly columns: readonly QueryColumnSpec[];
readonly delimiter?: number;
readonly headers?: boolean;
readonly emptyIsNull?: boolean;
};type QuerySource =
| {
readonly format: "json";
readonly columns: readonly QueryColumnSpec[];
readonly path?: readonly string[];
}
| {
readonly format: "csv";
readonly columns: readonly QueryColumnSpec[];
readonly delimiter?: number;
readonly headers?: boolean;
readonly emptyIsNull?: boolean;
};Host-owned UTF-8 bytes are parsed against an explicit schema, without type guessing.API referenceinterface QueryLimits {
readonly maxRows: number;
readonly maxCells: number;
readonly maxSourceBytes: number;
readonly maxOutputBytes: number;
readonly maxSteps: number;
}interface QueryLimits {
readonly maxRows: number;
readonly maxCells: number;
readonly maxSourceBytes: number;
readonly maxOutputBytes: number;
readonly maxSteps: number;
}interface QueryLimits {
readonly maxRows: number;
readonly maxCells: number;
readonly maxSourceBytes: number;
readonly maxOutputBytes: number;
readonly maxSteps: number;
}Per-execution ceilings; expanding operations reject output before allocation.API referenceinterface QueryBatch {
readonly rowCount: number;
readonly columns: readonly QueryColumn[];
}interface QueryBatch {
readonly rowCount: number;
readonly columns: readonly QueryColumn[];
}interface QueryBatch {
readonly rowCount: number;
readonly columns: readonly QueryColumn[];
}Equal-length columns with a u32 row count; returned buffers are owned by the caller.API referencetype QueryStep =
| { readonly kind: "filter"; readonly predicate: QueryPredicate }
| { readonly kind: "select"; readonly columns: readonly string[] }
| {
readonly kind: "rename";
readonly columns: readonly (readonly [
id: string,
name: string,
])[];
}
| {
readonly kind: "changeType";
readonly column: string;
readonly type: QueryColumnType;
readonly onError: "error" | "null";
// … 27 more lines — see the API reference
}type QueryStep =
| { readonly kind: "filter"; readonly predicate: QueryPredicate }
| { readonly kind: "select"; readonly columns: readonly string[] }
| {
readonly kind: "rename";
readonly columns: readonly (readonly [
id: string,
name: string,
])[];
}
| {
readonly kind: "changeType";
readonly column: string;
readonly type: QueryColumnType;
readonly onError: "error" | "null";
}type QueryStep =
| {
readonly kind: "filter";
readonly predicate: QueryPredicate;
}
| {
readonly kind: "select";
readonly columns: readonly string[];
}
| {
readonly kind: "rename";
readonly columns: readonly (readonly [
id: string,
name: string,
])[];
}
| {
readonly kind: "changeType";
readonly column: string;
}Saved step order is execution order; each column reference is a stable identity. In a saved query, a join input is the ID of another saved query.API referenceinterface QueryInput {
readonly id: string;
readonly batch: QueryBatch;
}interface QueryInput {
readonly id: string;
readonly batch: QueryBatch;
}interface QueryInput {
readonly id: string;
readonly batch: QueryBatch;
}One execution-local named input, consumed by join steps without a result cache.API reference