SQLObject 0.8.0b1

O

Oleg Broytmann

Hello!

I'm pleased to announce the 0.8.0b1 release of SQLObject. This is the first
beta of the new branch. Taking into account that it is a result of rather
large job the beta period will be prolonged. Meanwhile the stable 0.7
branch will be maintained, and there will be at least 0.7.3 release.


What is SQLObject
=================

SQLObject is an object-relational mapper. Your database tables are described
as classes, and rows are instances of those classes. SQLObject is meant to be
easy to use and quick to get started with.

SQLObject supports a number of backends: MySQL, PostgreSQL, SQLite, and
Firebird. It also has newly added support for Sybase, MSSQL and MaxDB (also
known as SAPDB).


Where is SQLObject
==================

Site:
http://sqlobject.org

Development:
http://sqlobject.org/devel/

Mailing list:
https://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss

Archives:
http://news.gmane.org/gmane.comp.python.sqlobject

Download:
http://cheeseshop.python.org/pypi/SQLObject/0.8.0b1

News and changes:
http://sqlobject.org/devel/News.html


What's New
==========

Features & Interface
--------------------

* It is now possible to create tables that reference each other.
Constraints (in the DBMSes that support constraints) are added after the
tables have been created.

* Added ``createSQL`` as an option for sqlmeta. Here you can add
related SQL you want executed by sqlobject-admin create after table
creation. createSQL expects a string, list, or dictionary. If using
a dictionary the key should be a dbName value (ex. 'postgres') and
the value should be a string or list. Examples in
sqlobject/tests/test_sqlobject_admin.py or at
<http://sqlobject.org/sqlobject-admin.html#the-create-command>

* Added method ``sqlhub.doInTransaction(callable, *args, **kwargs)``,
to be used like::

sqlhub.doInTransaction(process_request, os.environ)

This will run ``process_request(os.environ)``. The return
value will be preserved.

* Added method ``.getOne([default])`` to ``SelectResults`` (these are
the objects returned by ``.select()`` and ``.selectBy()``). This
returns a single object, when the query is expected to return only
one object. The single argument is the value to return when zero
results are found (more than one result is always an error). If no
default is given, it is an error if no such object exists.

* Added a WSGI middleware (in ``sqlobject.wsgi_middleware``) for
configuring the database for the request. Also handles
transactions. Available as ``egg:SQLObject`` in Paste Deploy
configuration files.

* New joins! ManyToMany and OneToMany; not fully documented yet, but still
more sensible and smarter.

* SELECT FOR UPDATE

* New module dberrors.py - a hierarchy of exceptions. Translation of DB API
module's exceptions to the new hierarchy is performed for SQLite and MySQL.

* SQLiteConnection got a new keyword "factory" - a name or a reference to
a factory function that returns a connection class; useful for
implementing functions or aggregates. See test_select.py and
test_sqlite_factory.py for examples.

* SQLObject now disallows columns with names that collide with existing
variables and methods, such as "_init", "expire", "set" and so on.

Small Features
--------------

* Configurable client character set (encoding) for MySQL.

* Added a close option to .commit(), so you can close the transaction as
you commit it.

* DecimalValidator.

* Added .expireAll() methods to sqlmeta and connection objects, to expire
all instances in those cases.

* String IDs.

* FOREIGN KEY for MySQL.

* Support for sqlite3 (a builtin module in Python 2.5).

* SelectResults cannot be queried for truth value; in any case it was
meaningless - the result was always True; now __nonzero__() raises
NotImplementedError in case one tries bool(MyTable.select()) or
"if MyTable.select():..."

Bug Fixes
---------

* Fixed problem with sqlite and threads; connections are no longer shared
between threads for sqlite (except for :memory:).

* The reference loop between SQLObject and SQLObjectState eliminated using
weak references.

For a more complete list, please see the http://sqlobject.org/devel/News.html

Oleg.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SQLObject 1.5.1 0
SQLObject 1.3.3 and 1.4.1 0
SQLObject 1.5.2 0
SQLObject 1.1.3 0
SQLObject 1.0.1 0
SQLObject 1.3.2 and 1.2.4 0
SQLObject 1.1.2 0
SQLObject 0.15.1 0

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top