Orator 0.9.0 is now out. It is now trully database agnostic by allowing the use of the qmark syntax for all backends. It also improves the result of the query builder and brings several fixes.

For the full list of changes, see the CHANGELOG

Changes

ORM

Dropping support for arrow which is replaced by pendulum instead.

Orator no longer supports arrow objects. Those are replaces by pendulum objects.

Query

Support of the qmark syntax for all backends.

This is the main feature of this version.

You no longer need to adapt your raw queries to the supported syntax of the underlying DBAPI implementation. You can always use the qmark syntax by setting the use_qmark configuration option to True .

This will be the default in the next major version.

from orator import DatabaseManager config = { 'pg' : { 'driver' : 'pgsql' , 'host' : 'localhost' , 'database' : 'database' , 'user' : 'root' , 'password' : '' , 'use_qmark' : True } } db = DatabaseManager ( config ) db . table ( 'users' ) . where_raw ( 'name = ?' , 'john' ) . first ()

The Query Builder now returns Collections

As of this version the Query Builder will return Collection instances to be more consistent with the behavior of the ORM.

users = db . table ( 'users' ) . get () names = users . map ( lambda user : user . name . lower ()) names = names . reject ( lambda name : len ( name ) == 0 )

It's important to note that Collections are no longer bundled in Orator but are now in a separate package: backpack.

Other changes

Connection

Improved connectors

Schema

Makes the use_current=True the default for timestamps() .

Query

Merging queries also merges columns.

Made query builder results accessible by attributes.

DBAL

Improved connectors and dbal to detect platform versions.

Fixes

ORM

Fixed the update of pivots.

Fixed behavior for dates accessor.

Fixed connection not being properly set when specifying the connection with on()

Commands

Made the -P/--pretend command option work.

Schema

Fixed schema grammars.

Fixed an error when modify a table with an enum column in MySQL.

DBAL