Skip to content

@sourceloop/search-service / Exports / RecentSearchRepository

Class: RecentSearchRepository

Hierarchy

  • DefaultUserModifyCrudRepository<RecentSearch, typeof id>

    RecentSearchRepository

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new RecentSearchRepository(dataSource, queryRepositoryGetter, config, getCurrentUser)

Parameters

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

Overrides

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

Defined in

services/search-service/src/repositories/recent-search.repository.ts:32

Properties

config

Private Readonly config: SearchServiceConfig<SearchResult>

Defined in

services/search-service/src/repositories/recent-search.repository.ts:38


getCurrentUser

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

Inherited from

DefaultUserModifyCrudRepository.getCurrentUser

Defined in

services/search-service/src/repositories/recent-search.repository.ts:40


params

Readonly params: HasManyRepositoryFactory<SearchQuery, undefined | string>

Defined in

services/search-service/src/repositories/recent-search.repository.ts:27

Methods

create

create(query, user?): Promise<RecentSearch>

Parameters

Name Type
query SearchQuery
user? IAuthUserWithPermissions<string, string, string>

Returns

Promise<RecentSearch>

Overrides

DefaultUserModifyCrudRepository.create

Defined in

services/search-service/src/repositories/recent-search.repository.ts:52


createAll

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

Parameters

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

Returns

Promise<RecentSearch[]>

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

Parameters

Name Type
entity RecentSearch
options? Options

Returns

Promise<RecentSearch>

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

Returns

Promise<void>

Inherited from

DefaultUserModifyCrudRepository.updateById

Defined in

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