Class: OrgMutateService
Org mutate service
Extends
Implements
Constructors
new OrgMutateService()
new OrgMutateService(
repo
):OrgMutateService
Constructor
Parameters
Parameter | Type | Description |
---|---|---|
repo | Repository <OrgEntityInterface > | instance of the org repo |
Returns
Overrides
Defined in
.tmp/repos/rockets/packages/nestjs-org/src/services/org-mutate.service.ts:35 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Overrides |
---|---|---|---|---|
createDto | protected | typeof OrgCreateDto | OrgCreateDto | MutateService .createDto |
updateDto | protected | typeof OrgUpdateDto | OrgUpdateDto | MutateService .updateDto |
Accessors
metadata
get
protected
metadata():EntityMetadata
Internal
Returns
EntityMetadata
Inherited from
Defined in
.tmp/repos/rockets/packages/typeorm-common/dist/services/base.service.d.ts:14
Methods
create()
create(
data
,queryOptions
?):Promise
<OrgEntityInterface
>
Create one
Parameters
Parameter | Type | Description |
---|---|---|
data | OrgCreatableInterface | the reference to create |
queryOptions ? | QueryOptionsInterface | - |
Returns
Promise
<OrgEntityInterface
>
the created reference
Implementation of
OrgMutateServiceInterface
.create
Inherited from
Defined in
.tmp/repos/rockets/packages/typeorm-common/dist/services/mutate.service.d.ts:9
find()
find(
options
,queryOptions
?):Promise
<Promise
<OrgEntityInterface
[]>>
Find wrapper.
Parameters
Parameter | Type | Description |
---|---|---|
options | FindManyOptions <OrgEntityInterface > | Find many options |
queryOptions ? | QueryOptionsInterface | Query options |
Returns
Promise
<Promise
<OrgEntityInterface
[]>>
Inherited from
Defined in
.tmp/repos/rockets/packages/typeorm-common/dist/services/base.service.d.ts:10
findById()
protected
findById(id
,queryOptions
?):Promise
<OrgEntityInterface
>
Internal
Parameters
Parameter | Type |
---|---|
id | string |
queryOptions ? | QueryOptionsInterface |
Returns
Promise
<OrgEntityInterface
>
Inherited from
Defined in
.tmp/repos/rockets/packages/typeorm-common/dist/services/mutate.service.d.ts:17
findOne()
findOne(
options
,queryOptions
?):Promise
<null
|OrgEntityInterface
>
Find One wrapper.
Parameters
Parameter | Type | Description |
---|---|---|
options | FindOneOptions <OrgEntityInterface > | Find one options |
queryOptions ? | QueryOptionsInterface | Query options |
Returns
Promise
<null
| OrgEntityInterface
>
Inherited from
Defined in
.tmp/repos/rockets/packages/typeorm-common/dist/services/base.service.d.ts:11
remove()
remove(
data
,queryOptions
?):Promise
<OrgEntityInterface
>
Remove one
Parameters
Parameter | Type | Description |
---|---|---|
data | DeepPartial <OrgEntityInterface > & ReferenceIdInterface <string > | the reference data to remove |
queryOptions ? | QueryOptionsInterface | query options |
Returns
Promise
<OrgEntityInterface
>
the removed reference
Implementation of
OrgMutateServiceInterface
.remove
Inherited from
Defined in
.tmp/repos/rockets/packages/typeorm-common/dist/services/mutate.service.d.ts:12
replace()
replace(
data
,queryOptions
?):Promise
<OrgEntityInterface
>
Replace one
Parameters
Parameter | Type | Description |
---|---|---|
data | OrgCreatableInterface & ReferenceIdInterface <string > | the reference data to replace |
queryOptions ? | QueryOptionsInterface | - |
Returns
Promise
<OrgEntityInterface
>
the replaced reference
Implementation of
OrgMutateServiceInterface
.replace
Inherited from
Defined in
.tmp/repos/rockets/packages/typeorm-common/dist/services/mutate.service.d.ts:11
repository()
repository(
queryOptions
?):Repository
<OrgEntityInterface
>
Return the correct repository instance.
Parameters
Parameter | Type | Description |
---|---|---|
queryOptions ? | QueryOptionsInterface | Options |
Returns
Repository
<OrgEntityInterface
>
Inherited from
Defined in
.tmp/repos/rockets/packages/typeorm-common/dist/services/base.service.d.ts:12
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/dist/services/base.service.d.ts:13
transform()
protected
transform(data
,_queryOptions
?):Promise
<DeepPartial
<OrgEntityInterface
>>
Internal
Parameters
Parameter | Type |
---|---|
data | DeepPartial <OrgEntityInterface > |
_queryOptions ? | QueryOptionsInterface |
Returns
Promise
<DeepPartial
<OrgEntityInterface
>>
Inherited from
Defined in
.tmp/repos/rockets/packages/typeorm-common/dist/services/mutate.service.d.ts:16
update()
update(
data
,queryOptions
?):Promise
<OrgEntityInterface
>
Update one
Parameters
Parameter | Type | Description |
---|---|---|
data | OrgUpdatableInterface & ReferenceIdInterface <string > | the reference data to update |
queryOptions ? | QueryOptionsInterface | - |
Returns
Promise
<OrgEntityInterface
>
the updated reference
Implementation of
OrgMutateServiceInterface
.update
Inherited from
Defined in
.tmp/repos/rockets/packages/typeorm-common/dist/services/mutate.service.d.ts:10
validate()
protected
validate<T
>(type
,data
):Promise
<T
>
Internal
Type Parameters
Type Parameter |
---|
T extends DeepPartial <OrgEntityInterface > |
Parameters
Parameter | Type |
---|---|
type | Type <T > |
data | T |
Returns
Promise
<T
>
Inherited from
Defined in
.tmp/repos/rockets/packages/typeorm-common/dist/services/mutate.service.d.ts:15