Skip to content

@sourceloop/search-service / Exports / SearchQueryRepository

Class: SearchQueryRepository

Hierarchy

  • DefaultUserModifyCrudRepository<SearchQuery, typeof id>

    SearchQueryRepository

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SearchQueryRepository(dataSource, config, getCurrentUser)

Parameters

Name Type
dataSource DataSource
config SearchServiceConfig<SearchResult>
getCurrentUser Getter<undefined | IAuthUserWithPermissions<string, string, string>>

Overrides

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

Defined in

services/search-service/src/repositories/search-query.repository.ts:20

Properties

config

Private Readonly config: SearchServiceConfig<SearchResult>

Defined in

services/search-service/src/repositories/search-query.repository.ts:24


getCurrentUser

Protected Readonly getCurrentUser: Getter<undefined | IAuthUserWithPermissions<string, string, string>>

Inherited from

DefaultUserModifyCrudRepository.getCurrentUser

Defined in

services/search-service/src/repositories/search-query.repository.ts:26

Methods

create

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

Parameters

Name Type
entity DataObject<SearchQuery>
options? Options

Returns

Promise<SearchQuery>

Inherited from

DefaultUserModifyCrudRepository.create

Defined in

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


createAll

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

Parameters

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

Returns

Promise<SearchQuery[]>

Inherited from

DefaultUserModifyCrudRepository.createAll

Defined in

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


deleteAll

deleteAll(where?, options?): Promise<Count>

Parameters

Name Type
where? Where<SearchQuery>
options? AnyObject

Returns

Promise<Count>

Overrides

DefaultUserModifyCrudRepository.deleteAll

Defined in

services/search-service/src/repositories/search-query.repository.ts:33


replaceById

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

Parameters

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

Parameters

Name Type
entity SearchQuery
options? Options

Returns

Promise<SearchQuery>

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

Returns

Promise<void>

Inherited from

DefaultUserModifyCrudRepository.updateById

Defined in

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