MCPcopy Create free account
hub / github.com/TanStack/db / usesLocaleStringSort

Function usesLocaleStringSort

packages/db/src/utils/index-optimization.ts:133–136  ·  view source on GitHub ↗

* Whether the collection orders strings using locale collation. * * Under `stringSort: 'locale'` a BTree string index orders values with * `localeCompare`, but the WHERE evaluator compares strings with JS relational * operators (code-point order). For range predicates these orders disagree * (e

(collection: CollectionLike<any, any>)

Source from the content-addressed store, hash-verified

131 * not be index-optimized.
132 */
133function usesLocaleStringSort(collection: CollectionLike<any, any>): boolean {
134 const opts = { ...DEFAULT_COMPARE_OPTIONS, ...collection.compareOptions }
135 return opts.stringSort === `locale`
136}
137
138/**
139 * Whether a range predicate on this operand would use an index ordering that

Callers 1

isRangeOrderingDivergentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected