Skip to content

Single-column BTree index crashes when filtering with Range #4736

@DexterKoelson

Description

@DexterKoelson

Calling .filter() or .delete() with a Range on a single-column BTree index throws:

SyntaxError: Cannot convert [object Object] to a BigInt

Example:

ctx.db.players.fooId.filter(
  new Range({ tag: 'included', value: 1n }, { tag: 'unbounded' })
);

The type system accepts Range<T> here (via IndexScanRangeBounds), but the runtime always serializes the argument as a point value. Multi-column indexes handle Range correctly — single-column indexes don't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions