UNPKG

@qrvey/formula-lang

Version:

QFormula support for qrvey projects

31 lines 940 B
import { ENGINES } from '../constants'; import { customFunctionsList as customFunctionsES, toDate as toDateES, setTimezoneToColumnDate as timezoneES, } from './elasticsearch'; import { toDate as toDateSQL } from './sql'; export function customFunction(engine, func) { switch (engine) { case ENGINES.ELASTICSEARCH: return customFunctionsES(func); default: return false; } } export function customDateCast(engine) { switch (engine) { case ENGINES.ELASTICSEARCH: return toDateES; case ENGINES.REDSHIFT: case ENGINES.SNOWFLAKE: case ENGINES.POSTGRESQL: case ENGINES.DATABRICKS: return toDateSQL; } } export function customTimezone(engine) { switch (engine) { case ENGINES.ELASTICSEARCH: return timezoneES; default: return false; } } //# sourceMappingURL=customFunctions.js.map