@sourceloop/survey-service / Exports / QuestionRepository
Class: QuestionRepository¶
Hierarchy¶
-
DefaultUserModifyCrudRepository
<Question
, typeofid
,QuestionRelations
>↳
QuestionRepository
Table of contents¶
Constructors¶
Properties¶
- followUpQuestions
- getCurrentUser
- options
- optionsRepositoryGetter
- parentQuestion
- rootQuestion
- survey
- surveyRepositoryGetter
- surveyResponseDetail
Methods¶
Constructors¶
constructor¶
• new QuestionRepository(dataSource
, optionsRepositoryGetter
, surveyRepositoryGetter
, getCurrentUser
)
Parameters¶
Name | Type |
---|---|
dataSource |
DataSource |
optionsRepositoryGetter |
Getter <OptionsRepository > |
surveyRepositoryGetter |
Getter <SurveyRepository > |
getCurrentUser |
Getter <IAuthUserWithPermissions <string , string , string >> |
Overrides¶
DefaultUserModifyCrudRepository< Question, typeof Question.prototype.id, QuestionRelations \>.constructor
Defined in¶
services/survey-service/src/repositories/questions.repository.ts:56
Properties¶
followUpQuestions¶
• Readonly
followUpQuestions: HasManyRepositoryFactory
<Question
, undefined
| string
>
Defined in¶
services/survey-service/src/repositories/questions.repository.ts:42
getCurrentUser¶
• Readonly
getCurrentUser: Getter
<IAuthUserWithPermissions
<string
, string
, string
>>
Inherited from¶
DefaultUserModifyCrudRepository.getCurrentUser
Defined in¶
services/survey-service/src/repositories/questions.repository.ts:63
options¶
• Readonly
options: HasManyRepositoryFactory
<Options
, undefined
| string
>
Defined in¶
services/survey-service/src/repositories/questions.repository.ts:37
optionsRepositoryGetter¶
• Protected
optionsRepositoryGetter: Getter
<OptionsRepository
>
Defined in¶
services/survey-service/src/repositories/questions.repository.ts:59
parentQuestion¶
• Readonly
parentQuestion: BelongsToAccessor
<Question
, undefined
| string
>
Defined in¶
services/survey-service/src/repositories/questions.repository.ts:32
rootQuestion¶
• Readonly
rootQuestion: BelongsToAccessor
<Question
, undefined
| string
>
Defined in¶
services/survey-service/src/repositories/questions.repository.ts:27
survey¶
• Readonly
survey: BelongsToAccessor
<Survey
<DataObject
<Model
>>, undefined
| string
>
Defined in¶
services/survey-service/src/repositories/questions.repository.ts:51
surveyRepositoryGetter¶
• Protected
surveyRepositoryGetter: Getter
<SurveyRepository
>
Defined in¶
services/survey-service/src/repositories/questions.repository.ts:61
surveyResponseDetail¶
• Readonly
surveyResponseDetail: HasOneRepositoryFactory
<SurveyResponseDetail
, undefined
| string
>
Defined in¶
services/survey-service/src/repositories/questions.repository.ts:46
Methods¶
create¶
▸ create(entity
, options?
): Promise
<Question
>
Parameters¶
Name | Type |
---|---|
entity |
DataObject <Question > |
options? |
Options |
Returns¶
Promise
<Question
>
Inherited from¶
DefaultUserModifyCrudRepository.create
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:11
createAll¶
▸ createAll(entities
, options?
): Promise
<Question
[]>
Parameters¶
Name | Type |
---|---|
entities |
DataObject <Question >[] |
options? |
Options |
Returns¶
Promise
<Question
[]>
Inherited from¶
DefaultUserModifyCrudRepository.createAll
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:12
replaceById¶
▸ replaceById(id
, data
, options?
): Promise
<void
>
Parameters¶
Name | Type |
---|---|
id |
undefined | string |
data |
DataObject <Question > |
options? |
Options |
Returns¶
Promise
<void
>
Inherited from¶
DefaultUserModifyCrudRepository.replaceById
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:17
save¶
▸ save(entity
, options?
): Promise
<Question
>
Parameters¶
Name | Type |
---|---|
entity |
Question |
options? |
Options |
Returns¶
Promise
<Question
>
Inherited from¶
DefaultUserModifyCrudRepository.save
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:13
update¶
▸ update(entity
, options?
): Promise
<void
>
Parameters¶
Name | Type |
---|---|
entity |
Question |
options? |
Options |
Returns¶
Promise
<void
>
Inherited from¶
DefaultUserModifyCrudRepository.update
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:14
updateAll¶
▸ updateAll(data
, where?
, options?
): Promise
<Count
>
Parameters¶
Name | Type |
---|---|
data |
DataObject <Question > |
where? |
Where <Question > |
options? |
Options |
Returns¶
Promise
<Count
>
Inherited from¶
DefaultUserModifyCrudRepository.updateAll
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:15
updateById¶
▸ updateById(id
, data
, options?
): Promise
<void
>
Parameters¶
Name | Type |
---|---|
id |
undefined | string |
data |
DataObject <Question > |
options? |
Options |
Returns¶
Promise
<void
>
Inherited from¶
DefaultUserModifyCrudRepository.updateById
Defined in¶
packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:16