import { CommandBuilder } from '../command-builder'; import { BrowseCommand } from '../commands/browse-command'; import { BulkQueryCommand } from '../commands/bulk-query-command'; import { Entity } from '../entity'; import { EntityInfoProxyRoot } from '../entity-info-proxy'; import { EntitySet } from '../entity-set'; import { FilterClause } from '../filter-clause'; import { FilterExpression } from '../filter-expression'; import { FilterExpressionBuilder } from '../filter-expression-builder'; import { IncludeClause, IncludeCollectionClause } from '../include-clause'; import { ThenIncludeClause, ThenIncludeCollectionClause } from '../include-clause'; import { IncludeExpression } from '../include-expression'; import { KeyValue } from '../key-value'; import { Nullable } from '../nullable'; import { PaginateClause } from '../paginate-clause'; import { PaginateExpression } from '../paginate-expression'; import { PaginateExpressionBuilder } from '../paginate-expression-builder'; import { PaginatedEntityCollection } from '../paginated-entity-collection'; import { PropertyInfoProxyRoot } from '../property-info-proxy'; import { SortClause } from '../sort-clause'; import { SortExpression } from '../sort-expression'; import { IncludeBrowseCommandBuilder } from './include-browse-command-builder'; import { RootBrowseCommandBuilder } from './root-browse-command-builder'; import { SortBrowseCommandBuilder } from './sort-browse-command-builder'; /** * Browse command builder. * * @type {BrowseCommandBuilder} */ export declare class BrowseCommandBuilder extends CommandBuilder, TEntity, unknown> implements RootBrowseCommandBuilder, SortBrowseCommandBuilder, IncludeBrowseCommandBuilder { /** * Proxy root for attached entity info. * * @type {EntityInfoProxyRoot} */ protected entityInfoProxyRoot: EntityInfoProxyRoot; /** * Proxy root for attached property info. * * @type {PropertyInfoProxyRoot} */ protected propertyInfoProxyRoot: PropertyInfoProxyRoot; /** * Expression builder to build filter expressions. * * @type {FilterExpressionBuilder} */ protected filterExpressionBuilder: FilterExpressionBuilder; /** * Expression builder to build paginate expressions. * * @type {PaginateExpressionBuilder} */ protected paginateExpressionBuilder: PaginateExpressionBuilder; /** * Current filter expression. * * @type {FilterExpression} */ protected filterExpression?: FilterExpression; /** * Current sort expression. * * @type {SortExpression} */ protected sortExpression?: SortExpression; /** * Current include expression. * * @type {IncludeExpression} */ protected includeExpression?: IncludeExpression; /** * Current paginate expression. * * @type {PaginateExpression} */ protected paginateExpression?: PaginateExpression; /** * Constructor. * * @param {EntitySet} entitySet Entity set. */ constructor(entitySet: EntitySet); /** * Builds a command. * * @returns {BulkQueryCommand} Bulk query command. */ build(): BulkQueryCommand; /** * Filters browsed entity collection. * * @param {FilterClause} filterClause Filter clause. * * @returns {RootBrowseCommandBuilder} Root browse command builder. */ filter(filterClause: FilterClause): RootBrowseCommandBuilder; /** * Sorts entity collection returned by the query in ascending order. * * @param {SortClause} sortClause Sort clause. * * @returns {SortBrowseCommandBuilder} Sort browse command builder. */ sortByAsc(sortClause: SortClause): SortBrowseCommandBuilder; /** * Applies ascending child sort for an entity collection. * * @param {SortClause} sortClause Sort clause. * * @returns {SortBrowseCommandBuilder} Sort browse command builder. */ thenSortByAsc(sortClause: SortClause): SortBrowseCommandBuilder; /** * Sorts entity collection returned by the query in descending order. * * @param {SortClause} sortClause Sort clause. * * @returns {SortBrowseCommandBuilder} Sort browse command builder. */ sortByDesc(sortClause: SortClause): SortBrowseCommandBuilder; /** * Applies descending child sort for an entity collection. * * @param {SortClause} sortClause Sort clause. * * @returns {SortBrowseCommandBuilder} Sort browse command builder. */ thenSortByDesc(sortClause: SortClause): SortBrowseCommandBuilder; /** * Includes entity for eager loading. * * @param {IncludeClause} includeClause Include clause. * * @returns {IncludeBrowseCommandBuilder} Include browse command builder. */ include(includeClause: IncludeClause): IncludeBrowseCommandBuilder; /** * Includes child entity for eager browsing. * * @param {ThenIncludeClause} thenIncludeClause Then include clause. * * @returns {IncludeBrowseCommandBuilder} Include browse command builder. */ thenInclude(thenIncludeClause: ThenIncludeClause): IncludeBrowseCommandBuilder; /** * Includes entity collection for eager loading. * * @param {IncludeCollectionClause} includeCollectionClause Include collection clause. * * @returns {IncludeBrowseCommandBuilder} Include browse command builder. */ includeCollection(includeCollectionClause: IncludeCollectionClause): IncludeBrowseCommandBuilder; /** * Includes child entity collection for eager browsing. * * @param {ThenIncludeCollectionClause} thenIncludeCollectionClause Then include collection clause. * * @returns {IncludeBrowseCommandBuilder} Include browse command builder. */ thenIncludeCollection(thenIncludeCollectionClause: ThenIncludeCollectionClause): IncludeBrowseCommandBuilder; /** * Paginates browsed entity collection. * * @param {PaginateClause} paginateClause Paginate clause. * * @returns {RootBrowseCommandBuilder} Root browse command builder. */ paginate(paginateClause: PaginateClause): RootBrowseCommandBuilder; /** * Finds entity by key values. * * @param {ReadonlyArray} keyValues Readonly array of key values. * * @returns {Promise>} Entity or null when entity not found. */ find(...keyValues: ReadonlyArray): Promise>; /** * Finds entity by key values or throws an error. * * @param {ReadonlyArray} keyValues Readonly array of key values. * * @returns {Promise} Entity or error. */ findOrFail(...keyValues: ReadonlyArray): Promise; /** * Finds all entities which match command expressions. * * @returns {Promise>} Entity collection. */ findAll(): Promise>; /** * Finds one entity which matches command expressions. * * @returns {Promise>} Entity or null when nothing matches. */ findOne(): Promise>; /** * Finds one entity which matches command expressions or throws an error. * * @returns {Promise} Entity or error. */ findOneOrFail(): Promise; /** * Updates entities which matches command expressions. * * @param {Partial} entityPartial Entity partial. * * @returns {Promise} */ update(entityPartial: Partial): Promise; /** * Removes entities which matches command expressions. * * @returns {Promise} */ remove(): Promise; } //# sourceMappingURL=browse-command-builder.d.ts.map