File tree Expand file tree Collapse file tree 5 files changed +11
-9
lines changed
packages/cubejs-schema-compiler/src/compiler Expand file tree Collapse file tree 5 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 11import type { ErrorReporter } from './ErrorReporter' ;
22import { TranspilerCubeResolver } from './transpilers' ;
3+ import { CompilerInterface } from './PrepareCompiler' ;
34
45export interface Cube {
56 name : string ;
67 [ key : string ] : any ;
78}
89
9- export class CubeDictionary implements TranspilerCubeResolver {
10+ export class CubeDictionary implements TranspilerCubeResolver , CompilerInterface {
1011 public byId : Record < string , Cube > ;
1112
1213 public constructor ( ) {
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { camelizeCube } from './utils';
88
99import type { ErrorReporter } from './ErrorReporter' ;
1010import { TranspilerSymbolResolver } from './transpilers' ;
11+ import { CompilerInterface } from './PrepareCompiler' ;
1112
1213export type ToString = { toString ( ) : string } ;
1314
@@ -215,7 +216,7 @@ export const CONTEXT_SYMBOLS = {
215216
216217export const CURRENT_CUBE_CONSTANTS = [ 'CUBE' , 'TABLE' ] ;
217218
218- export class CubeSymbols implements TranspilerSymbolResolver {
219+ export class CubeSymbols implements TranspilerSymbolResolver , CompilerInterface {
219220 public symbols : Record < string | symbol , CubeSymbolsDefinition > ;
220221
221222 private builtCubes : Record < string , CubeDefinitionExtended > ;
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import cronParser from 'cron-parser';
33
44import type { CubeSymbols , CubeDefinition } from './CubeSymbols' ;
55import type { ErrorReporter } from './ErrorReporter' ;
6+ import { CompilerInterface } from './PrepareCompiler' ;
67
78/* *****************************
89 * ATTENTION:
@@ -978,7 +979,7 @@ export function functionFieldsPatterns(): string[] {
978979 return Array . from ( functionPatterns ) ;
979980}
980981
981- export class CubeValidator {
982+ export class CubeValidator implements CompilerInterface {
982983 protected readonly validCubes : Map < string , boolean > = new Map ( ) ;
983984
984985 public constructor (
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import type { CubeValidator } from './CubeValidator';
66import type { CubeEvaluator , MeasureDefinition } from './CubeEvaluator' ;
77import type { CubeDefinition , JoinDefinition } from './CubeSymbols' ;
88import type { ErrorReporter } from './ErrorReporter' ;
9+ import { CompilerInterface } from './PrepareCompiler' ;
910
1011export type JoinEdge = {
1112 join : JoinDefinition ,
@@ -30,7 +31,7 @@ export type JoinHint = string | string[];
3031
3132export type JoinHints = JoinHint [ ] ;
3233
33- export class JoinGraph {
34+ export class JoinGraph implements CompilerInterface {
3435 private readonly cubeValidator : CubeValidator ;
3536
3637 private readonly cubeEvaluator : CubeEvaluator ;
Original file line number Diff line number Diff line change 1- export class ViewCompilationGate {
2- private shouldCompile : any ;
1+ import { CompilerInterface } from './PrepareCompiler' ;
32
4- public constructor ( ) {
5- this . shouldCompile = false ;
6- }
3+ export class ViewCompilationGate implements CompilerInterface {
4+ private shouldCompile : boolean = false ;
75
86 public compile ( cubes : any [ ] ) {
97 // When developing Data Access Policies feature, we've come across a
You can’t perform that action at this time.
0 commit comments