Python 的 ORM 框架 SQLObject 1.2.0 发布

jopen 13年前
     <p>SQLObject 是一个流行的Python 数据库对象映射框架,映射的规则就是表->类、字段->属性</p>    <p>SQLObject还包含一个基于Python对象的查询语言,makes SQL more abstract, and provides substantial database independence for applications。<br /> <br /> 示例代码:</p>    <pre class="brush:python; toolbar: true; auto-links: false;">>>> from sqlobject import *  >>>  >>> sqlhub.processConnection = connectionForURI('sqlite:/:memory:')  >>>  >>> class Person(SQLObject):  ...     fname = StringCol()  ...     mi = StringCol(length=1, default=None)  ...     lname = StringCol()  ...  >>> Person.createTable()</pre>    <p></p>    <p><span style="font-weight:bold;">项目地址:</span><a style="font-weight:bold;" href="/misc/goto?guid=4958183771173060125" target="_blank">http://www.sqlobject.org/</a><br /> <br /> SQLObject 1.2.0 发布了,该版本主要改进包括:</p>    <ul>     <li>Strings are treated specially in Select to allow Select(['id, 'name'], where='value = 42'). </li>     <li>ForeignKey('Table', refColumn='refcol_id') allows ForeignKey to point to a non-id<span class="truncate_more"> column. <br /> </span></li>     <li><span class="truncate_more">Support for PostgreSQL 7.* is dropped; the minimal supported version of PostgreSQL is 8.1. <br /> </span></li>     <li><span class="truncate_more">Quoting rules have changed for PostgreSQL: SQLObject uses the E'' escape string. <br /> </span></li>     <li><span class="truncate_more">A bug caused by psycopg2 recently adding a new Boolean non-callable autocommit attribute was fixed. <br /> </span></li>     <li><span class="truncate_more">sqlobject.__doc__ and main.__doc__ no longer contain the version number: use sqlobject.version or version_info<br /> </span></li>    </ul>    <p></p>