Attention
Peewee needs your help! Do you have suggestions on how the documentation could be improved? If so, please leave a comment on this GitHub issue:
https://github.com/coleifer/peewee/issues/1640
Querying
This section will cover the basic CRUD operations commonly performed on a relational database:
Model.create()
, for executing INSERT queries.Model.save()
andModel.update()
, for executing UPDATE queries.Model.delete_instance()
andModel.delete()
, for executing DELETE queries.Model.select()
, for executing SELECT queries.
Note
There is also a large collection of example queries taken from the Postgresql Exercises website. Examples are listed on the query examples document.