UNPKG

@athenna/database

Version:

The Athenna database handler for SQL/NoSQL.

27 lines (26 loc) 931 B
/** * @athenna/database * * (c) João Lenon <lenon@athenna.io> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ import type { BaseModel } from '#src/models/BaseModel'; import type { HasOneThroughOptions } from '#src/types'; import type { Driver } from '#src/database/drivers/Driver'; export declare class HasOneThroughRelation { /** * Load a has one through relation. */ static load(model: BaseModel, relation: HasOneThroughOptions): Promise<any>; /** * Load all models that has one through relation. */ static loadAll(models: BaseModel[], relation: HasOneThroughOptions): Promise<any[]>; /** * Apply a where has relation to the query when the given model * has one through relation. */ static whereHas(Model: typeof BaseModel, query: Driver, relation: HasOneThroughOptions): void; }