Function: verseRangeOverlapsRangeNullable()
verseRangeOverlapsRangeNullable(
startCol,endCol,startVerseId,endVerseId):object
Defined in: Data/Core/VerseRangeQuery.ts:61
Match rows whose [start, end] range overlaps a given range, where the end column is NULLABLE and NULL encodes "single verse" (end == start).
Prefer this over verseRangeOverlapsRange for the unified verse_link
table and any other table following the canonical range convention (see the
normative statement in Core/Types.ts). Using COALESCE keeps the two
encodings of a single verse — end IS NULL and end = start —
indistinguishable, which is what the convention requires.
SQL: (startCol <= ? AND COALESCE(endCol, startCol) >= ?) Params: [endVerseId, startVerseId]
Parameters
startCol
string
endCol
string
startVerseId
number
endVerseId
number
Returns
object
params
params:
number[]
sql
sql:
string