UNPKG

@qrvey/formula-lang

Version:

QFormula support for qrvey projects

141 lines 5.17 kB
export var ERROR_LIST; (function (ERROR_LIST) { ERROR_LIST["arguments"] = "arguments"; ERROR_LIST["nulls"] = "nulls"; ERROR_LIST["floatingPoint"] = "floatingPoint"; ERROR_LIST["missingString"] = "missingString"; ERROR_LIST["missingNumber"] = "missingNumber"; ERROR_LIST["missingDate"] = "missingDate"; ERROR_LIST["matchRange"] = "matchRange"; ERROR_LIST["integerNumber"] = "integerNumber"; ERROR_LIST["missingArg"] = "missingArg"; ERROR_LIST["missingParenthesis"] = "missingParenthesis"; ERROR_LIST["unknownFunction"] = "unknownFunction"; ERROR_LIST["unknown"] = "unknown"; ERROR_LIST["tooManyArguments"] = "tooManyArguments"; ERROR_LIST["unknownToken"] = "unknownToken"; ERROR_LIST["notAllowedOperation"] = "notAllowedOperation"; ERROR_LIST["outOfRange"] = "outOfRange"; ERROR_LIST["invalidCastNumber"] = "invalidCastNumber"; ERROR_LIST["inferredPrimitive"] = "inferredPrimitive"; ERROR_LIST["booleanExpression"] = "booleanExpression"; ERROR_LIST["missingColumnExpression"] = "missingColumnExpression"; ERROR_LIST["noColumnExpression"] = "noColumnExpression"; ERROR_LIST["functionArgumentsMismatch"] = "functionArgumentsMismatch"; ERROR_LIST["invalidAllowValue"] = "invalidAllowValue"; ERROR_LIST["circularDependency"] = "circularDependency"; ERROR_LIST["rowFormulaRequired"] = "rowFormulaRequired"; ERROR_LIST["aggregatedFormulaRequired"] = "aggregatedFormulaRequired"; ERROR_LIST["aggregatedExpectedMismatch"] = "aggregatedExpectedMismatch"; })(ERROR_LIST || (ERROR_LIST = {})); export const ERROR_DICTIONARY = { [ERROR_LIST.arguments]: { message: 'Ilegal number of arguments for function', code: 'NUMBER_ARGS', }, [ERROR_LIST.nulls]: { message: 'Can not apply function with null values', code: 'NULL_FOUNDS', }, [ERROR_LIST.floatingPoint]: { message: 'Invalid floating point operation to integer', code: 'FLOATING_POINT', }, [ERROR_LIST.missingString]: { message: 'Element has to be a String', code: 'MISSING_STRING', }, [ERROR_LIST.missingNumber]: { message: 'Element has to be a Number', code: 'MISSING_NUMBER', }, [ERROR_LIST.missingDate]: { message: 'Element has to be a Date', code: 'MISSING_DATE', }, [ERROR_LIST.matchRange]: { message: 'Element does not match with a valid range', code: 'MATCH_RANGE', }, [ERROR_LIST.integerNumber]: { message: 'Element has to be a integer Number', code: 'INTEGER_NUMBER', }, [ERROR_LIST.missingArg]: { message: 'Missing arguments', code: 'MISSING_ARG', }, [ERROR_LIST.missingParenthesis]: { message: 'Missing parenthesis', code: 'MISSING_PARENTHESIS', }, [ERROR_LIST.unknownToken]: { message: 'Unknown token', code: 'UNKNOWN_TOKEN', }, [ERROR_LIST.unknownFunction]: { message: 'Unknown function', code: 'UNKNOWN_FUNCTION', }, [ERROR_LIST.unknown]: { message: 'Unknown error', code: 'UNKNOWN', }, [ERROR_LIST.tooManyArguments]: { message: 'Too many arguments', code: 'TOO_MANY_ARGUMENTS', }, [ERROR_LIST.notAllowedOperation]: { message: 'Operation not allowed', code: 'NOT_ALLOWED_OPERATION', }, [ERROR_LIST.outOfRange]: { message: 'Expression out of range', code: 'OUT_OF_RANGE', }, [ERROR_LIST.invalidCastNumber]: { message: 'Invalid cast number. Could be to long to process', code: 'INVALID_CAST_NUMBER', }, [ERROR_LIST.inferredPrimitive]: { message: 'Output values should have the same data type.', code: 'INFERRED_PRIMITIVE', }, [ERROR_LIST.booleanExpression]: { message: 'Invalid boolean argument', code: 'INVALID_BOOLEAN_ARGUMENT', }, [ERROR_LIST.missingColumnExpression]: { message: 'Argument should be a column.', code: 'MISSING_COLUMN_EXPRESSION', }, [ERROR_LIST.noColumnExpression]: { message: 'Argument cannot be a column.', code: 'NO_COLUMN_EXPRESSION', }, [ERROR_LIST.functionArgumentsMismatch]: { message: 'Function arguments mismatch.', code: 'FUNCTION_ARGUMENTS_MISMATCH', }, [ERROR_LIST.invalidAllowValue]: { message: 'Argument have to be equal to:', code: 'INVALID_ALLOW_VALUE', }, [ERROR_LIST.circularDependency]: { message: 'Circular dependency found', code: 'CIRCULAR_DEPENDENCY', }, [ERROR_LIST.rowFormulaRequired]: { message: 'Required to return a Row formula. Instead, it returned an Aggregate formula.', code: 'ROW_FORMULA_REQUIRED', }, [ERROR_LIST.aggregatedFormulaRequired]: { message: 'Column should be inside an aggregate function', code: 'AGGREGATED_FORMULA_REQUIRED', }, [ERROR_LIST.aggregatedExpectedMismatch]: { message: 'Formula result should be a number', code: 'AGG_PRIMITIVE_MISMATCH', }, }; //# sourceMappingURL=dictionary.js.map