@adonisjs/lucid
Version:
SQL ORM built on top of Active Record pattern
25 lines (24 loc) • 973 B
TypeScript
import { type Knex } from 'knex';
import { type LucidModel } from '../../../types/model.js';
import { type QueryClientContract } from '../../../types/database.js';
import { type RelationSubQueryBuilderContract } from '../../../types/relations.js';
import { type HasOne } from './index.js';
import { BaseSubQueryBuilder } from '../base/sub_query_builder.js';
export declare class HasOneSubQueryBuilder extends BaseSubQueryBuilder implements RelationSubQueryBuilderContract<LucidModel> {
private relation;
protected appliedConstraints: boolean;
constructor(builder: Knex.QueryBuilder, client: QueryClientContract, relation: HasOne);
/**
* The keys for constructing the join query
*/
protected getRelationKeys(): string[];
/**
* Clones the current query
*/
clone(): HasOneSubQueryBuilder;
/**
* Applies constraint to limit rows to the current relationship
* only.
*/
protected applyConstraints(): void;
}