Class: UserRepository
backend.UserRepository
#
Hierarchy↳
UserRepository
#
Table of contents#
Constructors#
Properties#
Methods- applyBaseFilter
- applyDeleteMany
- applyGetEntityViews
- applyUserFilter
- createEntity
- createUser
- deleteEntity
- deleteMany
- deleteManyFilteredUsers
- deleteUser
- getAll
- getById
- getBySlug
- getEntityViews
- getFilteredEntities
- getFilteredUsers
- getPaged
- getSqlBoolStr
- getSqlLike
- getUserByEmail
- getUserById
- getUserBySlug
- getUsers
- handleUserInput
- hashPassword
- quote
- updateEntity
- updateUser
#
Constructors#
constructor• new UserRepository()
#
Overrides#
Defined insystem/core/backend/src/repositories/user.repository.ts:20
#
Properties#
dbType• dbType: "mysql"
| "mariadb"
| "postgres"
| "cockroachdb"
| "sqlite"
| "mssql"
| "sap"
| "oracle"
| "cordova"
| "nativescript"
| "react-native"
| "sqljs"
| "mongodb"
| "aurora-data-api"
| "aurora-data-api-pg"
| "expo"
| "better-sqlite3"
| "capacitor"
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:24
#
Methods#
applyBaseFilterâ–¸ applyBaseFilter<EntityType
>(qb
, filter?
): SelectQueryBuilder
<EntityType
>
#
Type parametersName | Type |
---|---|
EntityType | TBasePageEntity |
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <EntityType > |
filter? | BaseFilterInput |
#
ReturnsSelectQueryBuilder
<EntityType
>
#
Inherited fromBaseRepository.applyBaseFilter
#
Defined insystem/core/backend/src/repositories/base.repository.ts:155
#
applyDeleteManyâ–¸ applyDeleteMany(qb
, input
): Promise
<void
>
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <User > | DeleteQueryBuilder <User > |
input | TDeleteManyInput |
#
ReturnsPromise
<void
>
#
Inherited fromBaseRepository.applyDeleteMany
#
Defined insystem/core/backend/src/repositories/base.repository.ts:108
#
applyGetEntityViewsâ–¸ applyGetEntityViews(qb
, entityType
): SelectQueryBuilder
<TBasePageEntity
>
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <TBasePageEntity > |
entityType | EDBEntity |
#
ReturnsSelectQueryBuilder
<TBasePageEntity
>
#
Inherited fromBaseRepository.applyGetEntityViews
#
Defined insystem/core/backend/src/repositories/base.repository.ts:133
#
applyUserFilterâ–¸ applyUserFilter(qb
, filterParams?
): void
#
ParametersName | Type |
---|---|
qb | SelectQueryBuilder <TUser > |
filterParams? | UserFilterInput |
#
Returnsvoid
#
Defined insystem/core/backend/src/repositories/user.repository.ts:137
#
createEntityâ–¸ createEntity(input
, id?
): Promise
<User
>
#
ParametersName | Type |
---|---|
input | User |
id? | null | number |
#
ReturnsPromise
<User
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:70
#
createUserâ–¸ createUser(createUser
, id?
, passwordType?
): Promise
<User
>
#
ParametersName | Type |
---|---|
createUser | TCreateUser |
id? | null | number |
passwordType? | "hash" | "plain" |
#
ReturnsPromise
<User
>
#
Defined insystem/core/backend/src/repositories/user.repository.ts:78
#
deleteEntityâ–¸ deleteEntity(id
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<boolean
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:97
#
deleteManyâ–¸ deleteMany(input
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
input | TDeleteManyInput |
#
ReturnsPromise
<boolean
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:125
#
deleteManyFilteredUsersâ–¸ deleteManyFilteredUsers(input
, filterParams?
): Promise
<undefined
| boolean
>
#
ParametersName | Type |
---|---|
input | TDeleteManyInput |
filterParams? | UserFilterInput |
#
ReturnsPromise
<undefined
| boolean
>
#
Defined insystem/core/backend/src/repositories/user.repository.ts:182
#
deleteUserâ–¸ deleteUser(id
): Promise
<boolean
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<boolean
>
#
Defined insystem/core/backend/src/repositories/user.repository.ts:124
#
getAllâ–¸ getAll(): Promise
<User
[]>
#
ReturnsPromise
<User
[]>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:44
#
getByIdâ–¸ getById(id
, relations?
): Promise
<User
>
#
ParametersName | Type |
---|---|
id | number |
relations? | string [] |
#
ReturnsPromise
<User
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:49
#
getBySlugâ–¸ getBySlug(slug
, relations?
): Promise
<User
>
#
ParametersName | Type |
---|---|
slug | string |
relations? | string [] |
#
ReturnsPromise
<User
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:60
#
getEntityViewsâ–¸ getEntityViews(entityId
, entityType
): Promise
<any
>
#
ParametersName | Type |
---|---|
entityId | number |
entityType | EDBEntity |
#
ReturnsPromise
<any
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:144
#
getFilteredEntitiesâ–¸ getFilteredEntities(pagedParams?
, filterParams?
): Promise
<TPagedList
<User
>>
#
ParametersName | Type |
---|---|
pagedParams? | PagedParamsInput <User > |
filterParams? | BaseFilterInput |
#
ReturnsPromise
<TPagedList
<User
>>
#
Inherited fromBaseRepository.getFilteredEntities
#
Defined insystem/core/backend/src/repositories/base.repository.ts:164
#
getFilteredUsersâ–¸ getFilteredUsers(pagedParams?
, filterParams?
): Promise
<TPagedList
<TUser
>>
#
ParametersName | Type |
---|---|
pagedParams? | PagedParamsInput <TUser > |
filterParams? | UserFilterInput |
#
ReturnsPromise
<TPagedList
<TUser
>>
#
Defined insystem/core/backend/src/repositories/user.repository.ts:175
#
getPagedâ–¸ getPaged(params?
): Promise
<TPagedList
<User
>>
#
ParametersName | Type |
---|---|
params? | TPagedParams <User > |
#
ReturnsPromise
<TPagedList
<User
>>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:38
#
getSqlBoolStrâ–¸ getSqlBoolStr(b
): "true"
| "false"
| "1"
| "0"
#
ParametersName | Type |
---|---|
b | boolean |
#
Returns"true"
| "false"
| "1"
| "0"
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:34
#
getSqlLikeâ–¸ getSqlLike(): "ILIKE"
| "LIKE"
#
Returns"ILIKE"
| "LIKE"
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:35
#
getUserByEmailâ–¸ getUserByEmail(email
): Promise
<undefined
| User
>
#
ParametersName | Type |
---|---|
email | string |
#
ReturnsPromise
<undefined
| User
>
#
Defined insystem/core/backend/src/repositories/user.repository.ts:34
#
getUserByIdâ–¸ getUserById(id
): Promise
<undefined
| User
>
#
ParametersName | Type |
---|---|
id | number |
#
ReturnsPromise
<undefined
| User
>
#
Defined insystem/core/backend/src/repositories/user.repository.ts:29
#
getUserBySlugâ–¸ getUserBySlug(slug
): Promise
<undefined
| User
>
#
ParametersName | Type |
---|---|
slug | string |
#
ReturnsPromise
<undefined
| User
>
#
Defined insystem/core/backend/src/repositories/user.repository.ts:44
#
getUsersâ–¸ getUsers(params?
): Promise
<TPagedList
<User
>>
#
ParametersName | Type |
---|---|
params? | TPagedParams <User > |
#
ReturnsPromise
<TPagedList
<User
>>
#
Defined insystem/core/backend/src/repositories/user.repository.ts:24
#
handleUserInputâ–¸ handleUserInput(user
, userInput
, action
): Promise
<void
>
#
ParametersName | Type |
---|---|
user | User |
userInput | TUpdateUser |
action | "update" | "create" |
#
ReturnsPromise
<void
>
#
Defined insystem/core/backend/src/repositories/user.repository.ts:49
#
hashPasswordâ–¸ hashPassword(password
): Promise
<string
>
#
ParametersName | Type |
---|---|
password | string |
#
ReturnsPromise
<string
>
#
Defined insystem/core/backend/src/repositories/user.repository.ts:111
#
quoteâ–¸ quote(str
): string
#
ParametersName | Type |
---|---|
str | string |
#
Returnsstring
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:36
#
updateEntityâ–¸ updateEntity(id
, input
): Promise
<User
>
#
ParametersName | Type |
---|---|
id | number |
input | User |
#
ReturnsPromise
<User
>
#
Inherited from#
Defined insystem/core/backend/src/repositories/base.repository.ts:82
#
updateUserâ–¸ updateUser(id
, updateUser
): Promise
<User
>
#
ParametersName | Type |
---|---|
id | number |
updateUser | TUpdateUser |
#
ReturnsPromise
<User
>