Installing Installing To install Pony, type the following command into the command prompt: pip install pony Pony can be installed on Python 2.7 or Python 3. If you are going...
Handling disruptions Handling disruptions On db.bind(...) Pony opens connection to the database and then store it in a thread-local connection pool. When application code ente...
Pony supports integration with other native languages through the Foreign Function Interface (FFI). The FFI library provides a stable and portable API and high-level programming i...
Structs are “classes for FFI” What goes in a struct? Fields Constructors Functions We’ll see structs again A struct is similiar to a class . There’s a couple very important...
Divide by zero in Pony Divide by zero on floating points What’s 1 divided by 0? How about 10 divided by 0? What is the result you get in your favorite programming language? In ...
What can be annotated The effect of annotations Annotations in the Pony compiler packed likely and unlikely In Pony, we provide a special syntax for implementation-specifi...
We’ve covered the basics of Pony’s type system and then expressions, this chapter about reference capabilities will cover another feature of Pony’s type system. There aren’t curre...
Optimistic concurrency control Optimistic concurrency control By default Pony uses the optimistic concurrency control concept for increasing performance. With this concept, Pony...
Automatic DISTINCT Automatic DISTINCT Pony tries to avoid duplicates in a query result by automatically adding the DISTINCT SQL keyword where it is necessary, because useful qu...
Saving objects in the database Order of saving objects Cyclic chains during saving objects Saving objects in the database Normally you don’t need to bother of saving your enti...