@vizzly/semantic-layer-public
Advanced tools
Comparing version 0.0.205-rc-1 to 0.0.205-rc-2
import { QueryEngineConfigV1 } from './types'; | ||
export declare const takeTimeFunctions: (queryEngineConfig: QueryEngineConfigV1) => string[]; | ||
/** Is the value any query engine function? */ | ||
export declare const isQueryEngineFunction: (queryEngineConfig: QueryEngineConfigV1, possible: string) => boolean; | ||
/** Is the given value an aggregate function? */ | ||
export declare const isAggregateFunction: (queryEngineConfig: QueryEngineConfigV1, possibleAggregateFunction: string) => boolean; | ||
/** Is the given value a time trunc function? */ | ||
export declare const isTimeTruncFunction: (queryEngineConfig: QueryEngineConfigV1, possibleTimeTruncFunction: string) => boolean; | ||
/** Is the given value a transformation function? */ | ||
export declare const isTransformationFunction: (queryEngineConfig: QueryEngineConfigV1, possibleTransformationFunction: string) => boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.takeTimeFunctions = void 0; | ||
exports.isTransformationFunction = exports.isTimeTruncFunction = exports.isAggregateFunction = exports.isQueryEngineFunction = exports.takeTimeFunctions = void 0; | ||
const takeTimeFunctions = (queryEngineConfig) => { | ||
@@ -11,1 +11,34 @@ const funcs = Object.keys(queryEngineConfig.supportedFunctions); | ||
exports.takeTimeFunctions = takeTimeFunctions; | ||
/** Is the value any query engine function? */ | ||
const isQueryEngineFunction = (queryEngineConfig, possible) => { | ||
const allAggregateFunctions = Object.keys(queryEngineConfig.supportedFunctions); | ||
return allAggregateFunctions.includes(possible); | ||
}; | ||
exports.isQueryEngineFunction = isQueryEngineFunction; | ||
/** Is the given value an aggregate function? */ | ||
const isAggregateFunction = (queryEngineConfig, possibleAggregateFunction) => { | ||
const allAggregateFunctions = Object.keys(queryEngineConfig.supportedFunctions).filter((funcName) => { | ||
const sF = queryEngineConfig.supportedFunctions[funcName]; | ||
return sF.useFor.includes('aggregate'); | ||
}); | ||
return allAggregateFunctions.includes(possibleAggregateFunction); | ||
}; | ||
exports.isAggregateFunction = isAggregateFunction; | ||
/** Is the given value a time trunc function? */ | ||
const isTimeTruncFunction = (queryEngineConfig, possibleTimeTruncFunction) => { | ||
const allTimeTruncFunctions = Object.keys(queryEngineConfig.supportedFunctions).filter((funcName) => { | ||
const sF = queryEngineConfig.supportedFunctions[funcName]; | ||
return (sF.useFor.includes('transform') && sF.inputDataTypes.includes('date_time') && sF.outputDataType === 'date_time'); | ||
}); | ||
return allTimeTruncFunctions.includes(possibleTimeTruncFunction); | ||
}; | ||
exports.isTimeTruncFunction = isTimeTruncFunction; | ||
/** Is the given value a transformation function? */ | ||
const isTransformationFunction = (queryEngineConfig, possibleTransformationFunction) => { | ||
const allTransformationFunctions = Object.keys(queryEngineConfig.supportedFunctions).filter((funcName) => { | ||
const sF = queryEngineConfig.supportedFunctions[funcName]; | ||
return sF.useFor.includes('transform') && sF.outputDataType != 'date_time'; | ||
}); | ||
return allTransformationFunctions.includes(possibleTransformationFunction); | ||
}; | ||
exports.isTransformationFunction = isTransformationFunction; |
@@ -44,2 +44,4 @@ "use strict"; | ||
'percentile99', | ||
'round_to_0_dp', | ||
'round_to_2_dp', | ||
]), | ||
@@ -46,0 +48,0 @@ supportedOperators: (0, support_1.supportedOperators)([ |
{ | ||
"name": "@vizzly/semantic-layer-public", | ||
"version": "0.0.205-rc-1", | ||
"version": "0.0.205-rc-2", | ||
"source": "src/index.ts", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
77656
2102