Skip to content

@sourceloop/survey-service / Exports / TemplateQuestionRepository

Class: TemplateQuestionRepository

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new TemplateQuestionRepository(dataSource, questionRepositoryGetter, getCurrentUser)

Parameters

Name Type
dataSource DataSource
questionRepositoryGetter Getter<QuestionRepository>
getCurrentUser Getter<IAuthUserWithPermissions<string, string, string>>

Overrides

DefaultUserModifyCrudRepository< TemplateQuestion, typeof TemplateQuestion.prototype.id, TemplateQuestionRelations \>.constructor

Defined in

services/survey-service/src/repositories/template-questions.repository.ts:37

Properties

dependentOnQuestion

Readonly dependentOnQuestion: BelongsToAccessor<TemplateQuestion, undefined | string>

Defined in

services/survey-service/src/repositories/template-questions.repository.ts:32


getCurrentUser

Readonly getCurrentUser: Getter<IAuthUserWithPermissions<string, string, string>>

Inherited from

DefaultUserModifyCrudRepository.getCurrentUser

Defined in

services/survey-service/src/repositories/template-questions.repository.ts:42


question

Readonly question: BelongsToAccessor<Question, undefined | string>

Defined in

services/survey-service/src/repositories/template-questions.repository.ts:22


questionRepositoryGetter

Protected questionRepositoryGetter: Getter<QuestionRepository>

Defined in

services/survey-service/src/repositories/template-questions.repository.ts:40


questionTemplate

Readonly questionTemplate: BelongsToAccessor<QuestionTemplate<DataObject<Model>>, undefined | string>

Defined in

services/survey-service/src/repositories/template-questions.repository.ts:27

Methods

create

create(entity, options?): Promise<TemplateQuestion>

Parameters

Name Type
entity DataObject<TemplateQuestion>
options? Options

Returns

Promise<TemplateQuestion>

Inherited from

DefaultUserModifyCrudRepository.create

Defined in

packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:11


createAll

createAll(entities, options?): Promise<TemplateQuestion[]>

Parameters

Name Type
entities DataObject<TemplateQuestion>[]
options? Options

Returns

Promise<TemplateQuestion[]>

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

Parameters

Name Type
entity TemplateQuestion
options? Options

Returns

Promise<TemplateQuestion>

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 TemplateQuestion
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<TemplateQuestion>
where? Where<TemplateQuestion>
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<TemplateQuestion>
options? Options

Returns

Promise<void>

Inherited from

DefaultUserModifyCrudRepository.updateById

Defined in

packages/core/dist/repositories/default-user-modify-crud.repository.base.d.ts:16