Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust-cubestore-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ jobs:
if: ${{ startsWith(matrix.os, 'windows') }}
run: choco install -y --force llvm --version 18.1.6
- name: Set Env Variables for Windows
uses: allenevans/set-env@v3.0.0
uses: allenevans/set-env@v4.0.0
if: ${{ startsWith(matrix.os, 'windows') }}
with:
OPENSSL_DIR: 'C:/vcpkg/packages/openssl_x64-windows'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-cubestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
if: ${{ startsWith(matrix.os, 'windows') }}
run: choco install -y --force llvm --version 18.1.6
- name: Set Env Variables for Windows
uses: allenevans/set-env@v3.0.0
uses: allenevans/set-env@v4.0.0
if: ${{ startsWith(matrix.os, 'windows') }}
with:
OPENSSL_DIR: 'C:/vcpkg/packages/openssl_x64-windows'
Expand Down
3 changes: 3 additions & 0 deletions packages/cubejs-backend-shared/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,9 @@ const variables: Record<string, (...args: any) => any> = {
livePreview: () => get('CUBEJS_LIVE_PREVIEW')
.default('true')
.asBoolStrict(),
cubestoreSendableParameters: () => get('CUBEJS_CUBESTORE_SENDABLE_PARAMETERS')
.default('false')
.asBoolStrict(),
externalDefault: () => get('CUBEJS_EXTERNAL_DEFAULT')
.default('true')
.asBoolStrict(),
Expand Down
71 changes: 71 additions & 0 deletions packages/cubejs-cubestore-driver/codegen/binary-value.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';

export class BinaryValue {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):BinaryValue {
this.bb_pos = i;
this.bb = bb;
return this;
}

static getRootAsBinaryValue(bb:flatbuffers.ByteBuffer, obj?:BinaryValue):BinaryValue {
return (obj || new BinaryValue()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

static getSizePrefixedRootAsBinaryValue(bb:flatbuffers.ByteBuffer, obj?:BinaryValue):BinaryValue {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new BinaryValue()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

v(index: number):number|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.readUint8(this.bb!.__vector(this.bb_pos + offset) + index) : 0;
}

vLength():number {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
}

vArray():Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? new Uint8Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null;
}

static startBinaryValue(builder:flatbuffers.Builder) {
builder.startObject(1);
}

static addV(builder:flatbuffers.Builder, vOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, vOffset, 0);
}

static createVVector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset {
builder.startVector(1, data.length, 1);
for (let i = data.length - 1; i >= 0; i--) {
builder.addInt8(data[i]!);
}
return builder.endVector();
}

static startVVector(builder:flatbuffers.Builder, numElems:number) {
builder.startVector(1, numElems, 1);
}

static endBinaryValue(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
builder.requiredField(offset, 4) // v
return offset;
}

static createBinaryValue(builder:flatbuffers.Builder, vOffset:flatbuffers.Offset):flatbuffers.Offset {
BinaryValue.startBinaryValue(builder);
BinaryValue.addV(builder, vOffset);
return BinaryValue.endBinaryValue(builder);
}
}
48 changes: 48 additions & 0 deletions packages/cubejs-cubestore-driver/codegen/bool-value.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';

export class BoolValue {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):BoolValue {
this.bb_pos = i;
this.bb = bb;
return this;
}

