Skip to content

Transit TaggedValue should implement IComparable #28

Open
@domkm

Description

Does it make sense for Transit BigIntegers and BigDecimals to be comparable?

The specific issue that I ran into is that Transit values cannot be indexed by DataScript:

Uncaught Error: Cannot compare [TaggedValue: n, 37502364230516917834597274526242608522740435501611847496456113203943353843903] to [TaggedValue: n, 37746944873274413711073286601178981016490453790917975016109108374206467768511]
    at cljs$core$compare (core.cljs:2241)
    at datascript$db$cmp_val (db.cljc:288)
    at datascript$db$cmp_datoms_avet (db.cljc:311)
    at datascript$btset$binary_search_l (btset.cljc:72)
    at datascript$btset$_seek (btset.cljc:951)
    at datascript$btset$_slice (btset.cljc:979)
    at Function.datascript.btset.slice.cljs$core$IFn$_invoke$arity$3 (btset.cljc:990)
    at datascript$btset$slice (btset.cljc:985)
    at Function.datascript.btset.slice.cljs$core$IFn$_invoke$arity$2 (btset.cljc:988)
    at datascript$btset$slice (btset.cljc:985)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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