UNPKG

sedk-mysql

Version:
61 lines 2.76 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EmptyArrayError = exports.InsertColumnsAndExpressionsNotEqualError = exports.InsertColumnsAndValuesNotEqualError = exports.InvalidOffsetValueError = exports.InvalidLimitValueError = exports.DeleteWithoutConditionError = exports.InvalidConditionError = exports.MoreThanOneDistinctOrAllError = exports.InvalidExpressionError = exports.TableNotFoundError = exports.ColumnNotFoundError = void 0; class ColumnNotFoundError extends Error { constructor(columnName) { super(`Column: "${columnName}" not found in database`); } } exports.ColumnNotFoundError = ColumnNotFoundError; class TableNotFoundError extends Error { } exports.TableNotFoundError = TableNotFoundError; class InvalidExpressionError extends Error { } exports.InvalidExpressionError = InvalidExpressionError; class MoreThanOneDistinctOrAllError extends Error { } exports.MoreThanOneDistinctOrAllError = MoreThanOneDistinctOrAllError; class InvalidConditionError extends Error { } exports.InvalidConditionError = InvalidConditionError; class DeleteWithoutConditionError extends Error { constructor() { super('Delete statement must have where conditions or set throwErrorIfDeleteHasNoCondition option to false'); } } exports.DeleteWithoutConditionError = DeleteWithoutConditionError; class InvalidLimitValueError extends Error { constructor(value) { super(`Invalid limit value: ${value}, value must be positive integer number`); } } exports.InvalidLimitValueError = InvalidLimitValueError; class InvalidOffsetValueError extends Error { constructor(value) { super(`Invalid offset value: ${value}, value must be positive integer number`); } } exports.InvalidOffsetValueError = InvalidOffsetValueError; class InsertColumnsAndValuesNotEqualError extends Error { constructor(columnsCount, valuesCount) { super(); this.message = `Number of values does not match number of columns. Columns: ${columnsCount}, Values: ${valuesCount}`; } } exports.InsertColumnsAndValuesNotEqualError = InsertColumnsAndValuesNotEqualError; class InsertColumnsAndExpressionsNotEqualError extends Error { constructor(columnsCount, expressionsCount) { super(); this.message = `Number of expressions in Select does not match number of columns. Columns: ${columnsCount}, Expressions: ${expressionsCount}`; } } exports.InsertColumnsAndExpressionsNotEqualError = InsertColumnsAndExpressionsNotEqualError; class EmptyArrayError extends Error { constructor(operator) { super(); this.message = `${operator} Operator's array cannot be empty`; } } exports.EmptyArrayError = EmptyArrayError; //# sourceMappingURL=errors.js.map