TinyDB – Handling Data Query TinyDB – Storing Multiple Data We have already discussed how you can use the ”insert” query to store data in a database. On a similar note, you can use the ”insert_multiple” query to store multiple data items simultaneously. Here is the syntax of ”insert_multiple” query in TinyDB: db.insert_multiple ([ { […]
Category Archives: tinydb
TinyDB – The exists() Query TinyDB provides an advanced query called exists() that checks the existence of data in a JSON file. The exists() query actually tests the availability of a subfield data from a JSON file. The exists() query works on the basis of a Boolean condition. If the subfield exists (i.e., BOOLEAN TRUE), […]
TinyDB – Logical Negate Logical Negate works as an inverse logical gate. It will match the documents that don”t match the given query. In simple words, it will display the opposite meaning of the given command. Syntax The syntax of TinyDB Logical Negate is as follows − db.search(~(Query().field) Here, field represents the part of data […]