UNPKG

635 BTypeScriptView Raw
1import { ModelKeysContract, ModelObject } from '@ioc:Adonis/Lucid/Orm';
2/**
3 * Exposes the API to collect, get and resolve model keys
4 */
5export declare class ModelKeys implements ModelKeysContract {
6 private keys;
7 constructor(keys?: ModelObject);
8 /**
9 * Add a new key
10 */
11 add(key: string, value: string): void;
12 /**
13 * Get value for a given key
14 */
15 get(key: string, defaultValue: string): string;
16 /**
17 * Resolve key, if unable to resolve, the key will be
18 * returned as it is.
19 */
20 resolve(key: string): string;
21 /**
22 * Return all keys
23 */
24 all(): ModelObject;
25}