static getRootAsBoolValue(bb:flatbuffers.ByteBuffer, obj?:BoolValue):BoolValue {
return (obj || new BoolValue()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

static getSizePrefixedRootAsBoolValue(bb:flatbuffers.ByteBuffer, obj?:BoolValue):BoolValue {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new BoolValue()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

v():boolean {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
}

static startBoolValue(builder:flatbuffers.Builder) {
builder.startObject(1);
}

static addV(builder:flatbuffers.Builder, v:boolean) {
builder.addFieldInt8(0, +v, +false);
}

static endBoolValue(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}

static createBoolValue(builder:flatbuffers.Builder, v:boolean):flatbuffers.Offset {
BoolValue.startBoolValue(builder);
BoolValue.addV(builder, v);
return BoolValue.endBoolValue(builder);
}
}
48 changes: 48 additions & 0 deletions packages/cubejs-cubestore-driver/codegen/float64-value.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';

export class Float64Value {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):Float64Value {
this.bb_pos = i;
this.bb = bb;
return this;
}

static getRootAsFloat64Value(bb:flatbuffers.ByteBuffer, obj?:Float64Value):Float64Value {
return (obj || new Float64Value()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

static getSizePrefixedRootAsFloat64Value(bb:flatbuffers.ByteBuffer, obj?:Float64Value):Float64Value {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new Float64Value()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

v():number {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.readFloat64(this.bb_pos + offset) : 0.0;
}

static startFloat64Value(builder:flatbuffers.Builder) {
builder.startObject(1);
}

static addV(builder:flatbuffers.Builder, v:number) {
builder.addFieldFloat64(0, v, 0.0);
}

static endFloat64Value(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}

static createFloat64Value(builder:flatbuffers.Builder, v:number):flatbuffers.Offset {
Float64Value.startFloat64Value(builder);
Float64Value.addV(builder, v);
return Float64Value.endFloat64Value(builder);
}
}
54 changes: 54 additions & 0 deletions packages/cubejs-cubestore-driver/codegen/http-parameter-value.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import { BinaryValue } from './binary-value.js';
import { BoolValue } from './bool-value.js';
import { Float64Value } from './float64-value.js';
import { Int64Value } from './int64-value.js';
import { NullValue } from './null-value.js';
import { StringValue } from './string-value.js';


export enum HttpParameterValue {
NONE = 0,
Int64Value = 1,
BoolValue = 2,
StringValue = 3,
BinaryValue = 4,
Float64Value = 5,
NullValue = 6
}

export function unionToHttpParameterValue(
type: HttpParameterValue,
accessor: (obj:BinaryValue|BoolValue|Float64Value|Int64Value|NullValue|StringValue) => BinaryValue|BoolValue|Float64Value|Int64Value|NullValue|StringValue|null
): BinaryValue|BoolValue|Float64Value|Int64Value|NullValue|StringValue|null {
switch(HttpParameterValue[type]) {
case 'NONE': return null;
case 'Int64Value': return accessor(new Int64Value())! as Int64Value;
case 'BoolValue': return accessor(new BoolValue())! as BoolValue;
case 'StringValue': return accessor(new StringValue())! as StringValue;
case 'BinaryValue': return accessor(new BinaryValue())! as BinaryValue;
case 'Float64Value': return accessor(new Float64Value())! as Float64Value;
case 'NullValue': return accessor(new NullValue())! as NullValue;
default: return null;
}
}

export function unionListToHttpParameterValue(
type: HttpParameterValue,
accessor: (index: number, obj:BinaryValue|BoolValue|Float64Value|Int64Value|NullValue|StringValue) => BinaryValue|BoolValue|Float64Value|Int64Value|NullValue|StringValue|null,
index: number
): BinaryValue|BoolValue|Float64Value|Int64Value|NullValue|StringValue|null {
switch(HttpParameterValue[type]) {
case 'NONE': return null;
case 'Int64Value': return accessor(index, new Int64Value())! as Int64Value;
case 'BoolValue': return accessor(index, new BoolValue())! as BoolValue;
case 'StringValue': return accessor(index, new StringValue())! as StringValue;
case 'BinaryValue': return accessor(index, new BinaryValue())! as BinaryValue;
case 'Float64Value': return accessor(index, new Float64Value())! as Float64Value;
case 'NullValue': return accessor(index, new NullValue())! as NullValue;
default: return null;
}
}
62 changes: 62 additions & 0 deletions packages/cubejs-cubestore-driver/codegen/http-parameter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';

import { HttpParameterValue, unionToHttpParameterValue, unionListToHttpParameterValue } from './http-parameter-value.js';


export class HttpParameter {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):HttpParameter {
this.bb_pos = i;
this.bb = bb;
return this;
}

static getRootAsHttpParameter(bb:flatbuffers.ByteBuffer, obj?:HttpParameter):HttpParameter {
return (obj || new HttpParameter()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

static getSizePrefixedRootAsHttpParameter(bb:flatbuffers.ByteBuffer, obj?:HttpParameter):HttpParameter {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new HttpParameter()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

valueType():HttpParameterValue {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.readUint8(this.bb_pos + offset) : HttpParameterValue.NONE;
}

value<T extends flatbuffers.Table>(obj:any):any|null {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null;
}

static startHttpParameter(builder:flatbuffers.Builder) {
builder.startObject(2);
}

static addValueType(builder:flatbuffers.Builder, valueType:HttpParameterValue) {
builder.addFieldInt8(0, valueType, HttpParameterValue.NONE);
}

static addValue(builder:flatbuffers.Builder, valueOffset:flatbuffers.Offset) {
builder.addFieldOffset(1, valueOffset, 0);
}

static endHttpParameter(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
builder.requiredField(offset, 6) // value
return offset;
}

static createHttpParameter(builder:flatbuffers.Builder, valueType:HttpParameterValue, valueOffset:flatbuffers.Offset):flatbuffers.Offset {
HttpParameter.startHttpParameter(builder);
HttpParameter.addValueType(builder, valueType);
HttpParameter.addValue(builder, valueOffset);
return HttpParameter.endHttpParameter(builder);
}
}
32 changes: 30 additions & 2 deletions packages/cubejs-cubestore-driver/codegen/http-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import * as flatbuffers from 'flatbuffers';

import { HttpParameter } from './http-parameter.js';
import { HttpTable } from './http-table.js';


Expand Down Expand Up @@ -49,8 +50,18 @@ inlineTablesLength():number {
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
}

parameters(index: number, obj?:HttpParameter):HttpParameter|null {
const offset = this.bb!.__offset(this.bb_pos, 10);
return offset ? (obj || new HttpParameter()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null;
}

parametersLength():number {
const offset = this.bb!.__offset(this.bb_pos, 10);
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
}

static startHttpQuery(builder:flatbuffers.Builder) {
builder.startObject(3);
builder.startObject(4);
}

static addQuery(builder:flatbuffers.Builder, queryOffset:flatbuffers.Offset) {
Expand All @@ -77,16 +88,33 @@ static startInlineTablesVector(builder:flatbuffers.Builder, numElems:number) {
builder.startVector(4, numElems, 4);
}

static addParameters(builder:flatbuffers.Builder, parametersOffset:flatbuffers.Offset) {
builder.addFieldOffset(3, parametersOffset, 0);
}

static createParametersVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
builder.startVector(4, data.length, 4);
for (let i = data.length - 1; i >= 0; i--) {
builder.addOffset(data[i]!);
}
return builder.endVector();
}

static startParametersVector(builder:flatbuffers.Builder, numElems:number) {
builder.startVector(4, numElems, 4);
}

static endHttpQuery(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}

static createHttpQuery(builder:flatbuffers.Builder, queryOffset:flatbuffers.Offset, traceObjOffset:flatbuffers.Offset, inlineTablesOffset:flatbuffers.Offset):flatbuffers.Offset {
static createHttpQuery(builder:flatbuffers.Builder, queryOffset:flatbuffers.Offset, traceObjOffset:flatbuffers.Offset, inlineTablesOffset:flatbuffers.Offset, parametersOffset:flatbuffers.Offset):flatbuffers.Offset {
HttpQuery.startHttpQuery(builder);
HttpQuery.addQuery(builder, queryOffset);
HttpQuery.addTraceObj(builder, traceObjOffset);
HttpQuery.addInlineTables(builder, inlineTablesOffset);
HttpQuery.addParameters(builder, parametersOffset);
return HttpQuery.endHttpQuery(builder);
}
}
8 changes: 8 additions & 0 deletions packages/cubejs-cubestore-driver/codegen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

export { BinaryValue } from './binary-value.js';
export { BoolValue } from './bool-value.js';
export { Float64Value } from './float64-value.js';
export { HttpColumnValue } from './http-column-value.js';
export { HttpCommand } from './http-command.js';
export { HttpError } from './http-error.js';
export { HttpMessage } from './http-message.js';
export { HttpParameter } from './http-parameter.js';
export { HttpParameterValue } from './http-parameter-value.js';
export { HttpQuery } from './http-query.js';
export { HttpResultSet } from './http-result-set.js';
export { HttpRow } from './http-row.js';
export { HttpTable } from './http-table.js';
export { Int64Value } from './int64-value.js';
export { NullValue } from './null-value.js';
export { StringValue } from './string-value.js';
Loading
Loading