Skip to content

@sourceloop/survey-service / Exports / SectionRepository

Class: SectionRepository

Hierarchy

  • DefaultUserModifyCrudRepository<Section, typeof id>

    SectionRepository

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SectionRepository(dataSource, surveyRepositoryGetter, logger, getCurrentUser)

Parameters

Name Type
dataSource DataSource
surveyRepositoryGetter Getter<SurveyRepository>
logger ILogger
getCurrentUser Getter<IAuthUserWithPermissions<string, string, string>>

Overrides

DefaultUserModifyCrudRepository< Section, typeof Section.prototype.id \>.constructor

Defined in

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

Properties

getCurrentUser

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

Inherited from

DefaultUserModifyCrudRepository.getCurrentUser

Defined in

services/survey-service/src/repositories/section.repository.ts:33


logger

logger: ILogger

Defined in

services/survey-service/src/repositories/section.repository.ts:31


surveyRepositoryGetter

Protected surveyRepositoryGetter: Getter<SurveyRepository>

Defined in

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

Methods

_updateSurveyModifiedByAndOn

_updateSurveyModifiedByAndOn(surveyId): Promise<void>

Parameters

Name Type
surveyId string

Returns

Promise<void>

Defined in

services/survey-service/src/repositories/section.repository.ts:76


create

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

Parameters

Name Type
entity DataObject<Section>
options? AnyObject

Returns

Promise<Section>

Overrides

DefaultUserModifyCrudRepository.create

Defined in

services/survey-service/src/repositories/section.repository.ts:38


createAll

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

Parameters

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

Returns

Promise<Section[]>

Inherited from

DefaultUserModifyCrudRepository.createAll

Defined in

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


reorder

reorder(surveyId, displayOrder): Promise<void>

Parameters

Name Type
surveyId string
displayOrder number

Returns

Promise<void>

Defined in

services/survey-service/src/repositories/section.repository.ts:62


replaceById

replaceById(id, data, options?): Promise<void>

Parameters

Name Type
id undefined | string
data DataObject<Section>
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<Section>

Parameters

Name Type
entity Section
options? Options

Returns

Promise<Section>

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

Returns

Promise<Count>

Overrides

DefaultUserModifyCrudRepository.updateAll

Defined in

services/survey-service/src/repositories/section.repository.ts:48


updateById

updateById(id, data, options?): Promise<void>

Parameters

Name Type
id undefined | string
data DataObject<Section>
options? Options

Returns

Promise<void>

Inherited from

DefaultUserModifyCrudRepository.updateById

Defined in

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