Skip to main content

Interface: IDictionaryRepository

Defined in: Data/Repositories/IDictionaryRepository.ts:10

Interface for Dictionary repository Defines all operations for working with dictionary/lexicon databases

Methods

browseByLetter()

browseByLetter(letter, limit, offset): object

Defined in: Data/Repositories/IDictionaryRepository.ts:52

Parameters

letter

string | null

limit

number

offset

number

Returns

object

entries

entries: object[]

total

total: number


createEntry()

createEntry(entry): DictionaryEntry

Defined in: Data/Repositories/IDictionaryRepository.ts:23

Parameters

entry

DictionaryEntry

Returns

DictionaryEntry


deleteEntry()

deleteEntry(entryId): boolean

Defined in: Data/Repositories/IDictionaryRepository.ts:25

Parameters

entryId

number

Returns

boolean


getAdjacentEntries()

getAdjacentEntries(entryKey): object

Defined in: Data/Repositories/IDictionaryRepository.ts:53

Parameters

entryKey

string

Returns

object

next

next: { entryKey: string; word: string; } | null

prev

prev: { entryKey: string; word: string; } | null


getAllEntries()

getAllEntries(options?): DictionaryEntry[]

Defined in: Data/Repositories/IDictionaryRepository.ts:18

Parameters

options?
limit?

number

offset?

number

Returns

DictionaryEntry[]


getEntriesReferencingVerse()

getEntriesReferencingVerse(verseId): DictionaryEntry[]

Defined in: Data/Repositories/IDictionaryRepository.ts:42

Entries citing a given verse. Only answerable on a v2 module — on v1 the citations live in an unindexed JSON column, so this returns empty there.

Parameters

verseId

number

Returns

DictionaryEntry[]


getEntry()

getEntry(entryId): DictionaryEntry | undefined

Defined in: Data/Repositories/IDictionaryRepository.ts:16

Parameters

entryId

number

Returns

DictionaryEntry | undefined


getEntryByKey()

getEntryByKey(entryKey): DictionaryEntry | undefined

Defined in: Data/Repositories/IDictionaryRepository.ts:17

Parameters

entryKey

string

Returns

DictionaryEntry | undefined


getEntryCount()

getEntryCount(): number

Defined in: Data/Repositories/IDictionaryRepository.ts:54

Returns

number


getExampleVerses()

getExampleVerses(entryId): ExampleVerse[]

Defined in: Data/Repositories/IDictionaryRepository.ts:33

Example verses cited by an entry. Reads the unified verse_link table (source_type='dictionary_entry') on a v2 module and the legacy JSON example_verses column on a v1 module.

Parameters

entryId

number

Returns

ExampleVerse[]


getLetterIndex()

getLetterIndex(): object[]

Defined in: Data/Repositories/IDictionaryRepository.ts:49

Returns

object[]


getModuleInfo()

getModuleInfo(): DictionaryModuleInfo | undefined

Defined in: Data/Repositories/IDictionaryRepository.ts:12

Returns

DictionaryModuleInfo | undefined


getOccurrences()

getOccurrences(entryKey): WordOccurrence[]

Defined in: Data/Repositories/IDictionaryRepository.ts:45

Parameters

entryKey

string

Returns

WordOccurrence[]


getOccurrencesForVerse()

getOccurrencesForVerse(verseId): WordOccurrence[]

Defined in: Data/Repositories/IDictionaryRepository.ts:46

Parameters

verseId

number

Returns

WordOccurrence[]


getVerseLinksForEntry()

getVerseLinksForEntry(entryId): VerseLinkRecord[]

Defined in: Data/Repositories/IDictionaryRepository.ts:36

An entry's verse links in the unified v2 shape. Empty on a v1 module.

Parameters

entryId

number

Returns

VerseLinkRecord[]


searchByTitle()

searchByTitle(query, options?): DictionaryEntry[]

Defined in: Data/Repositories/IDictionaryRepository.ts:20

Parameters

query

string

options?
limit?

number

Returns

DictionaryEntry[]


searchEntries()

searchEntries(query, options?): DictionaryEntry[]

Defined in: Data/Repositories/IDictionaryRepository.ts:19

Parameters

query

string

options?
limit?

number

Returns

DictionaryEntry[]


updateEntry()

updateEntry(entry): DictionaryEntry

Defined in: Data/Repositories/IDictionaryRepository.ts:24

Parameters

entry

DictionaryEntry

Returns

DictionaryEntry


updateModuleInfo()

updateModuleInfo(info): void

Defined in: Data/Repositories/IDictionaryRepository.ts:13

Parameters

info

DictionaryModuleInfo

Returns

void