IQueryRepository
Defined in: packages/core/application/ports/query-repository.port.ts:24
Application-facing read repository contract.
Query handlers depend on this interface rather than ORM/query-builder
implementations. Repository adapters may use FromCache internally,
but callers receive only the declared TResult.
Example
Section titled “Example”constructor( private readonly users: IQueryRepository<GetUserQuery, User | null>,) {}
const user = await this.users.find(query);Type Parameters
Section titled “Type Parameters”TQuery
Section titled “TQuery”TQuery = IQueryOptions
Query object accepted by find.
TResult
Section titled “TResult”TResult = unknown
Domain/read result returned to the application layer.
Methods
Section titled “Methods”find()
Section titled “find()”find(
query):Promise<TResult>
Defined in: packages/core/application/ports/query-repository.port.ts:26
Resolves one application query.
Parameters
Section titled “Parameters”TQuery
Returns
Section titled “Returns”Promise<TResult>