@sourceloop/core / Exports / DefaultUserModifyCrudRepository
Class: DefaultUserModifyCrudRepository<T, ID, Relations>¶
Type parameters¶
Name | Type |
---|---|
T |
extends UserModifiableEntity |
ID |
ID |
Relations |
extends object = {} |
Hierarchy¶
-
SoftCrudRepository
<T
,ID
,Relations
>↳
DefaultUserModifyCrudRepository
Table of contents¶
Constructors¶
Properties¶
Methods¶
Constructors¶
constructor¶
• new DefaultUserModifyCrudRepository<T
, ID
, Relations
>(entityClass
, dataSource
, getCurrentUser
)
Type parameters¶
Name | Type |
---|---|
T |
extends UserModifiableEntity <DataObject <Model >, T > |
ID |
ID |
Relations |
extends object = {} |
Parameters¶
Name | Type |
---|---|
entityClass |
typeof Entity & { prototype : T } |
dataSource |
DataSource |
getCurrentUser |
Getter <undefined | IAuthUserWithPermissions <string , string , string >> |
Overrides¶
SoftCrudRepository<T, ID, Relations\>.constructor
Defined in¶
packages/core/src/repositories/default-user-modify-crud.repository.base.ts:26
Properties¶
getCurrentUser¶
• Protected
Readonly
getCurrentUser: Getter
<undefined
| IAuthUserWithPermissions
<string
, string
, string
>>
Inherited from¶
SoftCrudRepository.getCurrentUser
Defined in¶
packages/core/src/repositories/default-user-modify-crud.repository.base.ts:31
Methods¶
create¶
▸ create(entity
, options?
): Promise
<T
>
Parameters¶
Name | Type |
---|---|
entity |
DataObject <T > |
options? |
Options |
Returns¶
Promise
<T
>
Overrides¶
SoftCrudRepository.create
Defined in¶
packages/core/src/repositories/default-user-modify-crud.repository.base.ts:38
createAll¶
▸ createAll(entities
, options?
): Promise
<T
[]>
Parameters¶
Name | Type |
---|---|
entities |
DataObject <T >[] |
options? |
Options |
Returns¶
Promise
<T
[]>
Overrides¶
SoftCrudRepository.createAll
Defined in¶
packages/core/src/repositories/default-user-modify-crud.repository.base.ts:50
replaceById¶
▸ replaceById(id
, data
, options?
): Promise
<void
>
Parameters¶
Name | Type |
---|---|
id |
ID |
data |
DataObject <T > |
options? |
Options |
Returns¶
Promise
<void
>
Overrides¶
SoftCrudRepository.replaceById
Defined in¶
packages/core/src/repositories/default-user-modify-crud.repository.base.ts:113
save¶
▸ save(entity
, options?
): Promise
<T
>
Parameters¶
Name | Type |
---|---|
entity |
T |
options? |
Options |
Returns¶
Promise
<T
>
Overrides¶
SoftCrudRepository.save
Defined in¶
packages/core/src/repositories/default-user-modify-crud.repository.base.ts:64
update¶
▸ update(entity
, options?
): Promise
<void
>
Parameters¶
Name | Type |
---|---|
entity |
T |
options? |
Options |
Returns¶
Promise
<void
>
Overrides¶
SoftCrudRepository.update
Defined in¶
packages/core/src/repositories/default-user-modify-crud.repository.base.ts:74
updateAll¶
▸ updateAll(data
, where?
, options?
): Promise
<Count
>
Parameters¶
Name | Type |
---|---|
data |
DataObject <T > |
where? |
Where <T > |
options? |
Options |
Returns¶
Promise
<Count
>
Overrides¶
SoftCrudRepository.updateAll
Defined in¶
packages/core/src/repositories/default-user-modify-crud.repository.base.ts:84
updateById¶
▸ updateById(id
, data
, options?
): Promise
<void
>
Parameters¶
Name | Type |
---|---|
id |
ID |
data |
DataObject <T > |
options? |
Options |
Returns¶
Promise
<void
>
Overrides¶
SoftCrudRepository.updateById
Defined in¶
packages/core/src/repositories/default-user-modify-crud.repository.base.ts:99