All queries that are run on a PostgreSQL cluster are executed inside a transaction, even if a single-query interface is used.
A uPg transaction can be started using all isolation levels and modes supported by PostgreSQL server as specified in documentation here https://www.postgresql.org/docs/current/static/sql-set-transaction.html. When starting a transaction, the options are specified using TransactionOptions structure.
For convenience and improvement of readability there are constants defined: Transaction::RW, Transaction::RO and Transaction::Deferrable.
Transaction object ensures that a transaction started in a PostgreSQL connection will be either committed or rolled back and the connection will returned back to a connection pool.
Next: uPg: Running queries
See also: uPg: Working with result sets