Database binding Database binding The database object has the Database.bind() method. It is used for attaching declared entities to a specific database. If you want to play wi...
Fast, Safe and Cheap But Caveat Emptor And, long-running actors Pony is a null-free, type-safe language, with no dangling pointers, no buffer overruns, but with a very fast gar...
Entity inheritance Multiple inheritance Representing inheritance in the database Entity inheritance Entity inheritance in Pony is similar to inheritance for regular Python cla...
Aggregation Aggregation You can use the following five aggregate functions for declarative queries: sum() , count() , min() , max() , avg() and group_concat() . Let’s see...
Declaring an Array attribute Declaring an Array attribute Each array should have a specified type of items that this array can store. Supported types are: int , float and str ....
Creating an entity instance Creating an entity instance Creating an entity instance in Pony is similar to creating a regular object in Python: customer1 = Customer ( login =...
Querying JSON structures Querying JSON structures Native JSON support in databases allows not only read and modify structured data, but also making queries. It is a very powerfu...
JSON Support in Databases JSON Support in Databases For storing JSON in the database Pony uses the following types: SQLite - TEXT PostgreSQL and CockroachDB - JSONB (bina...
Mapping customization Mapping customization When Pony creates tables from entity definitions, it uses the name of entity as the table name and attribute names as the column name...