@qrvey/formula-lang
Version:
QFormula support for qrvey projects
141 lines • 5.17 kB
JavaScript
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 = {
[]: {
message: 'Ilegal number of arguments for function',
code: 'NUMBER_ARGS',
},
[]: {
message: 'Can not apply function with null values',
code: 'NULL_FOUNDS',
},
[]: {
message: 'Invalid floating point operation to integer',
code: 'FLOATING_POINT',
},
[]: {
message: 'Element has to be a String',
code: 'MISSING_STRING',
},
[]: {
message: 'Element has to be a Number',
code: 'MISSING_NUMBER',
},
[]: {
message: 'Element has to be a Date',
code: 'MISSING_DATE',
},
[]: {
message: 'Element does not match with a valid range',
code: 'MATCH_RANGE',
},
[]: {
message: 'Element has to be a integer Number',
code: 'INTEGER_NUMBER',
},
[]: {
message: 'Missing arguments',
code: 'MISSING_ARG',
},
[]: {
message: 'Missing parenthesis',
code: 'MISSING_PARENTHESIS',
},
[]: {
message: 'Unknown token',
code: 'UNKNOWN_TOKEN',
},
[]: {
message: 'Unknown function',
code: 'UNKNOWN_FUNCTION',
},
[]: {
message: 'Unknown error',
code: 'UNKNOWN',
},
[]: {
message: 'Too many arguments',
code: 'TOO_MANY_ARGUMENTS',
},
[]: {
message: 'Operation not allowed',
code: 'NOT_ALLOWED_OPERATION',
},
[]: {
message: 'Expression out of range',
code: 'OUT_OF_RANGE',
},
[]: {
message: 'Invalid cast number. Could be to long to process',
code: 'INVALID_CAST_NUMBER',
},
[]: {
message: 'Output values should have the same data type.',
code: 'INFERRED_PRIMITIVE',
},
[]: {
message: 'Invalid boolean argument',
code: 'INVALID_BOOLEAN_ARGUMENT',
},
[]: {
message: 'Argument should be a column.',
code: 'MISSING_COLUMN_EXPRESSION',
},
[]: {
message: 'Argument cannot be a column.',
code: 'NO_COLUMN_EXPRESSION',
},
[]: {
message: 'Function arguments mismatch.',
code: 'FUNCTION_ARGUMENTS_MISMATCH',
},
[]: {
message: 'Argument have to be equal to:',
code: 'INVALID_ALLOW_VALUE',
},
[]: {
message: 'Circular dependency found',
code: 'CIRCULAR_DEPENDENCY',
},
[]: {
message: 'Required to return a Row formula. Instead, it returned an Aggregate formula.',
code: 'ROW_FORMULA_REQUIRED',
},
[]: {
message: 'Column should be inside an aggregate function',
code: 'AGGREGATED_FORMULA_REQUIRED',
},
[]: {
message: 'Formula result should be a number',
code: 'AGG_PRIMITIVE_MISMATCH',
},
};
//# sourceMappingURL=dictionary.js.map