ssbc / jitdb

A database on top of a log with automatic index generation and maintenance
50 stars 7 forks source link

Use bipf.compare() instead of bipf.compareString() #178

Closed staltz closed 2 years ago

staltz commented 2 years ago

Full context here: https://github.com/ssb-ngi-pointer/ssb-db2/pull/277

BIPF was recently fixed because it had some wrong logic, but then the updated-fixed BIPF broke tests in ssb-db2. That's because we are using bipf.compareString() in JITDB for comparing things that are not strings, e.g. kvt.meta.private.

We should update BIPF in JITDB and replace bipf.compareString() with bipf.compare() wherever applicable. We should also be careful to do bipf.allocAndEncode() instead of Buffer.from() for the opData.value.

arj03 commented 2 years ago

I'll take a stab at this one :)