Class: OrgCrudService
Org CRUD service
Extends
Constructors
new OrgCrudService()
new OrgCrudService(
orgRepo):OrgCrudService
Constructor
Parameters
| Parameter | Type | Description | 
|---|---|---|
| orgRepo | Repository<OrgEntityInterface> | instance of the org repository. | 
Returns
Overrides
TypeOrmCrudService.constructor
Defined in
.tmp/repos/rockets/packages/nestjs-org/src/services/org-crud.service.ts:18 (opens in a new tab)
Properties
| Property | Modifier | Type | Inherited from | 
|---|---|---|---|
| alias | readonly | string | TypeOrmCrudService.alias | 
| count | readonly | ( options?:FindManyOptions<OrgEntityInterface>) =>Promise<number> | TypeOrmCrudService.count | 
| crudQueryHelper | readonly | CrudQueryHelper | TypeOrmCrudService.crudQueryHelper | 
| dbName | protected | "mysql"|"mariadb"|"postgres"|"cockroachdb"|"sqlite"|"mssql"|"sap"|"oracle"|"cordova"|"nativescript"|"react-native"|"sqljs"|"mongodb"|"aurora-mysql"|"aurora-postgres"|"expo"|"better-sqlite3"|"capacitor"|"spanner" | TypeOrmCrudService.dbName | 
| entityColumns | protected | string[] | TypeOrmCrudService.entityColumns | 
| entityColumnsHash | protected | ObjectLiteral | TypeOrmCrudService.entityColumnsHash | 
| entityHasDeleteColumn | protected | boolean | TypeOrmCrudService.entityHasDeleteColumn | 
| entityPrimaryColumns | protected | string[] | TypeOrmCrudService.entityPrimaryColumns | 
| entityRelationsHash | protected | Map<string,IAllowedRelation> | TypeOrmCrudService.entityRelationsHash | 
| entityType | readonly | ClassType<OrgEntityInterface> | TypeOrmCrudService.entityType | 
| find | readonly | ( options?:FindManyOptions<OrgEntityInterface>) =>Promise<OrgEntityInterface[]> | TypeOrmCrudService.find | 
| findOne | readonly | ( options:FindOneOptions<OrgEntityInterface>) =>Promise<null|OrgEntityInterface> | TypeOrmCrudService.findOne | 
| repo | protected | Repository<OrgEntityInterface> | TypeOrmCrudService.repo | 
| sqlInjectionRegEx | protected | RegExp[] | TypeOrmCrudService.sqlInjectionRegEx | 
Methods
builderAddBrackets()
protectedbuilderAddBrackets(builder,condition,brackets):void
Parameters
| Parameter | Type | 
|---|---|
| builder | SelectQueryBuilder<OrgEntityInterface> | 
| condition | SConditionKey | 
| brackets | Brackets | 
Returns
void
Inherited from
TypeOrmCrudService.builderAddBrackets
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:53
builderSetWhere()
protectedbuilderSetWhere(builder,condition,field,value,operator?):void
Parameters
| Parameter | Type | 
|---|---|
| builder | SelectQueryBuilder<OrgEntityInterface> | 
| condition | SConditionKey | 
| field | string | 
| value | any | 
| operator? | ComparisonOperator | 
Returns
void
Inherited from
TypeOrmCrudService.builderSetWhere
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:54
createBuilder()
createBuilder(
parsed,options,many?,withDeleted?):Promise<SelectQueryBuilder<OrgEntityInterface>>
Parameters
| Parameter | Type | 
|---|---|
| parsed | ParsedRequestParams | 
| options | CrudRequestOptions | 
| many? | boolean | 
| withDeleted? | boolean | 
Returns
Promise<SelectQueryBuilder<OrgEntityInterface>>
Inherited from
TypeOrmCrudService.createBuilder
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:38
createMany()
createMany(
req,dto,queryOptions?):Promise<OrgEntityInterface[]>
Parameters
| Parameter | Type | 
|---|---|
| req | CrudRequest | 
| dto | CreateManyDto<DeepPartial<OrgEntityInterface>> | 
| queryOptions? | CrudQueryOptionsInterface | 
Returns
Promise<OrgEntityInterface[]>
Inherited from
Defined in
.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:15
createOne()
createOne(
req,dto,queryOptions?):Promise<OrgEntityInterface>
Parameters
| Parameter | Type | 
|---|---|
| req | CrudRequest | 
| dto | DeepPartial<OrgEntityInterface> | 
| queryOptions? | CrudQueryOptionsInterface | 
Returns
Promise<OrgEntityInterface>
Inherited from
Defined in
.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:16
createPageInfo()
createPageInfo(
data,total,limit,offset):GetManyDefaultResponse<OrgEntityInterface>
Parameters
| Parameter | Type | 
|---|---|
| data | OrgEntityInterface[] | 
| total | number | 
| limit | number | 
| offset | number | 
Returns
GetManyDefaultResponse<OrgEntityInterface>
Inherited from
TypeOrmCrudService.createPageInfo
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud/lib/services/crud-service.abstract.d.ts:15
decidePagination()
decidePagination(
parsed,options):boolean
Parameters
| Parameter | Type | 
|---|---|
| parsed | ParsedRequestParams | 
| options | CrudRequestOptions | 
Returns
boolean
Inherited from
TypeOrmCrudService.decidePagination
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud/lib/services/crud-service.abstract.d.ts:16
deleteOne()
deleteOne(
req,queryOptions?):Promise<void|OrgEntityInterface>
Parameters
| Parameter | Type | 
|---|---|
| req | CrudRequest | 
| queryOptions? | CrudQueryOptionsInterface | 
Returns
Promise<void | OrgEntityInterface>
Inherited from
Defined in
.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:19
doGetMany()
protecteddoGetMany(builder,query,options):Promise<OrgEntityInterface[] |GetManyDefaultResponse<OrgEntityInterface>>
Parameters
| Parameter | Type | 
|---|---|
| builder | SelectQueryBuilder<OrgEntityInterface> | 
| query | ParsedRequestParams | 
| options | CrudRequestOptions | 
Returns
Promise<OrgEntityInterface[] | GetManyDefaultResponse<OrgEntityInterface>>
Inherited from
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:39
getAllowedColumns()
protectedgetAllowedColumns(columns,options):string[]
Parameters
| Parameter | Type | 
|---|---|
| columns | string[] | 
| options | QueryOptions | 
Returns
string[]
Inherited from
TypeOrmCrudService.getAllowedColumns
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:43
getEntityColumns()
protectedgetEntityColumns(entityMetadata):object
Parameters
| Parameter | Type | 
|---|---|
| entityMetadata | EntityMetadata | 
Returns
object
| Name | Type | 
|---|---|
| columns | string[] | 
| primaryColumns | string[] | 
Inherited from
TypeOrmCrudService.getEntityColumns
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:44
getFieldWithAlias()
protectedgetFieldWithAlias(field,sort?):string
Parameters
| Parameter | Type | 
|---|---|
| field | string | 
| sort? | boolean | 
Returns
string
Inherited from
TypeOrmCrudService.getFieldWithAlias
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:58
getMany()
getMany(
req,queryOptions?):Promise<OrgEntityInterface[] |CrudResultPaginatedInterface<OrgEntityInterface>>
Parameters
| Parameter | Type | 
|---|---|
| req | CrudRequest | 
| queryOptions? | CrudQueryOptionsInterface | 
Returns
Promise<OrgEntityInterface[] | CrudResultPaginatedInterface<OrgEntityInterface>>
Inherited from
Defined in
.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:13
getOne()
getOne(
req,queryOptions?):Promise<OrgEntityInterface>
Parameters
| Parameter | Type | 
|---|---|
| req | CrudRequest | 
| queryOptions? | CrudQueryOptionsInterface | 
Returns
Promise<OrgEntityInterface>
Inherited from
Defined in
.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:14
getOneOrFail()
protectedgetOneOrFail(req,shallow?,withDeleted?):Promise<OrgEntityInterface>
Parameters
| Parameter | Type | 
|---|---|
| req | CrudRequest | 
| shallow? | boolean | 
| withDeleted? | boolean | 
Returns
Promise<OrgEntityInterface>
Inherited from
TypeOrmCrudService.getOneOrFail
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:41
getParamFilters()
getParamFilters(
parsed):ObjectLiteral
Parameters
| Parameter | Type | 
|---|---|
| parsed | ParsedRequestParams | 
Returns
ObjectLiteral
Inherited from
TypeOrmCrudService.getParamFilters
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:37
getPrimaryParams()
getPrimaryParams(
options):string[]
Parameters
| Parameter | Type | 
|---|---|
| options | CrudRequestOptions | 
Returns
string[]
Inherited from
TypeOrmCrudService.getPrimaryParams
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud/lib/services/crud-service.abstract.d.ts:19
getRelationMetadata()
protectedgetRelationMetadata(field,options):IAllowedRelation
Parameters
| Parameter | Type | 
|---|---|
| field | string | 
| options | JoinOption | 
Returns
IAllowedRelation
Inherited from
TypeOrmCrudService.getRelationMetadata
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:48
getSelect()
protectedgetSelect(query,options):string[]
Parameters
| Parameter | Type | 
|---|---|
| query | ParsedRequestParams | 
| options | QueryOptions | 
Returns
string[]
Inherited from
Defined in
.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:23
getSkip()
getSkip(
query,take):null|number
Parameters
| Parameter | Type | 
|---|---|
| query | ParsedRequestParams | 
| take | number | 
Returns
null | number
Inherited from
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud/lib/services/crud-service.abstract.d.ts:18
getSort()
protectedgetSort(query,options):ObjectLiteral
Parameters
| Parameter | Type | 
|---|---|
| query | ParsedRequestParams | 
| options | QueryOptions | 
Returns
ObjectLiteral
Inherited from
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:57
getTake()
getTake(
query,options):null|number
Parameters
| Parameter | Type | 
|---|---|
| query | ParsedRequestParams | 
| options | QueryOptions | 
Returns
null | number
Inherited from
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud/lib/services/crud-service.abstract.d.ts:17
mapOperatorsToQuery()
protectedmapOperatorsToQuery(cond,param):object
Parameters
| Parameter | Type | 
|---|---|
| cond | QueryFilter | 
| param | any | 
Returns
object
| Name | Type | 
|---|---|
| params | ObjectLiteral | 
| str | string | 
Inherited from
TypeOrmCrudService.mapOperatorsToQuery
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:60
mapSort()
protectedmapSort(sort):ObjectLiteral
Parameters
| Parameter | Type | 
|---|---|
| sort | QuerySort[] | 
Returns
ObjectLiteral
Inherited from
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:59
onInitMapEntityColumns()
protectedonInitMapEntityColumns():void
Returns
void
Inherited from
TypeOrmCrudService.onInitMapEntityColumns
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:40
prepareEntityBeforeSave()
protectedprepareEntityBeforeSave(dto,parsed):OrgEntityInterface
Parameters
| Parameter | Type | 
|---|---|
| dto | DeepPartial<OrgEntityInterface> | 
| parsed | ParsedRequestParams | 
Returns
Inherited from
TypeOrmCrudService.prepareEntityBeforeSave
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:42
recoverOne()
recoverOne(
req,queryOptions?):Promise<OrgEntityInterface>
Parameters
| Parameter | Type | 
|---|---|
| req | CrudRequest | 
| queryOptions? | CrudQueryOptionsInterface | 
Returns
Promise<OrgEntityInterface>
Inherited from
Defined in
.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:20
replaceOne()
replaceOne(
req,dto,queryOptions?):Promise<OrgEntityInterface>
Parameters
| Parameter | Type | 
|---|---|
| req | CrudRequest | 
| dto | DeepPartial<OrgEntityInterface> | 
| queryOptions? | CrudQueryOptionsInterface | 
Returns
Promise<OrgEntityInterface>
Inherited from
Defined in
.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:18
setAndWhere()
protectedsetAndWhere(cond,i,builder):void
Parameters
| Parameter | Type | 
|---|---|
| cond | QueryFilter | 
| i | any | 
| builder | SelectQueryBuilder<OrgEntityInterface> |WhereExpression | 
Returns
void
Inherited from
TypeOrmCrudService.setAndWhere
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:50
setJoin()
protectedsetJoin(cond,joinOptions,builder):boolean
Parameters
| Parameter | Type | 
|---|---|
| cond | QueryJoin | 
| joinOptions | JoinOptions | 
| builder | SelectQueryBuilder<OrgEntityInterface> | 
Returns
boolean
Inherited from
Defined in
.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:22
setOrWhere()
protectedsetOrWhere(cond,i,builder):void
Parameters
| Parameter | Type | 
|---|---|
| cond | QueryFilter | 
| i | any | 
| builder | SelectQueryBuilder<OrgEntityInterface> |WhereExpression | 
Returns
void
Inherited from
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:51
setSearchCondition()
protectedsetSearchCondition(builder,search,condition?):void
Parameters
| Parameter | Type | 
|---|---|
| builder | SelectQueryBuilder<OrgEntityInterface> | 
| search | SCondition | 
| condition? | SConditionKey | 
Returns
void
Inherited from
TypeOrmCrudService.setSearchCondition
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:52
setSearchFieldObjectCondition()
protectedsetSearchFieldObjectCondition(builder,condition,field,object):void
Parameters
| Parameter | Type | 
|---|---|
| builder | SelectQueryBuilder<OrgEntityInterface> | 
| condition | SConditionKey | 
| field | string | 
| object | any | 
Returns
void
Inherited from
TypeOrmCrudService.setSearchFieldObjectCondition
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:55
throwBadRequestException()
throwBadRequestException(
msg?):BadRequestException
Parameters
| Parameter | Type | 
|---|---|
| msg? | any | 
Returns
BadRequestException
Inherited from
TypeOrmCrudService.throwBadRequestException
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud/lib/services/crud-service.abstract.d.ts:13
throwNotFoundException()
throwNotFoundException(
name):NotFoundException
Parameters
| Parameter | Type | 
|---|---|
| name | string | 
Returns
NotFoundException
Inherited from
TypeOrmCrudService.throwNotFoundException
Defined in
.tmp/repos/rockets/node_modules/@nestjsx/crud/lib/services/crud-service.abstract.d.ts:14
transaction()
transaction(
options?):TransactionProxy
Parameters
| Parameter | Type | 
|---|---|
| options? | SafeTransactionOptionsInterface | 
Returns
Inherited from
TypeOrmCrudService.transaction
Defined in
.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:21
updateOne()
updateOne(
req,dto,queryOptions?):Promise<OrgEntityInterface>
Parameters
| Parameter | Type | 
|---|---|
| req | CrudRequest | 
| dto | DeepPartial<OrgEntityInterface> | 
| queryOptions? | CrudQueryOptionsInterface | 
Returns
Promise<OrgEntityInterface>
Inherited from
Defined in
.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:17