GithubHelp home page GithubHelp logo

Query multiple docs by ID about tinydb HOT 6 CLOSED

pylipp avatar pylipp commented on May 26, 2024
Query multiple docs by ID

from tinydb.

Comments (6)

msiemens avatar msiemens commented on May 26, 2024 3

That's interesting! Maybe we can make db.get() support a list of document IDs as doc_id (similar to .remove() does – altough it does have a doc_ids instead of doc_id). I'll have to think about that!

from tinydb.

Atmden avatar Atmden commented on May 26, 2024 3

И как в итоге получить записи по списку doc_id?
Не получается использовать в search массив из doc_ids

from tinydb.

keenborder786 avatar keenborder786 commented on May 26, 2024 2

@msiemens I have created a PR that inserts the given feature request. Please see #504

from tinydb.

VermiIIi0n avatar VermiIIi0n commented on May 26, 2024

Hi!

I find that in the doc string of get, it says:

Get exactly one document specified by a query or a document ID.

Plus, get already has a parameter doc_id, whilst search doesn't have a similar parameter and returns a list.

I think search(doc_ids=doc_ids) is more reasonable and feels unified.

I plan to implement this feature and want to know why you prefer modifying get.

from tinydb.

patrick-nicodemus avatar patrick-nicodemus commented on May 26, 2024

I would like to bump this feature request as I have a use-case for it.

from tinydb.

keenborder786 avatar keenborder786 commented on May 26, 2024

Hey , I will have a look into it and start working on it.

from tinydb.

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.