1 |
|
2 | import { LucidRow, ModelObject, CherryPickFields, RelationshipsContract } from '@ioc:Adonis/Lucid/Orm';
|
3 | import { FileNode, QueryClientContract, TransactionClientContract } from '@ioc:Adonis/Lucid/Database';
|
4 |
|
5 |
|
6 |
|
7 | export declare function ensureRelation<T extends RelationshipsContract>(name: string, relation?: T): relation is T;
|
8 |
|
9 |
|
10 |
|
11 | export declare function ensureValue(collection: any, key: string, missingCallback: () => void): any;
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export declare function collectValues(payload: any[], key: string, missingCallback: () => void): any[];
|
17 |
|
18 |
|
19 |
|
20 | export declare function ensureRelationIsBooted(relation: RelationshipsContract): void;
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | export declare function getValue(model: LucidRow | ModelObject, key: string, relation: RelationshipsContract, action?: string): any;
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | export declare function isObject(value: any): boolean;
|
31 |
|
32 |
|
33 |
|
34 | export declare function unique(value: any[]): any[];
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | export declare function syncDiff(original: ModelObject, incoming: ModelObject): {
|
40 | added: ModelObject;
|
41 | updated: ModelObject;
|
42 | };
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | export declare function managedTransaction<T>(client: QueryClientContract | TransactionClientContract, callback: (trx: TransactionClientContract) => Promise<T>): Promise<T>;
|
48 |
|
49 |
|
50 |
|
51 | export declare function getDDLMethod(sql: string): "create" | "alter" | "drop" | "unknown";
|
52 |
|
53 |
|
54 |
|
55 |
|
56 | export declare function normalizeCherryPickObject(fields: CherryPickFields): {
|
57 | pick: string[] | undefined;
|
58 | omit: string[] | undefined;
|
59 | };
|
60 |
|
61 |
|
62 |
|
63 | export declare function sourceFiles(fromLocation: string, directory: string): Promise<{
|
64 | directory: string;
|
65 | files: FileNode<unknown>[];
|
66 | }>;
|