@wearesage/schema
    Preparing search index...

    Interface IQueryBuilder<T>

    interface IQueryBuilder<T> {
        addAsyncCondition(condition: AsyncConditionFunction<T>): void;
        addCondition(condition: QueryCondition): void;
        and(property: keyof T): IQueryConditionBuilder<T>;
        andAsync(condition: AsyncConditionFunction<T>): IQueryBuilder<T>;
        count(): Promise<number>;
        describeProperty(property: keyof T): PropertyMetadata;
        describeRelationship(relationship: string): RelationshipMetadata;
        execute(): Promise<QueryResult<T>>;
        exists(): Promise<boolean>;
        first(): Promise<T>;
        getAsyncConditions(): AsyncConditionFunction<T>[];
        getAvailableOperators(): QueryOperator[];
        getAvailableProperties(): (keyof T)[];
        getAvailableRelationships(): string[];
        getConditions(): QueryCondition[];
        getIncludes(): QueryInclude[];
        getLimit(): number;
        getOffset(): number;
        getSorts(): QuerySort[];
        include(relationship: string): IQueryBuilder<T>;
        includeNested(
            relationship: string,
            nested: QueryInclude[],
        ): IQueryBuilder<T>;
        limit(count: number): IQueryBuilder<T>;
        not(property: keyof T): IQueryConditionBuilder<T>;
        offset(count: number): IQueryBuilder<T>;
        or(property: keyof T): IQueryConditionBuilder<T>;
        orAsync(condition: AsyncConditionFunction<T>): IQueryBuilder<T>;
        orderBy(property: keyof T, direction?: "desc" | "asc"): IQueryBuilder<T>;
        where(property: keyof T): IQueryConditionBuilder<T>;
        whereAsync(condition: AsyncConditionFunction<T>): IQueryBuilder<T>;
    }

    Type Parameters

    • T

    Implemented by

    Index

    Methods