API Reference
Rockets Core API
nestjs-user
classes
UserCrudService

Class: UserCrudService

User CRUD service

Extends

Constructors

new UserCrudService()

new UserCrudService(userRepo): UserCrudService

Constructor

Parameters

ParameterTypeDescription
userRepoRepository<UserEntityInterface>instance of the user repository.

Returns

UserCrudService

Overrides

TypeOrmCrudService.constructor

Defined in

.tmp/repos/rockets/packages/nestjs-user/src/services/user-crud.service.ts:18 (opens in a new tab)

Properties

PropertyModifierTypeDescriptionInherited from
aliasreadonlystring-TypeOrmCrudService.alias
countreadonly(options?: FindManyOptions<UserEntityInterface>) => Promise<number>-TypeOrmCrudService.count
crudQueryHelperreadonlyCrudQueryHelper-TypeOrmCrudService.crudQueryHelper
dbNameprotected"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
entityColumnsprotectedstring[]-TypeOrmCrudService.entityColumns
entityColumnsHashprotectedObjectLiteral-TypeOrmCrudService.entityColumnsHash
entityHasDeleteColumnprotectedboolean-TypeOrmCrudService.entityHasDeleteColumn
entityPrimaryColumnsprotectedstring[]-TypeOrmCrudService.entityPrimaryColumns
entityRelationsHashprotectedMap<string, IAllowedRelation>-TypeOrmCrudService.entityRelationsHash
entityTypereadonlyClassType<UserEntityInterface>-TypeOrmCrudService.entityType
findreadonly(options?: FindManyOptions<UserEntityInterface>) => Promise<UserEntityInterface[]>-TypeOrmCrudService.find
findOnereadonly(options: FindOneOptions<UserEntityInterface>) => Promise<null | UserEntityInterface>-TypeOrmCrudService.findOne
repoprotectedRepository<UserEntityInterface>-TypeOrmCrudService.repo
sqlInjectionRegExprotectedRegExp[]-TypeOrmCrudService.sqlInjectionRegEx
userReporeadonlyRepository<UserEntityInterface>instance of the user repository.-

Methods

builderAddBrackets()

protected builderAddBrackets(builder, condition, brackets): void

Parameters

ParameterType
builderSelectQueryBuilder<UserEntityInterface>
conditionSConditionKey
bracketsBrackets

Returns

void

Inherited from

TypeOrmCrudService.builderAddBrackets

Defined in

.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:53


builderSetWhere()

protected builderSetWhere(builder, condition, field, value, operator?): void

Parameters

ParameterType
builderSelectQueryBuilder<UserEntityInterface>
conditionSConditionKey
fieldstring
valueany
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<UserEntityInterface>>

Parameters

ParameterType
parsedParsedRequestParams
optionsCrudRequestOptions
many?boolean
withDeleted?boolean

Returns

Promise<SelectQueryBuilder<UserEntityInterface>>

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<UserEntityInterface[]>

Parameters

ParameterType
reqCrudRequest
dtoCreateManyDto<DeepPartial<UserEntityInterface>>
queryOptions?CrudQueryOptionsInterface

Returns

Promise<UserEntityInterface[]>

Inherited from

TypeOrmCrudService.createMany

Defined in

.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:15


createOne()

createOne(req, dto, queryOptions?): Promise<UserEntityInterface>

Parameters

ParameterType
reqCrudRequest
dtoDeepPartial<UserEntityInterface>
queryOptions?CrudQueryOptionsInterface

Returns

Promise<UserEntityInterface>

Inherited from

TypeOrmCrudService.createOne

Defined in

.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:16


createPageInfo()

createPageInfo(data, total, limit, offset): GetManyDefaultResponse<UserEntityInterface>

Parameters

ParameterType
dataUserEntityInterface[]
totalnumber
limitnumber
offsetnumber

Returns

GetManyDefaultResponse<UserEntityInterface>

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

ParameterType
parsedParsedRequestParams
optionsCrudRequestOptions

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 | UserEntityInterface>

Parameters

ParameterType
reqCrudRequest
queryOptions?CrudQueryOptionsInterface

Returns

Promise<void | UserEntityInterface>

Inherited from

TypeOrmCrudService.deleteOne

Defined in

.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:19


doGetMany()

protected doGetMany(builder, query, options): Promise<UserEntityInterface[] | GetManyDefaultResponse<UserEntityInterface>>

Parameters

ParameterType
builderSelectQueryBuilder<UserEntityInterface>
queryParsedRequestParams
optionsCrudRequestOptions

Returns

Promise<UserEntityInterface[] | GetManyDefaultResponse<UserEntityInterface>>

Inherited from

TypeOrmCrudService.doGetMany

Defined in

.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:39


getAllowedColumns()

protected getAllowedColumns(columns, options): string[]

Parameters

ParameterType
columnsstring[]
optionsQueryOptions

Returns

string[]

Inherited from

TypeOrmCrudService.getAllowedColumns

Defined in

.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:43


getEntityColumns()

protected getEntityColumns(entityMetadata): object

Parameters

ParameterType
entityMetadataEntityMetadata

Returns

object

NameType
columnsstring[]
primaryColumnsstring[]

Inherited from

TypeOrmCrudService.getEntityColumns

Defined in

.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:44


getFieldWithAlias()

protected getFieldWithAlias(field, sort?): string

Parameters

ParameterType
fieldstring
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<UserEntityInterface[] | CrudResultPaginatedInterface<UserEntityInterface>>

Parameters

ParameterType
reqCrudRequest
queryOptions?CrudQueryOptionsInterface

Returns

Promise<UserEntityInterface[] | CrudResultPaginatedInterface<UserEntityInterface>>

