Giter Club home page Giter Club logo

Comments (6)

scottrogowski avatar scottrogowski commented on July 18, 2024

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.

scottrogowski avatar scottrogowski commented on July 18, 2024

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.

Dobatymo avatar Dobatymo commented on July 18, 2024

@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.

scottrogowski avatar scottrogowski commented on July 18, 2024

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.

Dobatymo avatar Dobatymo commented on July 18, 2024

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.

scottrogowski avatar scottrogowski commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.