Skip to main content
Skip to main content

TreeRepositoryService

internal.DAL.TreeRepositoryService

Data access layer (DAL) interface to implements for any repository service. This layer helps to separate the business logic (service layer) from accessing the ORM directly and allows to switch to another ORM without changing the business logic.

Type parameters

TobjectRequired

Methods

create

create(data, context?): Promise<T>

Parameters

dataunknownRequired
contextContext

Returns

Promise<T>

PromisePromise<T>Required

delete

delete(id, context?): Promise<void>

Parameters

idstringRequired
contextContext

Returns

Promise<void>

PromisePromise<void>Required

find

find(options?, transformOptions?, context?): Promise<T[]>

Parameters

optionsFindOptions<T>
contextContext

Returns

Promise<T[]>

PromisePromise<T[]>Required

findAndCount

findAndCount(options?, transformOptions?, context?): Promise<[T[], number]>

Parameters

optionsFindOptions<T>
contextContext

Returns

Promise<[T[], number]>

PromisePromise<[T[], number]>Required

getActiveManager

getActiveManager<TManager>(): TManager

TManagerobjectRequired

Returns

TManager

Inherited from

BaseRepositoryService.getActiveManager


getFreshManager

getFreshManager<TManager>(): TManager

TManagerobjectRequired

Returns

TManager

Inherited from

BaseRepositoryService.getFreshManager


serialize

serialize<TOutput>(data, options?): Promise<TOutput>

TOutputobject | object[]Required

Parameters

dataanyRequired
optionsany

Returns

Promise<TOutput>

PromisePromise<TOutput>Required

Inherited from

BaseRepositoryService.serialize


transaction

transaction<TManager>(task, context?): Promise<any>

TManagerobjectRequired

Parameters

task(transactionManager: TManager) => Promise<any>Required
contextobject
context.enableNestedTransactionsboolean
context.isolationLevelstring
context.transactionTManager

Returns

Promise<any>

PromisePromise<any>Required

Inherited from

BaseRepositoryService.transaction

Was this section helpful?