Inherited from

TypeOrmCrudService.getMany

Defined in

.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:13


getOne()

getOne(req, queryOptions?): Promise<UserEntityInterface>

Parameters

ParameterType
reqCrudRequest
queryOptions?CrudQueryOptionsInterface

Returns

Promise<UserEntityInterface>

Inherited from

TypeOrmCrudService.getOne

Defined in

.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:14


getOneOrFail()

protected getOneOrFail(req, shallow?, withDeleted?): Promise<UserEntityInterface>

Parameters

ParameterType
reqCrudRequest
shallow?boolean
withDeleted?boolean

Returns

Promise<UserEntityInterface>

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

ParameterType
parsedParsedRequestParams

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

ParameterType
optionsCrudRequestOptions

Returns

string[]

Inherited from

TypeOrmCrudService.getPrimaryParams

Defined in

.tmp/repos/rockets/node_modules/@nestjsx/crud/lib/services/crud-service.abstract.d.ts:19


getRelationMetadata()

protected getRelationMetadata(field, options): IAllowedRelation

Parameters

ParameterType
fieldstring
optionsJoinOption

Returns

IAllowedRelation

Inherited from

TypeOrmCrudService.getRelationMetadata

Defined in

.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:48


getSelect()

protected getSelect(query, options): string[]

Parameters

ParameterType
queryParsedRequestParams
optionsQueryOptions

Returns

string[]

Inherited from

TypeOrmCrudService.getSelect

Defined in

.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:23


getSkip()

getSkip(query, take): null | number

Parameters

ParameterType
queryParsedRequestParams
takenumber

Returns

null | number

Inherited from

TypeOrmCrudService.getSkip

Defined in

.tmp/repos/rockets/node_modules/@nestjsx/crud/lib/services/crud-service.abstract.d.ts:18


getSort()

protected getSort(query, options): ObjectLiteral

Parameters

ParameterType
queryParsedRequestParams
optionsQueryOptions

Returns

ObjectLiteral

Inherited from

TypeOrmCrudService.getSort

Defined in

.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:57


getTake()

getTake(query, options): null | number

Parameters

ParameterType
queryParsedRequestParams
optionsQueryOptions

Returns

null | number

Inherited from

TypeOrmCrudService.getTake

Defined in

.tmp/repos/rockets/node_modules/@nestjsx/crud/lib/services/crud-service.abstract.d.ts:17


mapOperatorsToQuery()

protected mapOperatorsToQuery(cond, param): object

Parameters

ParameterType
condQueryFilter
paramany

Returns

object

NameType
paramsObjectLiteral
strstring

Inherited from

TypeOrmCrudService.mapOperatorsToQuery

Defined in

.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:60


mapSort()

protected mapSort(sort): ObjectLiteral

Parameters

ParameterType
sortQuerySort[]

Returns

ObjectLiteral

Inherited from

TypeOrmCrudService.mapSort

Defined in

.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:59


onInitMapEntityColumns()

protected onInitMapEntityColumns(): 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()

protected prepareEntityBeforeSave(dto, parsed): UserEntityInterface

Parameters

ParameterType
dtoDeepPartial<UserEntityInterface>
parsedParsedRequestParams

Returns

UserEntityInterface

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<UserEntityInterface>

Parameters

ParameterType
reqCrudRequest
queryOptions?CrudQueryOptionsInterface

Returns

Promise<UserEntityInterface>

Inherited from

TypeOrmCrudService.recoverOne

Defined in

.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:20


replaceOne()

replaceOne(req, dto, queryOptions?): Promise<UserEntityInterface>

Parameters

ParameterType
reqCrudRequest
dtoDeepPartial<UserEntityInterface>
queryOptions?CrudQueryOptionsInterface

Returns

Promise<UserEntityInterface>

Inherited from

TypeOrmCrudService.replaceOne

Defined in

.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:18


setAndWhere()

protected setAndWhere(cond, i, builder): void

Parameters

ParameterType
condQueryFilter
iany
builderSelectQueryBuilder<UserEntityInterface> | 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()

protected setJoin(cond, joinOptions, builder): boolean

Parameters

ParameterType
condQueryJoin
joinOptionsJoinOptions
builderSelectQueryBuilder<UserEntityInterface>

Returns

boolean

Inherited from

TypeOrmCrudService.setJoin

Defined in

.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:22


setOrWhere()

protected setOrWhere(cond, i, builder): void

Parameters

ParameterType
condQueryFilter
iany
builderSelectQueryBuilder<UserEntityInterface> | WhereExpression

Returns

void

Inherited from

TypeOrmCrudService.setOrWhere

Defined in

.tmp/repos/rockets/node_modules/@nestjsx/crud-typeorm/lib/typeorm-crud.service.d.ts:51


setSearchCondition()

protected setSearchCondition(builder, search, condition?): void

Parameters

ParameterType
builderSelectQueryBuilder<UserEntityInterface>
searchSCondition
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()

protected setSearchFieldObjectCondition(builder, condition, field, object): void

Parameters

ParameterType
builderSelectQueryBuilder<UserEntityInterface>
conditionSConditionKey
fieldstring
objectany

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

ParameterType
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

ParameterType
namestring

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

ParameterType
options?SafeTransactionOptionsInterface

Returns

TransactionProxy

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<UserEntityInterface>

Parameters

ParameterType
reqCrudRequest
dtoDeepPartial<UserEntityInterface>
queryOptions?CrudQueryOptionsInterface

Returns

Promise<UserEntityInterface>

Inherited from

TypeOrmCrudService.updateOne

Defined in

.tmp/repos/rockets/packages/nestjs-crud/dist/services/typeorm-crud.service.d.ts:17