UNPKG

2.38 kBTypeScriptView Raw
1import { Exception } from '@poppinss/utils';
2import { LucidModel } from './types/model.js';
3export declare const E_INVALID_DATE_COLUMN_VALUE: new (args: [string, string | null], options?: ErrorOptions) => Exception;
4export declare const E_UNMANAGED_DB_CONNECTION: new (args: [string], options?: ErrorOptions) => Exception;
5export declare const E_MISSING_MODEL_ATTRIBUTE: new (args: [string, string, string], options?: ErrorOptions) => Exception;
6export declare const E_INCOMPLETE_REPLICAS_CONFIG: new (args?: any, options?: ErrorOptions) => Exception;
7export declare const E_INVALID_REPLICAS_CONFIG: new (args?: any, options?: ErrorOptions) => Exception;
8export declare const E_MODEL_DELETED: new (args?: any, options?: ErrorOptions) => Exception;
9/**
10 * The "E_ROW_NOT_FOUND" exception is raised when
11 * no row is found in a database single query
12 *
13 * The "error.model" can be used to know the model which
14 * raised the error. This will only be present when using
15 * Lucid models not Database queries
16 */
17export declare const E_ROW_NOT_FOUND: {
18 new (model?: LucidModel): {
19 /**
20 * The model that raised the error.
21 */
22 model?: LucidModel;
23 name: string;
24 help?: string;
25 code?: string;
26 status: number;
27 toString(): string;
28 readonly [Symbol.toStringTag]: string;
29 message: string;
30 stack?: string;
31 cause?: unknown;
32 };
33 readonly status: number;
34 readonly code: string;
35 readonly message: string;
36 help?: string;
37 captureStackTrace(targetObject: object, constructorOpt?: Function): void;
38 prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
39 stackTraceLimit: number;
40};
41export declare const E_UNABLE_ACQUIRE_LOCK: new (args?: any, options?: ErrorOptions) => Exception;
42export declare const E_UNABLE_RELEASE_LOCK: new (args?: any, options?: ErrorOptions) => Exception;
43export declare const E_MISSING_SCHEMA_FILES: new (args?: any, options?: ErrorOptions) => Exception;
44export declare const E_UNDEFINED_RELATIONSHIP: new (args?: any, options?: ErrorOptions) => Exception;
45export declare const E_RUNTIME_EXCEPTION: new (args?: any, options?: ErrorOptions) => Exception;
46/**
47 * The client is not supported by Lucid
48 */
49export declare const E_UNSUPPORTED_CLIENT: new (args: [string], options?: ErrorOptions) => Exception;