TinyDB – Querying TinyDB has a rich set of queries. We have ways to construct queries: the first way resembles the syntax of ORM tools and the second is the traditional way of using the ”Where” clause. In this chapter, let”s understand these two ways of constructing a query in a TinyDB database. The First […]
Category Archives: tinydb
TinyDB – Delete Data In case you need to delete a particular set of data permanently from a TinyDB database, you can do so by using the remove() method. Like for reteriving and updating the data, you first need to create an instance of the Query class for deleting the data. You can use the […]
TinyDB – Insert Data We have created the instance of the TinyDB and passed a JSON file to it where our data will be stored. It is now time to insert the items in our database. The data should be in the form of a Python dictionary. Syntax To insert an item, you can use […]