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
T
objectRequiredMethods
create
create(data
, context?
): Promise
<T
>
Parameters
data
unknownRequiredcontext
ContextReturns
Promise
<T
>
Promise
Promise<T>Requireddelete
delete(id
, context?
): Promise
<void
>
Parameters
id
stringRequiredcontext
ContextReturns
Promise
<void
>
Promise
Promise<void>Requiredfind
find(options?
, transformOptions?
, context?
): Promise
<T
[]>
Parameters
Returns
Promise
<T
[]>
Promise
Promise<T[]>Required
Promise
Promise<T[]>RequiredfindAndCount
findAndCount(options?
, transformOptions?
, context?
): Promise
<[T
[], number
]>
Parameters
Returns
Promise
<[T
[], number
]>
Promise
Promise<[T[], number]>Required
Promise
Promise<[T[], number]>RequiredgetActiveManager
getActiveManager<TManager
>(): TManager
TManager
objectRequiredReturns
TManager
Inherited from
BaseRepositoryService.getActiveManager
getFreshManager
getFreshManager<TManager
>(): TManager
TManager
objectRequiredReturns
TManager
Inherited from
BaseRepositoryService.getFreshManager
serialize
serialize<TOutput
>(data
, options?
): Promise
<TOutput
>
TOutput
object | object[]RequiredParameters
data
anyRequiredoptions
anyReturns
Promise
<TOutput
>
Promise
Promise<TOutput>RequiredInherited from
BaseRepositoryService.serialize
transaction
transaction<TManager
>(task
, context?
): Promise
<any
>
TManager
objectRequiredParameters
task
(transactionManager: TManager) => Promise<any>Requiredcontext
objectcontext.enableNestedTransactions
booleancontext.isolationLevel
stringcontext.transaction
TManagerReturns
Promise
<any
>
Promise
Promise<any>Required
Promise
Promise<any>Required