Skip to main content

Class: DocumentStore

Constructors

constructor

new DocumentStore()

Methods

getDocument

getDocument(squidDocId): SquidDocument

Parameters

NameType
squidDocIdstring

Returns

SquidDocument


getDocumentOrUndefined

getDocumentOrUndefined(squidDocId): undefined | SquidDocument

Parameters

NameType
squidDocIdstring

Returns

undefined | SquidDocument


group

group(sortedDocs, sortFieldNames): SquidDocument[][]

Parameters

NameType
sortedDocsSquidDocument[]
sortFieldNamesstring[]

Returns

SquidDocument[][]


hasData

hasData(squidDocId): boolean

Parameters

NameType
squidDocIdstring

Returns

boolean


migrateDocId

migrateDocId(squidDocId, newSquidDocId): void

Parameters

NameType
squidDocIdstring
newSquidDocIdstring

Returns

void


saveDocument

saveDocument(squidDocId, properties): undefined | SquidDocument

Parameters

NameType
squidDocIdstring
propertiesundefined | SquidDocument

Returns

undefined | SquidDocument


sortAndLimitDocs

sortAndLimitDocs(docIdSet, query): SquidDocument[]

Parameters

NameType
docIdSetSet<string>
queryQuery<any>

Returns

SquidDocument[]