UNPKG

json-to-sql-parser

Version:

A TypeScript library that converts JSON-based query specifications into safe SQL queries

17 lines 1.48 kB
import type { ExpressionType as Type } from "./field-types"; export declare const JSON_ACCESS_TYPE_ERROR: (path: string, field: string, type: Type) => string; declare const invalidJsonAccessReasons: { format: string; quote: string; }; export declare const INVALID_JSON_ACCESS_ERROR: (jsonAccess: string, reason: keyof typeof invalidJsonAccessReasons) => string; export declare const INVALID_OPERATOR_VALUE_TYPE_ERROR: (operator: string, type: string) => string; export declare const FUNCTION_TYPE_MISMATCH_ERROR: (functionName: string, fieldType: Type, type: Type) => string; export declare const COMPARISON_TYPE_MISMATCH_ERROR: (operator: string, field: string, fieldType: Type, type: Type) => string; export declare const INVALID_ARGUMENT_COUNT_ERROR: (functionName: string, argCount: number, count: number, variadic?: boolean) => string; export declare const MISSING_AGGREGATION_FIELD_ERROR = "Aggregation query must have at least one group by field or aggregated field"; export declare const FORBIDDEN_EXISTING_ROW_EVALUATION_ON_INSERT_ERROR = "Evaluations on existing rows are not allowed during INSERT. Use 'NEW_ROW' as a prefix for evaluating new row values, or $exists to apply a condition on existing rows."; export declare const NON_EMPTY_CONDITION_ARRAY_ERROR: (operator: string) => string; export declare const MATHEMATICAL_OPERATORS_NOT_SUPPORTED_IN_DIALECT_ERROR: (operator: string, dialect: string) => string; export {}; //# sourceMappingURL=errors.d.ts.map