import { EntityError, EntityErrorCode, EntityErrorState } from './EntityError.ts'; /** * Base class for all errors related to the database adapter. */ export declare abstract class EntityDatabaseAdapterError extends EntityError { } /** * Thrown when a unique constraint is violated within the database adapter. * This indicates that a value being inserted or updated duplicates an existing value in a column or set of columns * that require unique values. */ export declare class EntityDatabaseAdapterUniqueConstraintError extends EntityDatabaseAdapterError { get state(): EntityErrorState.PERMANENT; get code(): EntityErrorCode.ERR_ENTITY_DATABASE_ADAPTER_UNIQUE_CONSTRAINT; } /** * Thrown when an insert operation returns more results than expected. Only one row is expected. * These should never happen with a properly implemented database adapter unless the underlying database has nonstandard * triggers or something similar. */ export declare class EntityDatabaseAdapterExcessiveInsertResultError extends EntityDatabaseAdapterError { get state(): EntityErrorState.PERMANENT; get code(): EntityErrorCode.ERR_ENTITY_DATABASE_ADAPTER_EXCESSIVE_INSERT_RESULT; } /** * Thrown when an insert operation returns no results. One row is expected. * These should never happen with a properly implemented database adapter unless the underlying database has nonstandard * triggers or something similar. */ export declare class EntityDatabaseAdapterEmptyInsertResultError extends EntityDatabaseAdapterError { get state(): EntityErrorState.PERMANENT; get code(): EntityErrorCode.ERR_ENTITY_DATABASE_ADAPTER_EMPTY_INSERT_RESULT; } /** * Thrown when an update operation returns more results than expected. Only one row is expected. * These should never happen with a properly implemented database adapter unless the underlying table has a non-unique * primary key column. */ export declare class EntityDatabaseAdapterExcessiveUpdateResultError extends EntityDatabaseAdapterError { get state(): EntityErrorState.PERMANENT; get code(): EntityErrorCode.ERR_ENTITY_DATABASE_ADAPTER_EXCESSIVE_UPDATE_RESULT; } /** * Thrown when an update operation returns no results. One row is expected. * This most often happens when attempting to update a non-existent row, often indicating that the row * was deleted by a different process between fetching and updating it in this process. */ export declare class EntityDatabaseAdapterEmptyUpdateResultError extends EntityDatabaseAdapterError { get state(): EntityErrorState.PERMANENT; get code(): EntityErrorCode.ERR_ENTITY_DATABASE_ADAPTER_EMPTY_UPDATE_RESULT; } /** * Thrown when a delete operation returns more results than expected. Only one row is expected. * These should never happen with a properly implemented database adapter unless the underlying table has a non-unique * primary key column. */ export declare class EntityDatabaseAdapterExcessiveDeleteResultError extends EntityDatabaseAdapterError { get state(): EntityErrorState.PERMANENT; get code(): EntityErrorCode.ERR_ENTITY_DATABASE_ADAPTER_EXCESSIVE_DELETE_RESULT; }