-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bson support? #215
Comments
I think Sift should work how you want it to -- do you have a pseudocode example? |
I can use it like: let jsData=parse(bson) // maybe bson is 100M and more, costing a lot of cpu
let result=sift(jsData) But I want: let result=sift(bson) To achieve that, sift should have the ability to directly access bson. |
Does the const compare = (a, b) => {
if (a instanceof BSONObject && b instanceof BSONObject) {
reutrn a.value === b.value;
}
}
sift({ $eq: someBSONObject }, { compare }); |
I understand it can't be answered by sift, but I ask it here anyway. I can use it like: const test = sift({ a:{ $exists: true } }));
test({a:1}); But I want: const test = sift({ a:{ $exists: true } }));
const bson = BSON.serialize({ a:1 }); // Buffer instance
test(bson); BSON Buffer is designed to be queriable, it's reasonable to ask to directly query a buffer. |
happy to include this functionality in sift if you want to create a PR! |
Closing this since it's a bit stale. Happy to re-open if this is still an issue. |
Is it possible to query raw bson using this library?
Or can this library be helpful to achieve such a goal: searching a big amount of raw data without a whole parsing.
The text was updated successfully, but these errors were encountered: