API Reference
Rockets Core API
typeorm-common
classes
LookupService

Class: abstract LookupService<Entity>

Abstract lookup service

Extends

Extended by

Type Parameters

Type Parameter
Entity extends ReferenceIdInterface

Implements

Constructors

new LookupService()

new LookupService<Entity>(repo): LookupService<Entity>

Constructor

Parameters

ParameterTypeDescription
repoRepository<Entity>instance of the repo

Returns

LookupService<Entity>

Overrides

BaseService.constructor

Defined in

.tmp/repos/rockets/packages/typeorm-common/src/services/lookup.service.ts:22 (opens in a new tab)

Accessors

metadata

get protected metadata(): EntityMetadata

Internal

Returns

EntityMetadata

Inherited from

BaseService.metadata

Defined in

.tmp/repos/rockets/packages/typeorm-common/src/services/base.service.ts:87 (opens in a new tab)

Methods

byId()

byId(id, queryOptions?): Promise<null | Entity>

Get entity for the given id.

Parameters

ParameterTypeDescription
idstringthe id
queryOptions?QueryOptionsInterfacequery options

Returns

Promise<null | Entity>

Implementation of

LookupIdInterface.byId

Defined in

.tmp/repos/rockets/packages/typeorm-common/src/services/lookup.service.ts:32 (opens in a new tab)


find()

find(options, queryOptions?): Promise<Promise<Entity[]>>

Find wrapper.

Parameters

ParameterTypeDescription
optionsFindManyOptions<Entity>Find many options
queryOptions?QueryOptionsInterfaceQuery options

Returns

Promise<Promise<Entity[]>>

Inherited from

BaseService.find

Defined in

.tmp/repos/rockets/packages/typeorm-common/src/services/base.service.ts:32 (opens in a new tab)


findOne()

findOne(options, queryOptions?): Promise<null | Entity>

Find One wrapper.

Parameters

ParameterTypeDescription
optionsFindOneOptions<Entity>Find one options
queryOptions?QueryOptionsInterfaceQuery options

Returns

Promise<null | Entity>

Inherited from

BaseService.findOne

Defined in

.tmp/repos/rockets/packages/typeorm-common/src/services/base.service.ts:51 (opens in a new tab)


repository()

repository(queryOptions?): Repository<Entity>

Return the correct repository instance.

Parameters

ParameterTypeDescription
queryOptions?QueryOptionsInterfaceOptions

Returns

Repository<Entity>

Inherited from

BaseService.repository

Defined in

.tmp/repos/rockets/packages/typeorm-common/src/services/base.service.ts:69 (opens in a new tab)


transaction()

transaction(options?): TransactionProxy

Return a transaction instance.

Parameters

ParameterTypeDescription
options?SafeTransactionOptionsInterfaceOptions

Returns

TransactionProxy

Inherited from

BaseService.transaction

Defined in

.tmp/repos/rockets/packages/typeorm-common/src/services/base.service.ts:78 (opens in a new tab)