drizzle-cube 0.1.26 → 0.1.29
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/adapters/{compiler-CSr2Ti96.js → compiler-BibS3bXd.js} +980 -920
- package/dist/adapters/express/index.js +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/adapters/utils.d.ts +1 -1
- package/dist/client/charts.js +1 -1
- package/dist/client/chunks/{charts-JUvTF2xT.js → charts-BM1k01Jw.js} +1067 -911
- package/dist/client/chunks/charts-BM1k01Jw.js.map +1 -0
- package/dist/client/chunks/{icons-ChgBIaCg.js → icons-B_0yoGjv.js} +398 -352
- package/dist/client/chunks/icons-B_0yoGjv.js.map +1 -0
- package/dist/client/chunks/providers-B7MVnAAt.js.map +1 -1
- package/dist/client/components/CubeRelationshipDiagram/CubeNode.d.ts +13 -0
- package/dist/client/components/CubeRelationshipDiagram/ERDControls.d.ts +7 -0
- package/dist/client/components/CubeRelationshipDiagram/RelationshipEdge.d.ts +11 -0
- package/dist/client/components/CubeRelationshipDiagram/index.d.ts +10 -0
- package/dist/client/components/CubeRelationshipDiagram/useERDLayout.d.ts +21 -0
- package/dist/client/components/DataHistogram.d.ts +3 -1
- package/dist/client/components/QueryBuilder/types.d.ts +4 -0
- package/dist/client/components.js +14910 -4905
- package/dist/client/components.js.map +1 -1
- package/dist/client/hooks/useCubeMeta.d.ts +9 -0
- package/dist/client/index.js +1 -1
- package/dist/client/styles.css +1 -1
- package/dist/client/types.d.ts +3 -1
- package/dist/client/utils/targetUtils.d.ts +36 -0
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/index.d.ts +27 -9
- package/dist/server/index.js +1002 -942
- package/package.json +5 -2
- package/dist/client/chunks/charts-JUvTF2xT.js.map +0 -1
- package/dist/client/chunks/icons-ChgBIaCg.js.map +0 -1
package/dist/server/index.d.ts
CHANGED
|
@@ -11,9 +11,9 @@ export declare abstract class BaseDatabaseExecutor implements DatabaseExecutor {
|
|
|
11
11
|
db: DrizzleDatabase;
|
|
12
12
|
schema?: any | undefined;
|
|
13
13
|
databaseAdapter: DatabaseAdapter;
|
|
14
|
-
constructor(db: DrizzleDatabase, schema?: any | undefined, engineType?: 'postgres' | 'mysql' | 'sqlite');
|
|
14
|
+
constructor(db: DrizzleDatabase, schema?: any | undefined, engineType?: 'postgres' | 'mysql' | 'sqlite' | 'singlestore');
|
|
15
15
|
abstract execute<T = any[]>(query: SQL | any, numericFields?: string[]): Promise<T>;
|
|
16
|
-
abstract getEngineType(): 'postgres' | 'mysql' | 'sqlite';
|
|
16
|
+
abstract getEngineType(): 'postgres' | 'mysql' | 'sqlite' | 'singlestore';
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -48,7 +48,7 @@ export declare interface CompiledCube extends Cube {
|
|
|
48
48
|
* @param engineType - Optional explicit engine type override
|
|
49
49
|
* @returns Appropriate database executor
|
|
50
50
|
*/
|
|
51
|
-
export declare function createDatabaseExecutor(db: DrizzleDatabase, schema?: any, engineType?: 'postgres' | 'mysql' | 'sqlite'): DatabaseExecutor;
|
|
51
|
+
export declare function createDatabaseExecutor(db: DrizzleDatabase, schema?: any, engineType?: 'postgres' | 'mysql' | 'sqlite' | 'singlestore'): DatabaseExecutor;
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Create a new semantic layer instance with Drizzle integration
|
|
@@ -168,13 +168,26 @@ export declare interface CubeMetadata {
|
|
|
168
168
|
measures: MeasureMetadata[];
|
|
169
169
|
dimensions: DimensionMetadata[];
|
|
170
170
|
segments: any[];
|
|
171
|
+
relationships?: CubeRelationshipMetadata[];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Cube relationship metadata for ERD visualization
|
|
176
|
+
*/
|
|
177
|
+
export declare interface CubeRelationshipMetadata {
|
|
178
|
+
targetCube: string;
|
|
179
|
+
relationship: 'belongsTo' | 'hasOne' | 'hasMany';
|
|
180
|
+
joinFields: Array<{
|
|
181
|
+
sourceField: string;
|
|
182
|
+
targetField: string;
|
|
183
|
+
}>;
|
|
171
184
|
}
|
|
172
185
|
|
|
173
186
|
declare interface DatabaseAdapter {
|
|
174
187
|
/**
|
|
175
188
|
* Get the database engine type this adapter supports
|
|
176
189
|
*/
|
|
177
|
-
getEngineType(): 'postgres' | 'mysql' | 'sqlite';
|
|
190
|
+
getEngineType(): 'postgres' | 'mysql' | 'sqlite' | 'singlestore';
|
|
178
191
|
/**
|
|
179
192
|
* Build time dimension expression with granularity truncation
|
|
180
193
|
* @param granularity - Time granularity (day, month, year, etc.)
|
|
@@ -258,7 +271,7 @@ export declare interface DatabaseExecutor {
|
|
|
258
271
|
/** Execute a Drizzle SQL query or query object */
|
|
259
272
|
execute<T = any[]>(query: SQL | any, numericFields?: string[]): Promise<T>;
|
|
260
273
|
/** Get the database engine type */
|
|
261
|
-
getEngineType(): 'postgres' | 'mysql' | 'sqlite';
|
|
274
|
+
getEngineType(): 'postgres' | 'mysql' | 'sqlite' | 'singlestore';
|
|
262
275
|
}
|
|
263
276
|
|
|
264
277
|
/**
|
|
@@ -456,7 +469,7 @@ export declare class MySQLExecutor extends BaseDatabaseExecutor {
|
|
|
456
469
|
* Coerce a value to a number if it represents a numeric type
|
|
457
470
|
*/
|
|
458
471
|
private coerceToNumber;
|
|
459
|
-
getEngineType(): 'mysql';
|
|
472
|
+
getEngineType(): 'mysql' | 'singlestore';
|
|
460
473
|
}
|
|
461
474
|
|
|
462
475
|
/**
|
|
@@ -762,7 +775,7 @@ export declare class SemanticLayerCompiler {
|
|
|
762
775
|
drizzle?: DatabaseExecutor['db'];
|
|
763
776
|
schema?: any;
|
|
764
777
|
databaseExecutor?: DatabaseExecutor;
|
|
765
|
-
engineType?: 'postgres' | 'mysql' | 'sqlite';
|
|
778
|
+
engineType?: 'postgres' | 'mysql' | 'sqlite' | 'singlestore';
|
|
766
779
|
});
|
|
767
780
|
/**
|
|
768
781
|
* Set or update the database executor
|
|
@@ -771,11 +784,11 @@ export declare class SemanticLayerCompiler {
|
|
|
771
784
|
/**
|
|
772
785
|
* Get the database engine type for SQL formatting
|
|
773
786
|
*/
|
|
774
|
-
getEngineType(): 'postgres' | 'mysql' | 'sqlite' | undefined;
|
|
787
|
+
getEngineType(): 'postgres' | 'mysql' | 'sqlite' | 'singlestore' | undefined;
|
|
775
788
|
/**
|
|
776
789
|
* Set Drizzle instance and schema directly
|
|
777
790
|
*/
|
|
778
|
-
setDrizzle(db: DatabaseExecutor['db'], schema?: any, engineType?: 'postgres' | 'mysql' | 'sqlite'): void;
|
|
791
|
+
setDrizzle(db: DatabaseExecutor['db'], schema?: any, engineType?: 'postgres' | 'mysql' | 'sqlite' | 'singlestore'): void;
|
|
779
792
|
/**
|
|
780
793
|
* Check if database executor is configured
|
|
781
794
|
*/
|
|
@@ -813,6 +826,11 @@ export declare class SemanticLayerCompiler {
|
|
|
813
826
|
* Uses caching to improve performance for repeated requests
|
|
814
827
|
*/
|
|
815
828
|
getMetadata(): CubeMetadata[];
|
|
829
|
+
/**
|
|
830
|
+
* Extract column name from Drizzle column reference
|
|
831
|
+
* Handles different column types and extracts the actual column name
|
|
832
|
+
*/
|
|
833
|
+
private getColumnName;
|
|
816
834
|
/**
|
|
817
835
|
* Generate cube metadata for API responses from cubes
|
|
818
836
|
* Optimized version that minimizes object iterations
|