import { BrowseCommand } from '../commands/browse-command'; import { Entity } from '../entity'; import { FilterClause } from '../filter-clause'; import { IncludeClause, IncludeCollectionClause } from '../include-clause'; import { KeyValue } from '../key-value'; import { Nullable } from '../nullable'; import { PaginateClause } from '../paginate-clause'; import { PaginatedEntityCollection } from '../paginated-entity-collection'; import { SortClause } from '../sort-clause'; import { IncludeBrowseCommandBuilder } from './include-browse-command-builder'; import { SortBrowseCommandBuilder } from './sort-browse-command-builder'; /** * Root browse command builder. This interface is used for browsing collections * starting from entity root. * * @type {RootBrowseCommandBuilder} */ export interface RootBrowseCommandBuilder { /** * Builds a command. * * @returns {BrowseCommand} Browse command. */ build(): BrowseCommand; /** * 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; /** * 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; /** * Includes entity for eager loading. * * @param {IncludeClause} includeClause Include clause. * * @returns {IncludeBrowseCommandBuilder} Include browse command builder. */ include(includeClause: IncludeClause): IncludeBrowseCommandBuilder; /** * Includes entity collection for eager loading. * * @param {IncludeCollectionClause} includeCollectionClause Include collection clause. * * @returns {IncludeBrowseCommandBuilder} Include browse command builder. */ includeCollection(includeCollectionClause: IncludeCollectionClause): 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>} Paginated 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=root-browse-command-builder.d.ts.map