SQLObject 1.1.0 release, SQLObject is a popular Python database object mapping framework, the mapping rule is table-> class, Field-> properties.
The Object Relational Mapping tool helps increase productivity by providing classes and objects to manipulate database tables. Python's Best object-relational mapping tool is sqlobject--an open source project that almost completes all the operations required by the programming database. This article introduces SQLObject and its functions. After reading this article, you will be able to connect Python to the database without writing any SQL code.
Object-relational mappings are typically seen when object-oriented programming paradigms satisfy the relational paradigm of most databases. Object-relational mapping is a bridge between the two worlds. It allows you to define a class that corresponds to a database table. You can then use the methods on these classes and their instances to interact with the database without writing SQL. Using object-relational mapping does not mean that you don't need to know how the http://www.aliyun.com/zixun/aggregation/22.html "> relational database works, but you don't need to write SQL to avoid programming errors."
You can find a dozen or more open source Python packages that operate SQL databases, which does not include special-purpose modules for connecting Python to a particular database. SQLObject is one of the best modules. It is a simple and Easy-to-use complete Object Relational mapping package. SQLObject can almost complete all the operations required for the programming database.
SQLObject 1.1 Release Notes:
Features & Interface
Selectresults (returned from. Select ()) are even in (column, list). A different workaround is used into sqliteconnection to prevent pysqlite from converting strings to unicode-in the case of a regist Ered Text conversion function Pysqlite silently converts empty to strings; Now SQLObject uses text_factory instead and properly returns empty. It is now possible to declare one encoding for all Unicodecol ' s per table (as sqlmeta.dbencoding) or/per connection (as connection.dbencoding). Default (if dbencoding is found neither in column nor in table nor in connection) is ' Utf-8 '.
Source Code and Internals
Decorators @classmethod and @staticmethod are used everywhere. All ' Mydict.has_key (name) ' Geom were replaced with ' name in Mydict '.
Installation Instructions:
Can install the latest release with:
Easy_install-u SQLObject
Can install the latest version of SQLObject with:
Easy_install Sqlobject==dev
Can install the latest bug fixing branch with:
Easy_install Sqlobject==bugfix
If you are want to require a specific revision (because, for instance, you need a bugfix this hasn't ' t appeared in a release), can This in your setuptools using setup.py file:
Setup (... install_requires=["sqlobject==bugfix,>=0.7.1dev-r1485"]