Comments (6)
Just acknowledging that I have seen this. I looked over the code and did some quick tests and it looks like I missed implementing the second part of $in functionality that you mention. That certainly needs to get fixed.
What I could not do was reproduce your TypeError which is a little more concerning to me. Do you have any example documents that will cause that to trigger? Are you using memory or disk?
from mongita.
Candidate patch to address $in/$nin behavior - https://github.com/scottrogowski/mongita/pull/21/files
Would still be curious if you have a way to reproduce the TypeError
from mongita.
@scottrogowski Sorry, my $in
parameter was a set. I edited the traceback incorrectly. It should look like this.
result = list(col.find({"names: {"$in": {"asd", "qwe"}}}))
from mongita.
Ah, you had me worried there. PyMongo throws an error when you use sets as well. The difference is that it's a bson.errors.InvalidDocument rather than a TypeError. So while I think I'll try to reproduce that exact error, I'm not as worried.
Regardless, you helped me find something I had overlooked with the $in/$nin operators... so thank you.
from mongita.
Yes sorry I didn't test the code with pymongo. I noticed that sets did work with the standard (non-array field) $in operator so I just extended the code to the array field version and saw the error.
from mongita.
Addressed the $in/$nin with V1.1. I'll set aside document validation for sets for the moment in favor of a larger release later.
from mongita.
Related Issues (20)
- Please add cursor.skip HOT 4
- Feature request: Allow callback functions in slow codepatch HOT 2
- MongoEngine + mongita HOT 6
- mongorestore and mongodump equivalent functionality HOT 3
- Retrieving documents with specific fields with find() is not working/implemented. HOT 3
- Question about parallelization HOT 2
- Compression of collections HOT 2
- Is the existence of mongita.errors.InvalidName necessary? HOT 2
- Implement index intersection + create_indexes HOT 1
- Connect to mongita db from other machine HOT 1
- Question about mongita memory HOT 1
- Are $and, $or queries supported? HOT 1
- replace_one() with upsert=True creates a new ID instead of using ID from filter
- Limited cache and performance queries HOT 1
- Bad returned type for `Collection.index_information` HOT 1
- Allow `BSON.Binary` for `_id` fields
- Pymongo 4 support
- Querying for nested array elements doesn't work
- Migration from MongoDB to Mongita
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongita.