acebase icon indicating copy to clipboard operation
acebase copied to clipboard

Add BigInt support

Open Mitsichury opened this issue 2 years ago • 2 comments

Hi :)

I have noticed that if I add a BigInt field, I can't sort or apply filters on it. It is rightly stored and loaded. Could you add the support if BigInt for filtering please ? Could be great as JS does not handle big numbers with precision.

Thank you :)

Mitsichury avatar Jun 26 '22 13:06 Mitsichury

Your bigints now are stored as strings in the db, that's why they don't sort ok. I'm working on bigint support now, check latest commits

appy-one avatar Jul 04 '22 19:07 appy-one

Amazing, thx a lot 👍

Mitsichury avatar Jul 06 '22 19:07 Mitsichury

Support for bigint has now been implemented and published in v1.22.0!

Spread the word contribute Sponsor AceBase

appy-one avatar Aug 19 '22 19:08 appy-one

Hi appy-one, Thank you for publishing a new realese, I tried to update but it seems that add an Index on BigInt value is not working well. I have an error about JSON serialisation : TypeError: Do not know how to serialize a BigInt

const totalResults = await query.take(1000000).count()

I'll try to create a unit test for that. Thanks !

Mitsichury avatar Aug 20 '22 20:08 Mitsichury