[SQL-CVS] r174 - in trunk/SQLObject: docs sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2004-08-18 00:39:58
|
Author: ianb Date: 2004-08-17 16:31:15 -0400 (Tue, 17 Aug 2004) New Revision: 174 Modified: trunk/SQLObject/docs/News.txt trunk/SQLObject/sqlobject/col.py Log: Allow non-SQL-safe column names (like '"binary"'). SF 826079 Modified: trunk/SQLObject/docs/News.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/SQLObject/docs/News.txt 2004-08-17 20:27:30 UTC (rev 173) +++ trunk/SQLObject/docs/News.txt 2004-08-17 20:31:15 UTC (rev 174) @@ -19,20 +19,27 @@ which ``syncUpdate`` does not do). When enabled, instances have a property ``dirty``, which indicates if they have pending updates. Inserts are still done immediately. + * Separated database drivers (PostgresConnection, MySQLConnection, etc.) into separate packages. You can access the driver through URIs, like ``mysql://user:pass@host/dbname`` -- to set drivers after class creation you should use `sqlobject.dbconnection.openURI()`. + * The ``SQLObject`` package has been renamed to ``sqlobject``. This makes it similar to several other packages, and emphasizes the distinction between the ``sqlobject`` package and the ``SQLObject`` class. + * Class instantiation now creates new rows (like `.new()` used to do), and the `.get()` method now retrieves objects that already have rows (like class instantiation used to do). + * We're now using a Subversion repository instead of CVS. It is located at svn://colorstudy.com/trunk/SQLObject=20 =20 +* If you pass ``forceDBName=3DTrue`` to the `*Col` constructors, then + your column name doesn't have to be restricted to a-z, 0-9, and _. + Bugs ---- =20 Modified: trunk/SQLObject/sqlobject/col.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/SQLObject/sqlobject/col.py 2004-08-17 20:27:30 UTC (rev 173) +++ trunk/SQLObject/sqlobject/col.py 2004-08-17 20:31:15 UTC (rev 174) @@ -39,14 +39,16 @@ immutable=3DFalse, cascade=3DNone, lazy=3DFalse, - noCache=3DFalse): + noCache=3DFalse, + forceDBName=3DFalse): =20 # This isn't strictly true, since we *could* use backquotes or # " or something (database-specific) around column names, but # why would anyone *want* to use a name like that? # @@: I suppose we could actually add backquotes to the # dbName if we needed to... - assert sqlbuilder.sqlIdentifier(name), 'Name must be SQL-safe (l= etters, numbers, underscores): %s' \ + if not forceDBName: + assert sqlbuilder.sqlIdentifier(name), 'Name must be SQL-saf= e (letters, numbers, underscores): %s (or use forceDBName=3DTrue)' \ % repr(name) assert name !=3D 'id', 'The column name "id" is reserved for SQL= Object use (and is implicitly created).' assert name, "You must provide a name for all columns" |