TinyDB – The one_of() Query For matching the subfield data, TinyDB provides a method called one_of(). This method searches a single category and gets at least one similar value. It will match if the field is contained in the provided list. Syntax The syntax of TinyDB one_of() is as follows − db.search(Query().field.one_of(list) Here, field represents […]
TinyDB – The matches() Query The matches() query matches the data from a JSON file with a given condition (in the form of a regular expression) and returns the results accordingly. It will return a blank value if the condition does not match with the data in the file. Syntax The syntax of TinyDB matches() […]
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 […]