Line 1 Line 2 Line 3 That’s it! Let’s look at our helloworld code again: actor Main new create ( env : Env ) => env . out . print ( "Hello, world!" ) Let...
What goes in a class? Fields Constructors Functions Finalisers What about inheritance? Naming rules Just like other object-oriented languages, Pony has classes . A class is...
Multiple relationships between two entities Multiple relationships between two entities When two entities have more than one relationship between them, Pony requires the reverse...
Database Database class Database Database class class Database The Database object manages database connections using a connection pool. It is thread safe and can be shared ...
Queries with HAVING Queries with HAVING The SELECT statement has two different sections which are used for conditions: WHERE and HAVING . The WHERE section is used more often...
Use for external libraries If Pony code calls FFI functions, then those functions, or rather the libraries containing them, must be linked into the Pony program. Use for exter...
Loading objects from the database Getting an object by primary key Getting one object by unique combination of attributes Getting several objects Using parameters in queries So...
Deleting an object Bulk delete Cascade delete Deleting an object When you call the delete() method of an entity instance, Pony marks the object as deleted. The object will b...