How about TypedArrays? #11533
Unanswered
jimmywarting
asked this question in
Q&A
Replies: 1 comment
-
Check out bitwise query operators. Your best bet would probably be to convert Float64Array to a Buffer and then store that, and convert it back to a Float64Array on the way out. And bitwise query operators sound like what you're looking for in terms of querying by individual bytes. We also support custom schema types if you want Mongoose to automatically convert to Buffer before saving in MongoDB and automatically convert back to Float64Array when the document is loaded. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi 👋
I haven't set up any collection or schema yet to test this out, but i would simply like to know just know if mongoose/mongodb supports saving any Typed Arrays?
Can I store a DataView or Float64Array and get a Float64Array back?
And it's possible to query/filter the binary data in any way?
Reason i ask is b/c i store a big structural data/object that only contains some float/int values
And I would like to simply put them into a ArrayBuffer
I wish i could say something like
And then i would like to be able to filter find/filter this collection and do some form of
select * where field.float64array[2] => number
I suppose a rational database with more strict schema/structure would have been better fit then a document based one... but here i'm using mongodb for everything else already,
Beta Was this translation helpful? Give feedback.
All reactions