refactor(8.0): remove the 4 deprecated query-operator aliases (clean break)
8.0 keeps the canonical operators (eq/ne/gt/gte/lt/lte) and their clean long-form aliases (equals/notEquals/greaterThan/greaterThanOrEqual/lessThan/ lessThanOrEqual), and drops the four redundant deprecated spellings: is → eq, isNot → ne, greaterEqual → gte, lessEqual → lte Removed from every evaluator (metadataIndex criteria + range switches, metadataFilter, the db whereMatcher egress path) and from the BrainyFieldOperators type, the unsupported-operator error message, the docs (QUERY_OPERATORS / api README / VFS projection + semantic guides), and the whereMatcher alias tests. Also migrated Brainy's own internal use — the VFS TemporalProjection queried with greaterEqual/lessEqual, which would have silently broken — to gte/lte. Full gate green: build, unit 1512, integration 607. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
b9369f260b
commit
ddcc0c723d
9 changed files with 45 additions and 68 deletions
|
|
@ -80,10 +80,9 @@ describe('db/whereMatcher — operators', () => {
|
|||
expect(whereMatches(e, { status: 'closed' })).toBe(false)
|
||||
})
|
||||
|
||||
it('eq / equals / is aliases', () => {
|
||||
it('eq / equals aliases', () => {
|
||||
expect(whereMatches(e, { amount: { eq: 250 } })).toBe(true)
|
||||
expect(whereMatches(e, { amount: { equals: 250 } })).toBe(true)
|
||||
expect(whereMatches(e, { amount: { is: 250 } })).toBe(true)
|
||||
expect(whereMatches(e, { amount: { eq: 99 } })).toBe(false)
|
||||
})
|
||||
|
||||
|
|
@ -93,10 +92,9 @@ describe('db/whereMatcher — operators', () => {
|
|||
expect(whereMatches(e, { tags: 'missing-tag' })).toBe(false)
|
||||
})
|
||||
|
||||
it('ne / notEquals / isNot aliases', () => {
|
||||
it('ne / notEquals aliases', () => {
|
||||
expect(whereMatches(e, { status: { ne: 'closed' } })).toBe(true)
|
||||
expect(whereMatches(e, { status: { notEquals: 'open' } })).toBe(false)
|
||||
expect(whereMatches(e, { status: { isNot: 'open' } })).toBe(false)
|
||||
})
|
||||
|
||||
it('in / oneOf set membership', () => {
|
||||
|
|
@ -109,12 +107,10 @@ describe('db/whereMatcher — operators', () => {
|
|||
expect(whereMatches(e, { amount: { greaterThan: 250 } })).toBe(false)
|
||||
expect(whereMatches(e, { amount: { gte: 250 } })).toBe(true)
|
||||
expect(whereMatches(e, { amount: { greaterThanOrEqual: 251 } })).toBe(false)
|
||||
expect(whereMatches(e, { amount: { greaterEqual: 250 } })).toBe(true)
|
||||
expect(whereMatches(e, { amount: { lt: 251 } })).toBe(true)
|
||||
expect(whereMatches(e, { amount: { lessThan: 250 } })).toBe(false)
|
||||
expect(whereMatches(e, { amount: { lte: 250 } })).toBe(true)
|
||||
expect(whereMatches(e, { amount: { lessThanOrEqual: 249 } })).toBe(false)
|
||||
expect(whereMatches(e, { amount: { lessEqual: 250 } })).toBe(true)
|
||||
})
|
||||
|
||||
it('string range comparison is lexicographic', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue