Class: abstract
LookupService<Entity>
Abstract lookup service
Extends
BaseService
<Entity
>
Extended by
Type Parameters
Type Parameter |
---|
Entity extends ReferenceIdInterface |
Implements
Constructors
new LookupService()
new LookupService<
Entity
>(repo
):LookupService
<Entity
>
Constructor
Parameters
Parameter | Type | Description |
---|---|---|
repo | Repository <Entity > | instance of the repo |
Returns
LookupService
<Entity
>
Overrides
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
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
Parameter | Type | Description |
---|---|---|
id | string | the id |
queryOptions ? | QueryOptionsInterface | query 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
Parameter | Type | Description |
---|---|---|
options | FindManyOptions <Entity > | Find many options |
queryOptions ? | QueryOptionsInterface | Query options |
Returns
Promise
<Promise
<Entity
[]>>
Inherited from
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
Parameter | Type | Description |
---|---|---|
options | FindOneOptions <Entity > | Find one options |
queryOptions ? | QueryOptionsInterface | Query options |
Returns
Promise
<null
| Entity
>
Inherited from
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
Parameter | Type | Description |
---|---|---|
queryOptions ? | QueryOptionsInterface | Options |
Returns
Repository
<Entity
>
Inherited from
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
Parameter | Type | Description |
---|---|---|
options ? | SafeTransactionOptionsInterface | Options |
Returns
Inherited from
Defined in
.tmp/repos/rockets/packages/typeorm-common/src/services/base.service.ts:78 (opens in a new tab)