Skip to content

@sourceloop/survey-service / Exports / OptionsRepository

Class: OptionsRepository

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new OptionsRepository(dataSource, questionRepositoryGetter, getCurrentUser)

Parameters

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

Overrides

DefaultUserModifyCrudRepository< Options, typeof Options.prototype.id, OptionsRelations \>.constructor

Defined in

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

Properties

followupQuestion

Readonly followupQuestion: BelongsToAccessor<Question, undefined | string>

Defined in

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


getCurrentUser

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

Inherited from

DefaultUserModifyCrudRepository.getCurrentUser

Defined in

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


question

Readonly question: BelongsToAccessor<Question, undefined | string>

Defined in

services/survey-service/src/repositories/options.repository.ts:17


questionRepositoryGetter

Protected questionRepositoryGetter: Getter<QuestionRepository>

Defined in

services/survey-service/src/repositories/options.repository.ts:30

Methods

create

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

Parameters

Name Type
entity DataObject<Options>
options? Options

Returns

Promise<Options>

Inherited from

DefaultUserModifyCrudRepository.create

Defined in

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


createAll

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

Parameters

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

Returns

Promise<Options[]>

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

Parameters

Name Type
entity Options
options? Options

Returns

Promise<Options>

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

Returns

Promise<void>

Inherited from

DefaultUserModifyCrudRepository.updateById

Defined in

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