sqlobject-cvs Mailing List for SQLObject (Page 182)
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(9) |
Apr
(74) |
May
(29) |
Jun
(16) |
Jul
(28) |
Aug
(10) |
Sep
(57) |
Oct
(9) |
Nov
(29) |
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(7) |
Feb
(14) |
Mar
(6) |
Apr
(3) |
May
(12) |
Jun
(34) |
Jul
(9) |
Aug
(29) |
Sep
(22) |
Oct
(2) |
Nov
(15) |
Dec
(52) |
| 2005 |
Jan
(47) |
Feb
(78) |
Mar
(14) |
Apr
(35) |
May
(33) |
Jun
(16) |
Jul
(26) |
Aug
(63) |
Sep
(40) |
Oct
(96) |
Nov
(96) |
Dec
(123) |
| 2006 |
Jan
(159) |
Feb
(144) |
Mar
(64) |
Apr
(31) |
May
(88) |
Jun
(48) |
Jul
(16) |
Aug
(64) |
Sep
(87) |
Oct
(92) |
Nov
(56) |
Dec
(76) |
| 2007 |
Jan
(94) |
Feb
(103) |
Mar
(126) |
Apr
(123) |
May
(85) |
Jun
(11) |
Jul
(130) |
Aug
(47) |
Sep
(65) |
Oct
(70) |
Nov
(12) |
Dec
(11) |
| 2008 |
Jan
(30) |
Feb
(55) |
Mar
(88) |
Apr
(20) |
May
(50) |
Jun
|
Jul
(38) |
Aug
(1) |
Sep
(9) |
Oct
(5) |
Nov
(6) |
Dec
(39) |
| 2009 |
Jan
(8) |
Feb
(16) |
Mar
(3) |
Apr
(33) |
May
(44) |
Jun
(1) |
Jul
(10) |
Aug
(33) |
Sep
(74) |
Oct
(22) |
Nov
|
Dec
(15) |
| 2010 |
Jan
(28) |
Feb
(22) |
Mar
(46) |
Apr
(29) |
May
(1) |
Jun
(1) |
Jul
(27) |
Aug
(8) |
Sep
(5) |
Oct
(33) |
Nov
(24) |
Dec
(41) |
| 2011 |
Jan
(4) |
Feb
(12) |
Mar
(35) |
Apr
(29) |
May
(19) |
Jun
(16) |
Jul
(32) |
Aug
(25) |
Sep
(5) |
Oct
(11) |
Nov
(21) |
Dec
(12) |
| 2012 |
Jan
(3) |
Feb
(4) |
Mar
(20) |
Apr
(4) |
May
(25) |
Jun
(13) |
Jul
|
Aug
|
Sep
(2) |
Oct
(25) |
Nov
(9) |
Dec
(1) |
| 2013 |
Jan
(6) |
Feb
(8) |
Mar
|
Apr
(10) |
May
(31) |
Jun
(7) |
Jul
(18) |
Aug
(33) |
Sep
(4) |
Oct
(16) |
Nov
|
Dec
(27) |
| 2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(11) |
May
(39) |
Jun
(8) |
Jul
(11) |
Aug
(4) |
Sep
|
Oct
(27) |
Nov
|
Dec
(71) |
| 2015 |
Jan
(17) |
Feb
(47) |
Mar
(33) |
Apr
|
May
|
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(8) |
| 2016 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
|
May
(12) |
Jun
(7) |
Jul
(9) |
Aug
(31) |
Sep
(8) |
Oct
(3) |
Nov
(15) |
Dec
(1) |
| 2017 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(8) |
May
(10) |
Jun
(4) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(4) |
Dec
(5) |
| 2018 |
Jan
(2) |
Feb
(8) |
Mar
|
Apr
(4) |
May
|
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
(1) |
Feb
(16) |
Mar
(1) |
Apr
(3) |
May
(5) |
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
| 2021 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(1) |
Nov
(1) |
Dec
(4) |
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
|
| 2024 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(9) |
| 2025 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
|
From: <dre...@us...> - 2003-12-03 21:58:10
|
Update of /cvsroot/sqlobject/SQLObject/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv3728/tests
Modified Files:
Tag: cascadegeddon-branch
SQLObjectTest.py test.py
Log Message:
Implemented cascade deletes and restriction of deletes. For postgres, it does create a column restriction as well. XXX destroySelf always tries to do the manual delete, even though postgres will do the dirty job for us. Tested with Postgres and SQLLite, all tests pass
Index: SQLObjectTest.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/tests/SQLObjectTest.py,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -C2 -d -r1.18 -r1.18.2.1
*** SQLObjectTest.py 1 Oct 2003 01:53:48 -0000 1.18
--- SQLObjectTest.py 3 Dec 2003 21:58:05 -0000 1.18.2.1
***************
*** 104,109 ****
__connection__.query(c.drop)
elif hasattr(c, 'dropTable'):
! c.dropTable(ifExists=True)
!
if hasattr(c, '%sCreate' % self.databaseName):
if not __connection__.tableExists(c._table):
--- 104,109 ----
__connection__.query(c.drop)
elif hasattr(c, 'dropTable'):
! c.dropTable(ifExists=True, cascade=True)
!
if hasattr(c, '%sCreate' % self.databaseName):
if not __connection__.tableExists(c._table):
Index: test.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/tests/test.py,v
retrieving revision 1.34
retrieving revision 1.34.2.1
diff -C2 -d -r1.34 -r1.34.2.1
*** test.py 4 Nov 2003 02:28:35 -0000 1.34
--- test.py 3 Dec 2003 21:58:05 -0000 1.34.2.1
***************
*** 120,123 ****
--- 120,241 ----
self.assertEqual(tcc2.other, tc4a)
+ class TestSO5(SQLObject):
+ name = StringCol(length=10, dbName='name_col')
+ other = ForeignKey('TestSO6', default=None, cascade=True)
+ another = ForeignKey('TestSO7', default=None, cascade=True)
+
+ class TestSO6(SQLObject):
+ name = StringCol(length=10, dbName='name_col')
+ other = ForeignKey('TestSO7', default=None, cascade=True)
+
+ class TestSO7(SQLObject):
+ name = StringCol(length=10, dbName='name_col')
+
+ class TestCase567(SQLObjectTest):
+
+ classes = [TestSO7, TestSO6, TestSO5]
+
+ def testForeignKeyDestroySelfCascade(self):
+ tc5 = TestSO5.new(name='a')
+ tc6a = TestSO6.new(name='1')
+ tc5.other = tc6a
+ tc7a = TestSO7.new(name='2')
+ tc6a.other = tc7a
+ tc5.another = tc7a
+ self.assertEqual(tc5.other, tc6a)
+ self.assertEqual(tc5.otherID, tc6a.id)
+ self.assertEqual(tc6a.other, tc7a)
+ self.assertEqual(tc6a.otherID, tc7a.id)
+ self.assertEqual(tc5.other.other, tc7a)
+ self.assertEqual(tc5.other.otherID, tc7a.id)
+ self.assertEqual(tc5.another, tc7a)
+ self.assertEqual(tc5.anotherID, tc7a.id)
+ self.assertEqual(tc5.other.other, tc5.another)
+ self.assertEqual(TestSO5.select().count(), 1)
+ self.assertEqual(TestSO6.select().count(), 1)
+ self.assertEqual(TestSO7.select().count(), 1)
+ tc6b = TestSO6.new(name='3')
+ tc6c = TestSO6.new(name='4')
+ tc7b = TestSO7.new(name='5')
+ tc6b.other = tc7b
+ tc6c.other = tc7b
+ self.assertEqual(TestSO5.select().count(), 1)
+ self.assertEqual(TestSO6.select().count(), 3)
+ self.assertEqual(TestSO7.select().count(), 2)
+ tc6b.destroySelf()
+ self.assertEqual(TestSO5.select().count(), 1)
+ self.assertEqual(TestSO6.select().count(), 2)
+ self.assertEqual(TestSO7.select().count(), 2)
+ tc7b.destroySelf()
+ self.assertEqual(TestSO5.select().count(), 1)
+ self.assertEqual(TestSO6.select().count(), 1)
+ self.assertEqual(TestSO7.select().count(), 1)
+ tc7a.destroySelf()
+ self.assertEqual(TestSO5.select().count(), 0)
+ self.assertEqual(TestSO6.select().count(), 0)
+ self.assertEqual(TestSO7.select().count(), 0)
+
+ def testForeignKeyDropTableCascade(self):
+ tc5a = TestSO5.new(name='a')
+ tc6a = TestSO6.new(name='1')
+ tc5a.other = tc6a
+ tc7a = TestSO7.new(name='2')
+ tc6a.other = tc7a
+ tc5a.another = tc7a
+ tc5b = TestSO5.new(name='b')
+ tc5c = TestSO5.new(name='c')
+ tc6b = TestSO6.new(name='3')
+ tc5c.other = tc6b
+ self.assertEqual(TestSO5.select().count(), 3)
+ self.assertEqual(TestSO6.select().count(), 2)
+ self.assertEqual(TestSO7.select().count(), 1)
+ TestSO7.dropTable(cascade=True)
+ self.assertEqual(TestSO5.select().count(), 3)
+ self.assertEqual(TestSO6.select().count(), 2)
+ tc6a.destroySelf()
+ self.assertEqual(TestSO5.select().count(), 2)
+ self.assertEqual(TestSO6.select().count(), 1)
+ tc6b.destroySelf()
+ self.assertEqual(TestSO5.select().count(), 1)
+ self.assertEqual(TestSO6.select().count(), 0)
+ self.assertEqual(iter(TestSO5.select()).next(), tc5b)
+ tc6c = TestSO6.new(name='3')
+ tc5b.other = tc6c
+ self.assertEqual(TestSO5.select().count(), 1)
+ self.assertEqual(TestSO6.select().count(), 1)
+ tc6c.destroySelf()
+ self.assertEqual(TestSO5.select().count(), 0)
+ self.assertEqual(TestSO6.select().count(), 0)
+
+ class TestSO8(SQLObject):
+ name = StringCol(length=10, dbName='name_col')
+ other = ForeignKey('TestSO9', default=None, cascade=False)
+
+ class TestSO9(SQLObject):
+ name = StringCol(length=10, dbName='name_col')
+
+ class TestCase89(SQLObjectTest):
+
+ classes = [TestSO9, TestSO8]
+
+ def testForeignKeyDestroySelfRestrict(self):
+ tc8a = TestSO8.new(name='a')
+ tc9a = TestSO9.new(name='1')
+ tc8a.other = tc9a
+ tc8b = TestSO8.new(name='b')
+ tc9b = TestSO9.new(name='2')
+ self.assertEqual(tc8a.other, tc9a)
+ self.assertEqual(tc8a.otherID, tc9a.id)
+ self.assertEqual(TestSO8.select().count(), 2)
+ self.assertEqual(TestSO9.select().count(), 2)
+ self.assertRaises(Exception, tc9a.destroySelf)
+ tc9b.destroySelf()
+ self.assertEqual(TestSO8.select().count(), 2)
+ self.assertEqual(TestSO9.select().count(), 1)
+ tc8a.destroySelf()
+ tc8b.destroySelf()
+ tc9a.destroySelf()
+ self.assertEqual(TestSO8.select().count(), 0)
+ self.assertEqual(TestSO9.select().count(), 0)
########################################
|
|
From: <dre...@us...> - 2003-12-03 21:58:10
|
Update of /cvsroot/sqlobject/SQLObject/SQLObject
In directory sc8-pr-cvs1:/tmp/cvs-serv3728/SQLObject
Modified Files:
Tag: cascadegeddon-branch
Col.py DBConnection.py SQLObject.py
Log Message:
Implemented cascade deletes and restriction of deletes. For postgres, it does create a column restriction as well. XXX destroySelf always tries to do the manual delete, even though postgres will do the dirty job for us. Tested with Postgres and SQLLite, all tests pass
Index: Col.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/Col.py,v
retrieving revision 1.32
retrieving revision 1.32.2.1
diff -C2 -d -r1.32 -r1.32.2.1
*** Col.py 12 Nov 2003 17:04:55 -0000 1.32
--- Col.py 3 Dec 2003 21:58:04 -0000 1.32.2.1
***************
*** 34,38 ****
columnDef=None,
validator=None,
! immutable=False):
# This isn't strictly true, since we *could* use backquotes or
--- 34,39 ----
columnDef=None,
validator=None,
! immutable=False,
! cascade=None):
# This isn't strictly true, since we *could* use backquotes or
***************
*** 50,53 ****
--- 51,60 ----
self.immutable = immutable
+ # cascade can be one of:
+ # None: no constraint is generated
+ # True: a CASCADE constraint is generated
+ # False: a RESTRICT constraint is generated
+ self.cascade = cascade
+
if type(constraints) not in (type([]), type(())):
constraints = [constraints]
***************
*** 343,346 ****
--- 350,372 ----
kw['name'] = style.instanceAttrToIDAttr(kw['name'])
SOKeyCol.__init__(self, **kw)
+
+ def postgresCreateSQL(self):
+ from SQLObject import findClass
+ sql = SOKeyCol.postgresCreateSQL(self)
+ if self.cascade is not None:
+ other = findClass(self.foreignKey)
+ tName = other._table
+ idName = other._idName
+ action = self.cascade and 'CASCADE' or 'RESTRICT'
+ constraint = ('CONSTRAINT %(tName)s_exists '
+ 'FOREIGN KEY(%(colName)s) '
+ 'REFERENCES %(tName)s(%(idName)s) '
+ 'ON DELETE %(action)s' %
+ {'tName':tName,
+ 'colName':self.dbName,
+ 'idName':idName,
+ 'action':action})
+ sql = ', '.join([sql, constraint])
+ return sql
class ForeignKey(KeyCol):
Index: DBConnection.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/DBConnection.py,v
retrieving revision 1.55
retrieving revision 1.55.2.1
diff -C2 -d -r1.55 -r1.55.2.1
*** DBConnection.py 12 Nov 2003 17:06:34 -0000 1.55
--- DBConnection.py 3 Dec 2003 21:58:05 -0000 1.55.2.1
***************
*** 279,283 ****
assert 0, "Implement in subclasses"
! def dropTable(self, tableName):
self.query("DROP TABLE %s" % tableName)
--- 279,283 ----
assert 0, "Implement in subclasses"
! def dropTable(self, tableName, cascade=False):
self.query("DROP TABLE %s" % tableName)
***************
*** 606,609 ****
--- 606,613 ----
return '%s SERIAL PRIMARY KEY' % soClass._idName
+ def dropTable(self, tableName, cascade=False):
+ self.query("DROP TABLE %s %s" % (tableName,
+ cascade and 'CASCADE' or ''))
+
def joinSQLType(self, join):
return 'INT NOT NULL'
***************
*** 860,864 ****
column.firebirdCreateSQL()))
! def dropTable(self, tableName):
self.query("DROP TABLE %s" % tableName)
self.query("DROP GENERATOR GEN_%s" % tableName)
--- 864,868 ----
column.firebirdCreateSQL()))
! def dropTable(self, tableName, cascade=False):
self.query("DROP TABLE %s" % tableName)
self.query("DROP GENERATOR GEN_%s" % tableName)
***************
*** 1092,1096 ****
self._meta["%s.id" % soClass._table] = "1"
! def dropTable(self, tableName):
try:
del self._meta["%s.id" % tableName]
--- 1096,1100 ----
self._meta["%s.id" % soClass._table] = "1"
! def dropTable(self, tableName, cascade=False):
try:
del self._meta["%s.id" % tableName]
Index: SQLObject.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/SQLObject.py,v
retrieving revision 1.64
retrieving revision 1.64.2.1
diff -C2 -d -r1.64 -r1.64.2.1
*** SQLObject.py 12 Nov 2003 17:06:00 -0000 1.64
--- SQLObject.py 3 Dec 2003 21:58:05 -0000 1.64.2.1
***************
*** 37,40 ****
--- 37,41 ----
class SQLObjectNotFound(LookupError): pass
+ class SQLObjectIntegrityError(Exception): pass
True, False = 1==1, 0==1
***************
*** 312,315 ****
--- 313,329 ----
return classRegistry[registry][name]
+ def findDependencies(name, registry=None):
+ depends = []
+ for n, klass in classRegistry[registry].items():
+ if findDependantColumns(name, klass):
+ depends.append(klass)
+ return depends
+
+ def findDependantColumns(name, klass):
+ depends = []
+ for col in klass._SO_columns:
+ if col.foreignKey == name and col.cascade is not None:
+ depends.append(col)
+ return depends
class CreateNewSQLObject:
***************
*** 933,936 ****
--- 947,954 ----
_SO_fetchAlternateID = classmethod(_SO_fetchAlternateID)
+ def _SO_depends(cls):
+ return findDependencies(cls.__name__, cls._registry)
+ _SO_depends = classmethod(_SO_depends)
+
def select(cls, clause=None, clauseTables=None,
orderBy=NoDefault, limit=None,
***************
*** 952,959 ****
# 3-03 @@: Should these have a connection argument?
! def dropTable(cls, ifExists=False, dropJoinTables=True):
if ifExists and not cls._connection.tableExists(cls._table):
return
! cls._connection.dropTable(cls._table)
if dropJoinTables:
cls.dropJoinTables(ifExists=ifExists)
--- 970,977 ----
# 3-03 @@: Should these have a connection argument?
! def dropTable(cls, ifExists=False, dropJoinTables=True, cascade=False):
if ifExists and not cls._connection.tableExists(cls._table):
return
! cls._connection.dropTable(cls._table, cascade)
if dropJoinTables:
cls.dropJoinTables(ifExists=ifExists)
***************
*** 1010,1013 ****
--- 1028,1054 ----
def destroySelf(self):
# Kills this object. Kills it dead!
+ depends = []
+ klass = self.__class__
+ depends = self._SO_depends()
+ for k in depends:
+ cols = findDependantColumns(klass.__name__, k)
+ query = []
+ restrict = False
+ for col in cols:
+ if col.cascade == False:
+ # Found a restriction
+ restrict = True
+ query.append("%s = %s" % (col.dbName, self.id))
+ query = ' OR '.join(query)
+ results = k.select(query)
+ if restrict and results.count():
+ # Restrictions only apply if there are
+ # matching records on the related table
+ raise SQLObjectIntegrityError, (
+ "Tried to delete %s::%s but "
+ "table %s has a restriction against it" %
+ (klass.__name__, self.id, k.__name__))
+ for row in results:
+ row.destroySelf()
self._SO_obsolete = True
self._connection._SO_delete(self)
|
|
From: <ian...@us...> - 2003-11-30 21:46:14
|
Update of /cvsroot/sqlobject/SQLObject/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv7708/examples
Modified Files:
codebits.py
Log Message:
Added a little more documentation about count(), and an example
Index: codebits.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/examples/codebits.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** codebits.py 7 Sep 2003 19:14:43 -0000 1.3
--- codebits.py 30 Nov 2003 21:46:11 -0000 1.4
***************
*** 247,248 ****
--- 247,258 ----
return self._SO_get_data().decode('base64')
## end snippet
+
+ ## Snippet "slicing-batch"
+ start = 20
+ size = 10
+ query = Table.select()
+ results = query[start:start+size]
+ total = query.count()
+ print "Showing page %i of %i" % (start/size + 1, total/size + 1)
+ ## end snippet
+
|
|
From: <ian...@us...> - 2003-11-30 21:46:14
|
Update of /cvsroot/sqlobject/SQLObject/docs In directory sc8-pr-cvs1:/tmp/cvs-serv7708/docs Modified Files: SQLObject.txt Log Message: Added a little more documentation about count(), and an example Index: SQLObject.txt =================================================================== RCS file: /cvsroot/sqlobject/SQLObject/docs/SQLObject.txt,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** SQLObject.txt 12 Nov 2003 17:09:52 -0000 1.18 --- SQLObject.txt 30 Nov 2003 21:46:11 -0000 1.19 *************** *** 390,396 **** negative indexes. ! You can get the length of the result without fetching all the results. ! A ``COUNT(*)`` query is used. Together with slicing, this makes ! batched queries easy to write. For more information on the where clause in the queries, see the --- 390,401 ---- negative indexes. ! You can get the length of the result without fetching all the results ! by calling ``count`` on the result object, like ! ``MyClass.select().count()``. A ``COUNT(*)`` query is used -- the ! actual objects are not fetched from the database. Together with ! slicing, this makes batched queries easy to write: ! ! .. raw:: html ! :file: ../examples/snippets/slicing-batch.html For more information on the where clause in the queries, see the |
|
From: <ian...@us...> - 2003-11-30 21:45:47
|
Update of /cvsroot/sqlobject/SQLObject In directory sc8-pr-cvs1:/tmp/cvs-serv7651 Modified Files: README.txt Log Message: Updated version Index: README.txt =================================================================== RCS file: /cvsroot/sqlobject/SQLObject/README.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** README.txt 1 Jul 2003 00:13:04 -0000 1.4 --- README.txt 30 Nov 2003 21:45:44 -0000 1.5 *************** *** 1,5 **** ! ============= ! SQLObject 0.4 ! ============= :Author: Ian Bicking --- 1,5 ---- ! =============== ! SQLObject 0.5.1 ! =============== :Author: Ian Bicking *************** *** 13,17 **** It absolutely requires Python 2.2 or higher. It currently supports MySQL through the `MySQLdb` package, PostgreSQL through the ! `psycopg` package, SQLite, and a DBM-based backend. For more information please see the documentation in --- 13,17 ---- It absolutely requires Python 2.2 or higher. It currently supports MySQL through the `MySQLdb` package, PostgreSQL through the ! `psycopg` package, SQLite, Firebird, and a DBM-based backend. For more information please see the documentation in |
|
From: <ian...@us...> - 2003-11-12 17:29:12
|
Update of /cvsroot/sqlobject/SOWeb/docs In directory sc8-pr-cvs1:/tmp/cvs-serv21910/docs Modified Files: News.html News.txt SQLObject.html SQLObject.txt default.css Log Message: updated for 0.5.1 Index: News.html =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/News.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** News.html 1 Nov 2003 20:34:42 -0000 1.5 --- News.html 12 Nov 2003 17:29:08 -0000 1.6 *************** *** 14,45 **** <p class="topic-title"><a name="contents">Contents:</a></p> <ul class="simple"> ! <li><a class="reference" href="#sqlobject-0-5" id="id7" name="id7">SQLObject 0.5</a><ul> ! <li><a class="reference" href="#features" id="id8" name="id8">Features</a></li> ! <li><a class="reference" href="#interface-changes" id="id9" name="id9">Interface Changes</a></li> ! <li><a class="reference" href="#bugs" id="id10" name="id10">Bugs</a></li> </ul> </li> ! <li><a class="reference" href="#sqlobject-0-4" id="id11" name="id11">SQLObject 0.4</a><ul> ! <li><a class="reference" href="#id1" id="id12" name="id12">Features</a><ul> ! <li><a class="reference" href="#col-and-join" id="id13" name="id13">Col and Join</a></li> </ul> </li> ! <li><a class="reference" href="#id2" id="id14" name="id14">Bugs</a></li> ! <li><a class="reference" href="#internal" id="id15" name="id15">Internal</a></li> </ul> </li> ! <li><a class="reference" href="#sqlobject-0-3" id="id16" name="id16">SQLObject 0.3</a><ul> ! <li><a class="reference" href="#id3" id="id17" name="id17">Features</a></li> ! <li><a class="reference" href="#id4" id="id18" name="id18">Bugs</a></li> </ul> </li> ! <li><a class="reference" href="#sqlobject-0-2-1" id="id19" name="id19">SQLObject 0.2.1</a><ul> ! <li><a class="reference" href="#id5" id="id20" name="id20">Bugs</a></li> ! <li><a class="reference" href="#id6" id="id21" name="id21">Features</a></li> </ul> </li> </ul> </div> ! <a class="target" id="start" name="start"></a><div class="section" id="sqlobject-0-5"> <h1><a name="sqlobject-0-5">SQLObject 0.5</a></h1> <p>Released: 1-Nov-2003</p> --- 14,72 ---- <p class="topic-title"><a name="contents">Contents:</a></p> <ul class="simple"> ! <li><a class="reference" href="#sqlobject-0-5-1" id="id9" name="id9">SQLObject 0.5.1</a><ul> ! <li><a class="reference" href="#interface-changes" id="id10" name="id10">Interface Changes</a></li> ! <li><a class="reference" href="#bugs" id="id11" name="id11">Bugs</a></li> </ul> </li> ! <li><a class="reference" href="#sqlobject-0-5" id="id12" name="id12">SQLObject 0.5</a><ul> ! <li><a class="reference" href="#features" id="id13" name="id13">Features</a></li> ! <li><a class="reference" href="#id1" id="id14" name="id14">Interface Changes</a></li> ! <li><a class="reference" href="#id2" id="id15" name="id15">Bugs</a></li> </ul> </li> ! <li><a class="reference" href="#sqlobject-0-4" id="id16" name="id16">SQLObject 0.4</a><ul> ! <li><a class="reference" href="#id3" id="id17" name="id17">Features</a><ul> ! <li><a class="reference" href="#col-and-join" id="id18" name="id18">Col and Join</a></li> </ul> </li> ! <li><a class="reference" href="#id4" id="id19" name="id19">Bugs</a></li> ! <li><a class="reference" href="#internal" id="id20" name="id20">Internal</a></li> </ul> </li> ! <li><a class="reference" href="#sqlobject-0-3" id="id21" name="id21">SQLObject 0.3</a><ul> ! <li><a class="reference" href="#id5" id="id22" name="id22">Features</a></li> ! <li><a class="reference" href="#id6" id="id23" name="id23">Bugs</a></li> ! </ul> ! </li> ! <li><a class="reference" href="#sqlobject-0-2-1" id="id24" name="id24">SQLObject 0.2.1</a><ul> ! <li><a class="reference" href="#id7" id="id25" name="id25">Bugs</a></li> ! <li><a class="reference" href="#id8" id="id26" name="id26">Features</a></li> </ul> </li> </ul> </div> ! <a class="target" id="start" name="start"></a><div class="section" id="sqlobject-0-5-1"> ! <h1><a name="sqlobject-0-5-1">SQLObject 0.5.1</a></h1> ! <p>Released: 12-Nov-2003</p> ! <div class="section" id="interface-changes"> ! <h2><a name="interface-changes">Interface Changes</a></h2> ! <ul class="simple"> ! <li>Select results no longer have a __len__ method (i.e., you can't do ! <tt class="literal"><span class="pre">len(Person.select(Person.q.firstName=='Bob'))</span></tt>). There is now a ! <tt class="literal"><span class="pre">.count()</span></tt> method instead. <tt class="literal"><span class="pre">__len__</span></tt> gets called implicitly in ! several circumstances, like <tt class="literal"><span class="pre">list()</span></tt>, which causes potentially ! expensive queries to <tt class="literal"><span class="pre">COUNT(*)</span></tt>.</li> ! </ul> ! </div> ! <div class="section" id="bugs"> ! <h2><a name="bugs">Bugs</a></h2> ! <ul class="simple"> ! <li>Objects retrieved from a join now respect the transaction context of ! the original instance.</li> ! <li><tt class="literal"><span class="pre">.select().reversed()</span></tt> works.</li> ! </ul> ! </div> ! </div> ! <div class="section" id="sqlobject-0-5"> <h1><a name="sqlobject-0-5">SQLObject 0.5</a></h1> <p>Released: 1-Nov-2003</p> *************** *** 62,67 **** </ul> </div> ! <div class="section" id="interface-changes"> ! <h2><a name="interface-changes">Interface Changes</a></h2> <ul class="simple"> <li><cite>SQLBuilder.sqlRepr</cite> renamed to <cite>SQLBuilder.sqlrepr</cite>, signature --- 89,94 ---- </ul> </div> ! <div class="section" id="id1"> ! <h2><a name="id1">Interface Changes</a></h2> <ul class="simple"> <li><cite>SQLBuilder.sqlRepr</cite> renamed to <cite>SQLBuilder.sqlrepr</cite>, signature *************** *** 80,85 **** </ul> </div> ! <div class="section" id="bugs"> ! <h2><a name="bugs">Bugs</a></h2> <ul class="simple"> <li>Released all locks with <tt class="literal"><span class="pre">finally:</span></tt>, so that bugs won't cause --- 107,112 ---- </ul> </div> ! <div class="section" id="id2"> ! <h2><a name="id2">Bugs</a></h2> <ul class="simple"> <li>Released all locks with <tt class="literal"><span class="pre">finally:</span></tt>, so that bugs won't cause *************** *** 94,99 **** <div class="section" id="sqlobject-0-4"> <h1><a name="sqlobject-0-4">SQLObject 0.4</a></h1> ! <div class="section" id="id1"> ! <h2><a name="id1">Features</a></h2> <ul> <li><p class="first">You can specify columns in a new, preferred manner:</p> --- 121,126 ---- <div class="section" id="sqlobject-0-4"> <h1><a name="sqlobject-0-4">SQLObject 0.4</a></h1> ! <div class="section" id="id3"> ! <h2><a name="id3">Features</a></h2> <ul> <li><p class="first">You can specify columns in a new, preferred manner:</p> *************** *** 182,187 **** </div> </div> ! <div class="section" id="id2"> ! <h2><a name="id2">Bugs</a></h2> <ul class="simple"> <li><cite>DateTimeCol</cite> uses <tt class="literal"><span class="pre">TIMESTAMP</span></tt> for Postgres. Note that the --- 209,214 ---- </div> </div> ! <div class="section" id="id4"> ! <h2><a name="id4">Bugs</a></h2> <ul class="simple"> <li><cite>DateTimeCol</cite> uses <tt class="literal"><span class="pre">TIMESTAMP</span></tt> for Postgres. Note that the *************** *** 222,227 **** <div class="section" id="sqlobject-0-3"> <h1><a name="sqlobject-0-3">SQLObject 0.3</a></h1> ! <div class="section" id="id3"> ! <h2><a name="id3">Features</a></h2> <ul class="simple"> <li>Table creation (SQL schema generation) via new class method --- 249,254 ---- <div class="section" id="sqlobject-0-3"> <h1><a name="sqlobject-0-3">SQLObject 0.3</a></h1> ! <div class="section" id="id5"> ! <h2><a name="id5">Features</a></h2> <ul class="simple"> <li>Table creation (SQL schema generation) via new class method *************** *** 250,255 **** </ul> </div> ! <div class="section" id="id4"> ! <h2><a name="id4">Bugs</a></h2> <ul class="simple"> <li>LIMIT/OFFSET (select result slicing) works in Postgres and SQLite.</li> --- 277,282 ---- </ul> </div> ! <div class="section" id="id6"> ! <h2><a name="id6">Bugs</a></h2> <ul class="simple"> <li>LIMIT/OFFSET (select result slicing) works in Postgres and SQLite.</li> *************** *** 262,273 **** <div class="section" id="sqlobject-0-2-1"> <h1><a name="sqlobject-0-2-1">SQLObject 0.2.1</a></h1> ! <div class="section" id="id5"> ! <h2><a name="id5">Bugs</a></h2> <ul class="simple"> <li>Fixed caching of new objects</li> </ul> </div> ! <div class="section" id="id6"> ! <h2><a name="id6">Features</a></h2> <ul class="simple"> <li><a class="reference" href="http://sqlite.org/">SQLite</a> support</li> --- 289,300 ---- <div class="section" id="sqlobject-0-2-1"> <h1><a name="sqlobject-0-2-1">SQLObject 0.2.1</a></h1> ! <div class="section" id="id7"> ! <h2><a name="id7">Bugs</a></h2> <ul class="simple"> <li>Fixed caching of new objects</li> </ul> </div> ! <div class="section" id="id8"> ! <h2><a name="id8">Features</a></h2> <ul class="simple"> <li><a class="reference" href="http://sqlite.org/">SQLite</a> support</li> Index: News.txt =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/News.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** News.txt 1 Nov 2003 20:34:42 -0000 1.4 --- News.txt 12 Nov 2003 17:29:09 -0000 1.5 *************** *** 8,11 **** --- 8,32 ---- .. _start: + SQLObject 0.5.1 + =============== + + Released: 12-Nov-2003 + + Interface Changes + ----------------- + + * Select results no longer have a __len__ method (i.e., you can't do + ``len(Person.select(Person.q.firstName=='Bob'))``). There is now a + ``.count()`` method instead. ``__len__`` gets called implicitly in + several circumstances, like ``list()``, which causes potentially + expensive queries to ``COUNT(*)``. + + Bugs + ---- + + * Objects retrieved from a join now respect the transaction context of + the original instance. + * ``.select().reversed()`` works. + SQLObject 0.5 ============= Index: SQLObject.html =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/SQLObject.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SQLObject.html 1 Nov 2003 20:34:42 -0000 1.7 --- SQLObject.html 12 Nov 2003 17:29:09 -0000 1.8 *************** *** 483,492 **** (again, they are automatically picked up when using <tt class="literal"><span class="pre">q</span></tt>). The table you're selecting is always assumed to be included, of course.</p> ! <a class="target" id="orderby" name="orderby"></a><p>You can use the keyword arguments <cite>orderBy</cite> and <cite>groupBy</cite> to create ! <tt class="literal"><span class="pre">ORDER</span> <span class="pre">BY</span></tt> and <tt class="literal"><span class="pre">GROUP</span> <span class="pre">BY</span></tt> in the select statements: <cite>orderBy</cite> ! takes a string, which should be the <em>database</em> name of the column, or ! a column in the form <tt class="literal"><span class="pre">Person.q.firstName</span></tt>; <cite>groupBy</cite> is similar. ! Both accept lists or tuples of arguments. You can use <tt class="literal"><span class="pre">"-colname"</span></tt> ! to specify descending order, or call <tt class="literal"><span class="pre">MyClass.select().reversed()</span></tt>.</p> <p>You can use the special class variable <cite>_defaultOrder</cite> to give a default ordering for all selects. To get an unordered result when --- 483,492 ---- (again, they are automatically picked up when using <tt class="literal"><span class="pre">q</span></tt>). The table you're selecting is always assumed to be included, of course.</p> ! <a class="target" id="orderby" name="orderby"></a><p>You can use the keyword arguments <cite>orderBy</cite> to create <tt class="literal"><span class="pre">ORDER</span> <span class="pre">BY</span></tt> in ! the select statements: <cite>orderBy</cite> takes a string, which should be the ! <em>database</em> name of the column, or a column in the form ! <tt class="literal"><span class="pre">Person.q.firstName</span></tt>; <cite>groupBy</cite> is similar. Both accept lists or ! tuples of arguments. You can use <tt class="literal"><span class="pre">"-colname"</span></tt> to specify descending ! order, or call <tt class="literal"><span class="pre">MyClass.select().reversed()</span></tt>.</p> <p>You can use the special class variable <cite>_defaultOrder</cite> to give a default ordering for all selects. To get an unordered result when Index: SQLObject.txt =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/SQLObject.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SQLObject.txt 1 Nov 2003 20:34:42 -0000 1.6 --- SQLObject.txt 12 Nov 2003 17:29:09 -0000 1.7 *************** *** 365,374 **** .. _orderBy: ! You can use the keyword arguments `orderBy` and `groupBy` to create ! ``ORDER BY`` and ``GROUP BY`` in the select statements: `orderBy` ! takes a string, which should be the *database* name of the column, or ! a column in the form ``Person.q.firstName``; `groupBy` is similar. ! Both accept lists or tuples of arguments. You can use ``"-colname"`` ! to specify descending order, or call ``MyClass.select().reversed()``. You can use the special class variable `_defaultOrder` to give a --- 365,374 ---- .. _orderBy: ! You can use the keyword arguments `orderBy` to create ``ORDER BY`` in ! the select statements: `orderBy` takes a string, which should be the ! *database* name of the column, or a column in the form ! ``Person.q.firstName``; `groupBy` is similar. Both accept lists or ! tuples of arguments. You can use ``"-colname"`` to specify descending ! order, or call ``MyClass.select().reversed()``. You can use the special class variable `_defaultOrder` to give a Index: default.css =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/default.css,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 |
|
From: <ian...@us...> - 2003-11-12 17:29:11
|
Update of /cvsroot/sqlobject/SOWeb In directory sc8-pr-cvs1:/tmp/cvs-serv21910 Modified Files: index.html index.txt Log Message: updated for 0.5.1 Index: index.html =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/index.html,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** index.html 1 Nov 2003 21:17:20 -0000 1.12 --- index.html 12 Nov 2003 17:29:08 -0000 1.13 *************** *** 23,26 **** --- 23,28 ---- <h1><a name="news">News</a></h1> <dl> + <dt>12-Nov-2003:</dt> + <dd>SQLObject 0.5.1 is released (minor bugfixes)</dd> <dt>1-Nov-2003:</dt> <dd>SQLObject 0.5 is released.</dd> *************** *** 120,126 **** <div class="section" id="download"> <h1><a name="download">Download</a></h1> ! <p><a class="reference" href="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.tar.gz?download">SQLObject-0.5.tar.gz</a></p> ! <p><a class="reference" href="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5-1.noarch.rpm?download">SQLObject-0.5-1.noarch.rpm</a></p> ! <p><a class="reference" href="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.win32.exe?download">SQLObject-0.5.win32.exe</a></p> <p>You can also use <a class="reference" href="#anonymous-cvs">anonymous CVS</a> to access the latest files. However, SourceForge is currently delaying the anonymous CVS servers --- 122,128 ---- <div class="section" id="download"> <h1><a name="download">Download</a></h1> ! <p><a class="reference" href="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.1.tar.gz?download">SQLObject-0.5.1.tar.gz</a></p> ! <p><a class="reference" href="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.1-1.noarch.rpm?download">SQLObject-0.5.1-1.noarch.rpm</a></p> ! <p><a class="reference" href="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.1.win32.exe?download">SQLObject-0.5.1.win32.exe</a></p> <p>You can also use <a class="reference" href="#anonymous-cvs">anonymous CVS</a> to access the latest files. However, SourceForge is currently delaying the anonymous CVS servers *************** *** 132,136 **** <h1><a name="documentation">Documentation</a></h1> <p><a class="reference" href="docs/FAQ.html">FAQ</a></p> ! <p><a class="reference" href="docs/News.html">New in 0.5</a></p> <p><a class="reference" href="docs/SQLObject.html">SQLObject documentation</a></p> <p><a class="reference" href="docs/SQLBuilder.html">SQLBuilder documentation</a></p> --- 134,138 ---- <h1><a name="documentation">Documentation</a></h1> <p><a class="reference" href="docs/FAQ.html">FAQ</a></p> ! <p><a class="reference" href="docs/News.html">New in 0.5.1</a></p> <p><a class="reference" href="docs/SQLObject.html">SQLObject documentation</a></p> <p><a class="reference" href="docs/SQLBuilder.html">SQLBuilder documentation</a></p> Index: index.txt =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/index.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** index.txt 1 Nov 2003 21:17:20 -0000 1.11 --- index.txt 12 Nov 2003 17:29:08 -0000 1.12 *************** *** 10,13 **** --- 10,15 ---- ==== + 12-Nov-2003: + SQLObject 0.5.1 is released (minor bugfixes) 1-Nov-2003: SQLObject 0.5 is released. *************** *** 139,153 **** ======== ! SQLObject-0.5.tar.gz__ ! __ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.tar.gz?download ! SQLObject-0.5-1.noarch.rpm__ ! __ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5-1.noarch.rpm?download ! SQLObject-0.5.win32.exe__ ! __ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.win32.exe?download You can also use `anonymous CVS`_ to access the latest files. --- 141,155 ---- ======== ! SQLObject-0.5.1.tar.gz__ ! __ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.1.tar.gz?download ! SQLObject-0.5.1-1.noarch.rpm__ ! __ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.1-1.noarch.rpm?download ! SQLObject-0.5.1.win32.exe__ ! __ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.1.win32.exe?download You can also use `anonymous CVS`_ to access the latest files. *************** *** 166,170 **** __ docs/FAQ.html ! `New in 0.5`__ __ docs/News.html --- 168,172 ---- __ docs/FAQ.html ! `New in 0.5.1`__ __ docs/News.html |
|
From: <ian...@us...> - 2003-11-12 17:11:49
|
Update of /cvsroot/sqlobject/SQLObject
In directory sc8-pr-cvs1:/tmp/cvs-serv16977
Modified Files:
setup.py
Log Message:
Ready for 0.5.1
Index: setup.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/setup.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** setup.py 1 Nov 2003 20:30:22 -0000 1.14
--- setup.py 12 Nov 2003 17:11:46 -0000 1.15
***************
*** 11,15 ****
setup(name="SQLObject",
! version="0.5",
description="Object-Relational Manager, aka database wrapper",
long_description="""\
--- 11,15 ----
setup(name="SQLObject",
! version="0.5.1",
description="Object-Relational Manager, aka database wrapper",
long_description="""\
***************
*** 32,36 ****
license="LGPL",
packages=["SQLObject", "SQLObject.include"],
! download_url="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.tar.gz?download")
# Send announce to:
--- 32,36 ----
license="LGPL",
packages=["SQLObject", "SQLObject.include"],
! download_url="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.1.tar.gz?download")
# Send announce to:
|
|
From: <ian...@us...> - 2003-11-12 17:09:58
|
Update of /cvsroot/sqlobject/SQLObject/docs In directory sc8-pr-cvs1:/tmp/cvs-serv16578 Modified Files: SQLObject.txt Log Message: Removed groupBy from the docs Index: SQLObject.txt =================================================================== RCS file: /cvsroot/sqlobject/SQLObject/docs/SQLObject.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** SQLObject.txt 1 Nov 2003 20:28:13 -0000 1.17 --- SQLObject.txt 12 Nov 2003 17:09:52 -0000 1.18 *************** *** 365,374 **** .. _orderBy: ! You can use the keyword arguments `orderBy` and `groupBy` to create ! ``ORDER BY`` and ``GROUP BY`` in the select statements: `orderBy` ! takes a string, which should be the *database* name of the column, or ! a column in the form ``Person.q.firstName``; `groupBy` is similar. ! Both accept lists or tuples of arguments. You can use ``"-colname"`` ! to specify descending order, or call ``MyClass.select().reversed()``. You can use the special class variable `_defaultOrder` to give a --- 365,374 ---- .. _orderBy: ! You can use the keyword arguments `orderBy` to create ``ORDER BY`` in ! the select statements: `orderBy` takes a string, which should be the ! *database* name of the column, or a column in the form ! ``Person.q.firstName``; `groupBy` is similar. Both accept lists or ! tuples of arguments. You can use ``"-colname"`` to specify descending ! order, or call ``MyClass.select().reversed()``. You can use the special class variable `_defaultOrder` to give a |
|
From: <ian...@us...> - 2003-11-12 17:08:32
|
Update of /cvsroot/sqlobject/SQLObject/docs
In directory sc8-pr-cvs1:/tmp/cvs-serv16377
Modified Files:
News.txt
Log Message:
updated
Index: News.txt
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/docs/News.txt,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** News.txt 4 Nov 2003 02:35:16 -0000 1.11
--- News.txt 12 Nov 2003 17:08:29 -0000 1.12
***************
*** 11,15 ****
===============
! Released: ...
Interface Changes
--- 11,15 ----
===============
! Released: 12-Nov-2003
Interface Changes
***************
*** 27,30 ****
--- 27,31 ----
* Objects retrieved from a join now respect the transaction context of
the original instance.
+ * ``.select().reversed()`` works.
SQLObject 0.5
|
|
From: <ian...@us...> - 2003-11-12 17:06:37
|
Update of /cvsroot/sqlobject/SQLObject/SQLObject
In directory sc8-pr-cvs1:/tmp/cvs-serv15994
Modified Files:
DBConnection.py
Log Message:
Removed groupBy for select()
Index: DBConnection.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/DBConnection.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** DBConnection.py 24 Oct 2003 19:18:52 -0000 1.54
--- DBConnection.py 12 Nov 2003 17:06:34 -0000 1.55
***************
*** 239,244 ****
return s
- if order and ops.get('groupBy'):
- q = "%s GROUP BY %s" % (q, clauseList(ops['groupBy']))
if order and ops.get('dbOrderBy'):
q = "%s ORDER BY %s" % (q, clauseList(ops['dbOrderBy'], ops.get('reversed', False)))
--- 239,242 ----
|
|
From: <ian...@us...> - 2003-11-12 17:06:03
|
Update of /cvsroot/sqlobject/SQLObject/SQLObject
In directory sc8-pr-cvs1:/tmp/cvs-serv15815
Modified Files:
SQLObject.py
Log Message:
* Removed __len__ on SelectResults, replace with count()
* Fixed .reverse()
* Removed groupBy options to SelectResults
Index: SQLObject.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/SQLObject.py,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** SQLObject.py 3 Nov 2003 13:20:29 -0000 1.63
--- SQLObject.py 12 Nov 2003 17:06:00 -0000 1.64
***************
*** 934,942 ****
def select(cls, clause=None, clauseTables=None,
! orderBy=NoDefault, groupBy=None, limit=None,
lazyColumns=False, reversed=False,
connection=None):
return SelectResults(cls, clause, clauseTables=clauseTables,
! orderBy=orderBy, groupBy=groupBy,
limit=limit, lazyColumns=lazyColumns,
reversed=reversed,
--- 934,942 ----
def select(cls, clause=None, clauseTables=None,
! orderBy=NoDefault, limit=None,
lazyColumns=False, reversed=False,
connection=None):
return SelectResults(cls, clause, clauseTables=clauseTables,
! orderBy=orderBy,
limit=limit, lazyColumns=lazyColumns,
reversed=reversed,
***************
*** 1111,1117 ****
return self.clone(orderBy=orderBy)
- def groupBy(self, groupBy):
- return self.clone(groupBy=groupBy)
-
def connection(self, conn):
return self.clone(connection=conn)
--- 1111,1114 ----
***************
*** 1124,1128 ****
def reversed(self):
! self.clone(reversed=not self.ops.get('reversed', False))
def __getitem__(self, value):
--- 1121,1125 ----
def reversed(self):
! return self.clone(reversed=not self.ops.get('reversed', False))
def __getitem__(self, value):
***************
*** 1179,1183 ****
return conn.iterSelect(self)
! def __len__(self):
conn = self.ops.get('connection', self.sourceClass._connection)
count = conn.countSelect(self)
--- 1176,1180 ----
return conn.iterSelect(self)
! def count(self):
conn = self.ops.get('connection', self.sourceClass._connection)
count = conn.countSelect(self)
|
|
From: <ian...@us...> - 2003-11-12 17:05:00
|
Update of /cvsroot/sqlobject/SQLObject/SQLObject
In directory sc8-pr-cvs1:/tmp/cvs-serv15649
Modified Files:
Col.py
Log Message:
Used TINYINT for BoolCol on MySQL
Index: Col.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/Col.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** Col.py 11 Oct 2003 07:39:43 -0000 1.31
--- Col.py 12 Nov 2003 17:04:55 -0000 1.32
***************
*** 293,297 ****
def _mysqlType(self):
! return "ENUM('t', 'f')"
class BoolCol(Col):
--- 293,297 ----
def _mysqlType(self):
! return "TINYINT"
class BoolCol(Col):
|
|
From: <ian...@us...> - 2003-11-04 02:35:19
|
Update of /cvsroot/sqlobject/SQLObject/docs In directory sc8-pr-cvs1:/tmp/cvs-serv2783/docs Modified Files: News.txt Log Message: Notes Index: News.txt =================================================================== RCS file: /cvsroot/sqlobject/SQLObject/docs/News.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** News.txt 1 Nov 2003 20:30:37 -0000 1.10 --- News.txt 4 Nov 2003 02:35:16 -0000 1.11 *************** *** 8,11 **** --- 8,31 ---- .. _start: + SQLObject 0.5.1 + =============== + + Released: ... + + Interface Changes + ----------------- + + * Select results no longer have a __len__ method (i.e., you can't do + ``len(Person.select(Person.q.firstName=='Bob'))``). There is now a + ``.count()`` method instead. ``__len__`` gets called implicitly in + several circumstances, like ``list()``, which causes potentially + expensive queries to ``COUNT(*)``. + + Bugs + ---- + + * Objects retrieved from a join now respect the transaction context of + the original instance. + SQLObject 0.5 ============= |
|
From: <ian...@us...> - 2003-11-04 02:28:56
|
Update of /cvsroot/sqlobject/SQLObject/SQLObject
In directory sc8-pr-cvs1:/tmp/cvs-serv2091/SQLObject
Modified Files:
Join.py
Log Message:
Made joins use transactions
Index: Join.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/Join.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Join.py 28 Jun 2003 22:20:20 -0000 1.5
--- Join.py 4 Nov 2003 02:28:53 -0000 1.6
***************
*** 103,107 ****
self.joinColumn,
inst.id)
! return self._applyOrderBy([self.otherClass(id) for (id,) in ids if id is not None], self.otherClass)
class MultipleJoin(Join):
--- 103,111 ----
self.joinColumn,
inst.id)
! if inst._SO_perConnection:
! conn = inst._connection
! else:
! conn = None
! return self._applyOrderBy([self.otherClass(id, conn) for (id,) in ids if id is not None], self.otherClass)
class MultipleJoin(Join):
***************
*** 139,143 ****
self.joinColumn,
inst.id)
! return self._applyOrderBy([self.otherClass(id) for (id,) in ids if id is not None], self.otherClass)
def remove(self, inst, other):
--- 143,151 ----
self.joinColumn,
inst.id)
! if inst._SO_perConnection:
! conn = inst._connection
! else:
! conn = None
! return self._applyOrderBy([self.otherClass(id, conn) for (id,) in ids if id is not None], self.otherClass)
def remove(self, inst, other):
|
|
From: <ian...@us...> - 2003-11-04 02:28:38
|
Update of /cvsroot/sqlobject/SQLObject/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv2061/tests
Modified Files:
test.py
Log Message:
Fixed test that used __len__
Index: test.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/tests/test.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** test.py 1 Oct 2003 01:53:48 -0000 1.33
--- test.py 4 Nov 2003 02:28:35 -0000 1.34
***************
*** 201,205 ****
all = IterTest.select()
count = 0
! for i in range(len(all)):
test = all[i]
count += 1
--- 201,205 ----
all = IterTest.select()
count = 0
! for i in range(all.count()):
test = all[i]
count += 1
|
|
From: <ian...@us...> - 2003-11-04 02:25:36
|
Update of /cvsroot/sqlobject/SQLObject/SQLObject
In directory sc8-pr-cvs1:/tmp/cvs-serv1760
Modified Files:
SQLBuilder.py
Log Message:
Added operation.eq/IS for DBMConnection, as noted by Chris Atlee
Index: SQLBuilder.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/SQLBuilder.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** SQLBuilder.py 24 Oct 2003 19:18:52 -0000 1.13
--- SQLBuilder.py 4 Nov 2003 02:25:33 -0000 1.14
***************
*** 211,214 ****
--- 211,215 ----
">": operator.gt,
"IN": operator.contains,
+ "IS": operator.eq,
}
|
|
From: <dre...@us...> - 2003-11-03 13:20:33
|
Update of /cvsroot/sqlobject/SQLObject/SQLObject
In directory sc8-pr-cvs1:/tmp/cvs-serv31802
Modified Files:
SQLObject.py
Log Message:
Oops. Ian made the wrong change here. Fixing.
Index: SQLObject.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/SQLObject.py,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** SQLObject.py 1 Nov 2003 19:53:07 -0000 1.62
--- SQLObject.py 3 Nov 2003 13:20:29 -0000 1.63
***************
*** 1026,1030 ****
' '.join(['%s=%s' % (name, repr(value)) for name, value in self._reprItems()]))
! def sqlrepr(self, cls):
return cls._connection.sqlrepr(value)
--- 1026,1030 ----
' '.join(['%s=%s' % (name, repr(value)) for name, value in self._reprItems()]))
! def sqlrepr(cls, value):
return cls._connection.sqlrepr(value)
|
|
From: <ian...@us...> - 2003-11-01 21:17:24
|
Update of /cvsroot/sqlobject/SOWeb/docs In directory sc8-pr-cvs1:/tmp/cvs-serv27829/docs Modified Files: default.css Log Message: updates Index: default.css =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/default.css,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 |
|
From: <ian...@us...> - 2003-11-01 21:17:24
|
Update of /cvsroot/sqlobject/SOWeb In directory sc8-pr-cvs1:/tmp/cvs-serv27829 Modified Files: index.html index.txt Log Message: updates Index: index.html =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/index.html,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** index.html 1 Oct 2003 02:42:01 -0000 1.11 --- index.html 1 Nov 2003 21:17:20 -0000 1.12 *************** *** 20,23 **** --- 20,30 ---- </center> + <div class="section" id="news"> + <h1><a name="news">News</a></h1> + <dl> + <dt>1-Nov-2003:</dt> + <dd>SQLObject 0.5 is released.</dd> + </dl> + </div> <div class="section" id="introduction"> <h1><a name="introduction">Introduction</a></h1> *************** *** 113,119 **** <div class="section" id="download"> <h1><a name="download">Download</a></h1> ! <p><a class="reference" href="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.4.tar.gz?download">SQLObject-0.4.tar.gz</a></p> ! <p><a class="reference" href="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.4-1.noarch.rpm?download">SQLObject-0.4-1.noarch.rpm</a></p> ! <p><a class="reference" href="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.4.win32.exe?download">SQLObject-0.4.win32.exe</a></p> <p>You can also use <a class="reference" href="#anonymous-cvs">anonymous CVS</a> to access the latest files. However, SourceForge is currently delaying the anonymous CVS servers --- 120,126 ---- <div class="section" id="download"> <h1><a name="download">Download</a></h1> ! <p><a class="reference" href="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.tar.gz?download">SQLObject-0.5.tar.gz</a></p> ! <p><a class="reference" href="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5-1.noarch.rpm?download">SQLObject-0.5-1.noarch.rpm</a></p> ! <p><a class="reference" href="http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.win32.exe?download">SQLObject-0.5.win32.exe</a></p> <p>You can also use <a class="reference" href="#anonymous-cvs">anonymous CVS</a> to access the latest files. However, SourceForge is currently delaying the anonymous CVS servers *************** *** 125,129 **** <h1><a name="documentation">Documentation</a></h1> <p><a class="reference" href="docs/FAQ.html">FAQ</a></p> ! <p><a class="reference" href="docs/News.html">New in 0.4</a></p> <p><a class="reference" href="docs/SQLObject.html">SQLObject documentation</a></p> <p><a class="reference" href="docs/SQLBuilder.html">SQLBuilder documentation</a></p> --- 132,136 ---- <h1><a name="documentation">Documentation</a></h1> <p><a class="reference" href="docs/FAQ.html">FAQ</a></p> ! <p><a class="reference" href="docs/News.html">New in 0.5</a></p> <p><a class="reference" href="docs/SQLObject.html">SQLObject documentation</a></p> <p><a class="reference" href="docs/SQLBuilder.html">SQLBuilder documentation</a></p> Index: index.txt =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/index.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** index.txt 1 Oct 2003 02:42:01 -0000 1.10 --- index.txt 1 Nov 2003 21:17:20 -0000 1.11 *************** *** 7,10 **** --- 7,15 ---- + News + ==== + + 1-Nov-2003: + SQLObject 0.5 is released. Introduction *************** *** 134,148 **** ======== ! SQLObject-0.4.tar.gz__ ! __ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.4.tar.gz?download ! SQLObject-0.4-1.noarch.rpm__ ! __ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.4-1.noarch.rpm?download ! SQLObject-0.4.win32.exe__ ! __ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.4.win32.exe?download You can also use `anonymous CVS`_ to access the latest files. --- 139,153 ---- ======== ! SQLObject-0.5.tar.gz__ ! __ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.tar.gz?download ! SQLObject-0.5-1.noarch.rpm__ ! __ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5-1.noarch.rpm?download ! SQLObject-0.5.win32.exe__ ! __ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.5.win32.exe?download You can also use `anonymous CVS`_ to access the latest files. *************** *** 161,165 **** __ docs/FAQ.html ! `New in 0.4`__ __ docs/News.html --- 166,170 ---- __ docs/FAQ.html ! `New in 0.5`__ __ docs/News.html |
|
From: <ian...@us...> - 2003-11-01 20:35:48
|
Update of /cvsroot/sqlobject/SOWeb/docs In directory sc8-pr-cvs1:/tmp/cvs-serv20497/docs Modified Files: default.css Log Message: Fixed hover on anchor Index: default.css =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/default.css,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 |
|
From: <ian...@us...> - 2003-11-01 20:35:48
|
Update of /cvsroot/sqlobject/SOWeb In directory sc8-pr-cvs1:/tmp/cvs-serv20497 Modified Files: default.css Log Message: Fixed hover on anchor Index: default.css =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/default.css,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 |
|
From: <ian...@us...> - 2003-11-01 20:34:47
|
Update of /cvsroot/sqlobject/SOWeb/docs In directory sc8-pr-cvs1:/tmp/cvs-serv20298/docs Modified Files: Authors.html Authors.txt News.html News.txt SQLObject.html SQLObject.txt default.css Log Message: Updated for 0.5 Index: Authors.html =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/Authors.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Authors.html 7 Sep 2003 18:21:38 -0000 1.3 --- Authors.html 1 Nov 2003 20:34:42 -0000 1.4 *************** *** 15,23 **** <p>Contributions have been made by:</p> <ul class="simple"> ! <li>Frank Barknecht <<a class="reference" href="mailto:fbar@footils.org">fbar@footils.org</a>></li> ! <li>Bud P. Bruegger <<a class="reference" href="mailto:bug@sistema.it">bug@sistema.it</a>></li> ! <li>David M. Cook <<a class="reference" href="mailto:dave@davidcook.org">dave@davidcook.org</a>></li> ! <li>Luke Opperman <<a class="reference" href="mailto:luke@metathusalan.com">luke@metathusalan.com</a>></li> ! <li>James Ralston <<a class="reference" href="mailto:jralston@hotmail.com">jralston@hotmail.com</a>></li> </ul> </div> --- 15,24 ---- <p>Contributions have been made by:</p> <ul class="simple"> ! <li>Frank Barknecht <fbar at footils.org></li> ! <li>Bud P. Bruegger <bug at sistema.it></li> ! <li>David M. Cook <dave at davidcook.org></li> ! <li>Luke Opperman <luke at metathusalan.com></li> ! <li>James Ralston <jralston at hotmail.com></li> ! <li>Sidnei da Silva <sidnei at awkly.org></li> </ul> </div> Index: Authors.txt =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/Authors.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Authors.txt 7 Sep 2003 18:21:38 -0000 1.2 --- Authors.txt 1 Nov 2003 20:34:42 -0000 1.3 *************** *** 7,13 **** Contributions have been made by: ! * Frank Barknecht <fb...@fo...> ! * Bud P. Bruegger <bu...@si...> ! * David M. Cook <da...@da...> ! * Luke Opperman <lu...@me...> ! * James Ralston <jra...@ho...> --- 7,14 ---- Contributions have been made by: ! * Frank Barknecht <fbar at footils.org> ! * Bud P. Bruegger <bug at sistema.it> ! * David M. Cook <dave at davidcook.org> ! * Luke Opperman <luke at metathusalan.com> ! * James Ralston <jralston at hotmail.com> ! * Sidnei da Silva <sidnei at awkly.org> Index: News.html =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/News.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** News.html 21 Aug 2003 05:06:58 -0000 1.4 --- News.html 1 Nov 2003 20:34:42 -0000 1.5 *************** *** 14,42 **** <p class="topic-title"><a name="contents">Contents:</a></p> <ul class="simple"> ! <li><a class="reference" href="#sqlobject-0-4" id="id5" name="id5">SQLObject 0.4</a><ul> ! <li><a class="reference" href="#features" id="id6" name="id6">Features</a><ul> ! <li><a class="reference" href="#col-and-join" id="id7" name="id7">Col and Join</a></li> </ul> </li> ! <li><a class="reference" href="#bugs" id="id8" name="id8">Bugs</a></li> ! <li><a class="reference" href="#internal" id="id9" name="id9">Internal</a></li> </ul> </li> ! <li><a class="reference" href="#sqlobject-0-3" id="id10" name="id10">SQLObject 0.3</a><ul> ! <li><a class="reference" href="#id1" id="id11" name="id11">Features</a></li> ! <li><a class="reference" href="#id2" id="id12" name="id12">Bugs</a></li> </ul> </li> ! <li><a class="reference" href="#sqlobject-0-2-1" id="id13" name="id13">SQLObject 0.2.1</a><ul> ! <li><a class="reference" href="#id3" id="id14" name="id14">Bugs</a></li> ! <li><a class="reference" href="#id4" id="id15" name="id15">Features</a></li> </ul> </li> </ul> </div> ! <a class="target" id="start" name="start"></a><div class="section" id="sqlobject-0-4"> ! <h1><a name="sqlobject-0-4">SQLObject 0.4</a></h1> <div class="section" id="features"> <h2><a name="features">Features</a></h2> <ul> <li><p class="first">You can specify columns in a new, preferred manner:</p> --- 14,99 ---- <p class="topic-title"><a name="contents">Contents:</a></p> <ul class="simple"> ! <li><a class="reference" href="#sqlobject-0-5" id="id7" name="id7">SQLObject 0.5</a><ul> ! <li><a class="reference" href="#features" id="id8" name="id8">Features</a></li> ! <li><a class="reference" href="#interface-changes" id="id9" name="id9">Interface Changes</a></li> ! <li><a class="reference" href="#bugs" id="id10" name="id10">Bugs</a></li> </ul> </li> ! <li><a class="reference" href="#sqlobject-0-4" id="id11" name="id11">SQLObject 0.4</a><ul> ! <li><a class="reference" href="#id1" id="id12" name="id12">Features</a><ul> ! <li><a class="reference" href="#col-and-join" id="id13" name="id13">Col and Join</a></li> </ul> </li> ! <li><a class="reference" href="#id2" id="id14" name="id14">Bugs</a></li> ! <li><a class="reference" href="#internal" id="id15" name="id15">Internal</a></li> </ul> </li> ! <li><a class="reference" href="#sqlobject-0-3" id="id16" name="id16">SQLObject 0.3</a><ul> ! <li><a class="reference" href="#id3" id="id17" name="id17">Features</a></li> ! <li><a class="reference" href="#id4" id="id18" name="id18">Bugs</a></li> ! </ul> ! </li> ! <li><a class="reference" href="#sqlobject-0-2-1" id="id19" name="id19">SQLObject 0.2.1</a><ul> ! <li><a class="reference" href="#id5" id="id20" name="id20">Bugs</a></li> ! <li><a class="reference" href="#id6" id="id21" name="id21">Features</a></li> </ul> </li> </ul> </div> ! <a class="target" id="start" name="start"></a><div class="section" id="sqlobject-0-5"> ! <h1><a name="sqlobject-0-5">SQLObject 0.5</a></h1> ! <p>Released: 1-Nov-2003</p> <div class="section" id="features"> <h2><a name="features">Features</a></h2> + <ul class="simple"> + <li><a class="reference" href="http://firebird.sourceforge.net/">Firebird</a> support.</li> + <li>Database-specific literal quoting (motivation: MySQL and Postgres + use backslashes, Firebird and SQLite do not).</li> + <li>Generic conversion/validation can be added to columns.</li> + <li>BoolCol for portable boolean columns (BOOL on Postgres, INT on + MySQL, etc.)</li> + <li>Non-integer IDs. (Automatic table creation is not supported for + non-integer IDs)</li> + <li>Explicit IDs for new instances/rows (required for non-integer IDs).</li> + <li>Instances can be synced with the database (in case there have been + updates to the object since it was first fetched).</li> + <li>Instances can be expired, so that they will be synced when they are + next accessed.</li> + </ul> + </div> + <div class="section" id="interface-changes"> + <h2><a name="interface-changes">Interface Changes</a></h2> + <ul class="simple"> + <li><cite>SQLBuilder.sqlRepr</cite> renamed to <cite>SQLBuilder.sqlrepr</cite>, signature + changed to <tt class="literal"><span class="pre">sqlrepr(value,</span> <span class="pre">databaseName)</span></tt> to quote <tt class="literal"><span class="pre">value</span></tt>, + where <tt class="literal"><span class="pre">databaseName</span></tt> is one of <tt class="literal"><span class="pre">"mysql"</span></tt>, <tt class="literal"><span class="pre">"postgres"</span></tt>, + <tt class="literal"><span class="pre">"sqlite"</span></tt>, <tt class="literal"><span class="pre">"firebird"</span></tt>.</li> + <li><tt class="literal"><span class="pre">sqlRepr</span></tt> magic method renamed to <tt class="literal"><span class="pre">__sqlrepr__</span></tt>, and takes new + <tt class="literal"><span class="pre">databaseName</span></tt> argument.</li> + <li>When using explicit booleans, use <tt class="literal"><span class="pre">Col.TRUE</span></tt> and <tt class="literal"><span class="pre">Col.FALSE</span></tt> for + backward compatibility with Python 2.2. This is not required for + <tt class="literal"><span class="pre">BoolCol</span></tt>, however (which converts all true values to TRUE and + false values to FALSE)</li> + <li>SQLObject has a <tt class="literal"><span class="pre">sqlrepr</span></tt> method, so you can construct queries + with something like <tt class="literal"><span class="pre">"WHERE</span> <span class="pre">last_name</span> <span class="pre">=</span> <span class="pre">%s"</span> <span class="pre">%</span> + <span class="pre">Person.sqlrepr('Bob')</span></tt></li> + </ul> + </div> + <div class="section" id="bugs"> + <h2><a name="bugs">Bugs</a></h2> + <ul class="simple"> + <li>Released all locks with <tt class="literal"><span class="pre">finally:</span></tt>, so that bugs won't cause + frozen locks.</li> + <li>Tons of transaction fixes. Transactions pretty much work.</li> + <li>A class can have multiple foreign keys pointing to the same table + (e.g., <tt class="literal"><span class="pre">spouse</span> <span class="pre">=</span> <span class="pre">ForeignKey("Person");</span> <span class="pre">supervisor</span> <span class="pre">=</span> + <span class="pre">ForeignKey("Person")</span></tt>)</li> + </ul> + </div> + </div> + <div class="section" id="sqlobject-0-4"> + <h1><a name="sqlobject-0-4">SQLObject 0.4</a></h1> + <div class="section" id="id1"> + <h2><a name="id1">Features</a></h2> <ul> <li><p class="first">You can specify columns in a new, preferred manner:</p> *************** *** 125,130 **** </div> </div> ! <div class="section" id="bugs"> ! <h2><a name="bugs">Bugs</a></h2> <ul class="simple"> <li><cite>DateTimeCol</cite> uses <tt class="literal"><span class="pre">TIMESTAMP</span></tt> for Postgres. Note that the --- 182,187 ---- </div> </div> ! <div class="section" id="id2"> ! <h2><a name="id2">Bugs</a></h2> <ul class="simple"> <li><cite>DateTimeCol</cite> uses <tt class="literal"><span class="pre">TIMESTAMP</span></tt> for Postgres. Note that the *************** *** 165,170 **** <div class="section" id="sqlobject-0-3"> <h1><a name="sqlobject-0-3">SQLObject 0.3</a></h1> ! <div class="section" id="id1"> ! <h2><a name="id1">Features</a></h2> <ul class="simple"> <li>Table creation (SQL schema generation) via new class method --- 222,227 ---- <div class="section" id="sqlobject-0-3"> <h1><a name="sqlobject-0-3">SQLObject 0.3</a></h1> ! <div class="section" id="id3"> ! <h2><a name="id3">Features</a></h2> <ul class="simple"> <li>Table creation (SQL schema generation) via new class method *************** *** 193,198 **** </ul> </div> ! <div class="section" id="id2"> ! <h2><a name="id2">Bugs</a></h2> <ul class="simple"> <li>LIMIT/OFFSET (select result slicing) works in Postgres and SQLite.</li> --- 250,255 ---- </ul> </div> ! <div class="section" id="id4"> ! <h2><a name="id4">Bugs</a></h2> <ul class="simple"> <li>LIMIT/OFFSET (select result slicing) works in Postgres and SQLite.</li> *************** *** 205,216 **** <div class="section" id="sqlobject-0-2-1"> <h1><a name="sqlobject-0-2-1">SQLObject 0.2.1</a></h1> ! <div class="section" id="id3"> ! <h2><a name="id3">Bugs</a></h2> <ul class="simple"> <li>Fixed caching of new objects</li> </ul> </div> ! <div class="section" id="id4"> ! <h2><a name="id4">Features</a></h2> <ul class="simple"> <li><a class="reference" href="http://sqlite.org/">SQLite</a> support</li> --- 262,273 ---- <div class="section" id="sqlobject-0-2-1"> <h1><a name="sqlobject-0-2-1">SQLObject 0.2.1</a></h1> ! <div class="section" id="id5"> ! <h2><a name="id5">Bugs</a></h2> <ul class="simple"> <li>Fixed caching of new objects</li> </ul> </div> ! <div class="section" id="id6"> ! <h2><a name="id6">Features</a></h2> <ul class="simple"> <li><a class="reference" href="http://sqlite.org/">SQLite</a> support</li> Index: News.txt =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/News.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** News.txt 5 Jul 2003 04:39:07 -0000 1.3 --- News.txt 1 Nov 2003 20:34:42 -0000 1.4 *************** *** 8,11 **** --- 8,74 ---- .. _start: + SQLObject 0.5 + ============= + + Released: 1-Nov-2003 + + Features + -------- + + * Firebird_ support. + + * Database-specific literal quoting (motivation: MySQL and Postgres + use backslashes, Firebird and SQLite do not). + + * Generic conversion/validation can be added to columns. + + * BoolCol for portable boolean columns (BOOL on Postgres, INT on + MySQL, etc.) + + * Non-integer IDs. (Automatic table creation is not supported for + non-integer IDs) + + * Explicit IDs for new instances/rows (required for non-integer IDs). + + * Instances can be synced with the database (in case there have been + updates to the object since it was first fetched). + + * Instances can be expired, so that they will be synced when they are + next accessed. + + .. _Firebird: http://firebird.sourceforge.net/ + + Interface Changes + ----------------- + + * `SQLBuilder.sqlRepr` renamed to `SQLBuilder.sqlrepr`, signature + changed to ``sqlrepr(value, databaseName)`` to quote ``value``, + where ``databaseName`` is one of ``"mysql"``, ``"postgres"``, + ``"sqlite"``, ``"firebird"``. + + * ``sqlRepr`` magic method renamed to ``__sqlrepr__``, and takes new + ``databaseName`` argument. + + * When using explicit booleans, use ``Col.TRUE`` and ``Col.FALSE`` for + backward compatibility with Python 2.2. This is not required for + ``BoolCol``, however (which converts all true values to TRUE and + false values to FALSE) + + * SQLObject has a ``sqlrepr`` method, so you can construct queries + with something like ``"WHERE last_name = %s" % + Person.sqlrepr('Bob')`` + + Bugs + ---- + + * Released all locks with ``finally:``, so that bugs won't cause + frozen locks. + + * Tons of transaction fixes. Transactions pretty much work. + + * A class can have multiple foreign keys pointing to the same table + (e.g., ``spouse = ForeignKey("Person"); supervisor = + ForeignKey("Person")``) + SQLObject 0.4 ============= Index: SQLObject.html =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/SQLObject.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SQLObject.html 21 Aug 2003 05:06:58 -0000 1.6 --- SQLObject.html 1 Nov 2003 20:34:42 -0000 1.7 *************** *** 5,74 **** <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.3.0: http://docutils.sourceforge.net/" /> ! <title>SQLObject 0.4</title> <link rel="stylesheet" href="default.css" type="text/css" /> </head> <body> ! <div class="document" id="sqlobject-0-4"> ! <h1 class="title">SQLObject 0.4</h1> <div class="contents topic" id="contents"> <p class="topic-title"><a name="contents">Contents:</a></p> <ul class="simple"> ! <li><a class="reference" href="#author-site-and-license" id="id7" name="id7">Author, Site, and License</a></li> ! <li><a class="reference" href="#introduction" id="id8" name="id8">Introduction</a></li> ! <li><a class="reference" href="#requirements" id="id9" name="id9">Requirements</a></li> ! <li><a class="reference" href="#compared-to-other-database-wrappers" id="id10" name="id10">Compared To Other Database Wrappers</a></li> ! <li><a class="reference" href="#future" id="id11" name="id11">Future</a></li> ! <li><a class="reference" href="#using-sqlobject-an-introduction" id="id12" name="id12">Using SQLObject: An Introduction</a><ul> ! <li><a class="reference" href="#declaring-the-class" id="id13" name="id13">Declaring the Class</a></li> ! <li><a class="reference" href="#using-the-class" id="id14" name="id14">Using the Class</a></li> ! <li><a class="reference" href="#one-to-many-relationships" id="id15" name="id15">One-to-Many Relationships</a></li> ! <li><a class="reference" href="#many-to-many-relationships" id="id16" name="id16">Many-to-Many Relationships</a></li> ! <li><a class="reference" href="#selecting-multiple-objects" id="id17" name="id17">Selecting Multiple Objects</a></li> ! <li><a class="reference" href="#customizing-the-objects" id="id18" name="id18">Customizing the Objects</a><ul> ! <li><a class="reference" href="#initializing-the-objects" id="id19" name="id19">Initializing the Objects</a></li> ! <li><a class="reference" href="#adding-magic-attributes-properties" id="id20" name="id20">Adding Magic Attributes (properties)</a></li> ! <li><a class="reference" href="#overriding-column-attributes" id="id21" name="id21">Overriding Column Attributes</a></li> </ul> </li> </ul> </li> ! <li><a class="reference" href="#reference" id="id22" name="id22">Reference</a><ul> ! <li><a class="reference" href="#col-class-specifying-columns" id="id23" name="id23">Col Class: Specifying Columns</a><ul> ! <li><a class="reference" href="#subclasses-of-col" id="id24" name="id24">Subclasses of Col</a></li> </ul> </li> ! <li><a class="reference" href="#sqlobject-class-specifying-your-class" id="id25" name="id25">SQLObject Class: Specifying Your Class</a></li> ! <li><a class="reference" href="#relationships-between-classes-tables" id="id26" name="id26">Relationships Between Classes/Tables</a><ul> ! <li><a class="reference" href="#multiplejoin-one-to-many" id="id27" name="id27">MultipleJoin: One-to-Many</a></li> ! <li><a class="reference" href="#relatedjoin-many-to-many" id="id28" name="id28">RelatedJoin: Many-to-Many</a></li> </ul> </li> ! <li><a class="reference" href="#transactions" id="id29" name="id29">Transactions</a></li> ! <li><a class="reference" href="#automatic-schema-generation" id="id30" name="id30">Automatic Schema Generation</a><ul> ! <li><a class="reference" href="#columns-types" id="id31" name="id31">Columns Types</a></li> ! <li><a class="reference" href="#creating-and-dropping-tables" id="id32" name="id32">Creating and Dropping Tables</a></li> </ul> </li> </ul> </li> ! <li><a class="reference" href="#dynamic-classes" id="id33" name="id33">Dynamic Classes</a><ul> ! <li><a class="reference" href="#automatic-class-generation" id="id34" name="id34">Automatic Class Generation</a></li> ! <li><a class="reference" href="#runtime-column-changes" id="id35" name="id35">Runtime Column Changes</a></li> </ul> </li> ! <li><a class="reference" href="#legacy-database-schemas" id="id36" name="id36">Legacy Database Schemas</a><ul> ! <li><a class="reference" href="#sqlobject-requirements" id="id37" name="id37">SQLObject requirements</a></li> ! <li><a class="reference" href="#changing-the-naming-style" id="id38" name="id38">Changing the Naming Style</a></li> ! <li><a class="reference" href="#irregular-naming" id="id39" name="id39">Irregular Naming</a></li> </ul> </li> ! <li><a class="reference" href="#dbconnection-database-connections" id="id40" name="id40">DBConnection: Database Connections</a><ul> ! <li><a class="reference" href="#mysql" id="id41" name="id41">MySQL</a></li> ! <li><a class="reference" href="#postgres" id="id42" name="id42">Postgres</a></li> ! <li><a class="reference" href="#sqlite" id="id43" name="id43">SQLite</a></li> ! <li><a class="reference" href="#dbmconnection" id="id44" name="id44">DBMConnection</a></li> </ul> </li> ! <li><a class="reference" href="#exported-symbols" id="id45" name="id45">Exported Symbols</a></li> </ul> </div> --- 5,76 ---- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.3.0: http://docutils.sourceforge.net/" /> ! <title>SQLObject 0.5</title> <link rel="stylesheet" href="default.css" type="text/css" /> </head> <body> ! <div class="document" id="sqlobject-0-5"> ! <h1 class="title">SQLObject 0.5</h1> <div class="contents topic" id="contents"> <p class="topic-title"><a name="contents">Contents:</a></p> <ul class="simple"> ! <li><a class="reference" href="#author-site-and-license" id="id9" name="id9">Author, Site, and License</a></li> ! <li><a class="reference" href="#introduction" id="id10" name="id10">Introduction</a></li> ! <li><a class="reference" href="#requirements" id="id11" name="id11">Requirements</a></li> ! <li><a class="reference" href="#compared-to-other-database-wrappers" id="id12" name="id12">Compared To Other Database Wrappers</a></li> ! <li><a class="reference" href="#future" id="id13" name="id13">Future</a></li> ! <li><a class="reference" href="#using-sqlobject-an-introduction" id="id14" name="id14">Using SQLObject: An Introduction</a><ul> ! <li><a class="reference" href="#declaring-the-class" id="id15" name="id15">Declaring the Class</a></li> ! <li><a class="reference" href="#using-the-class" id="id16" name="id16">Using the Class</a></li> ! <li><a class="reference" href="#one-to-many-relationships" id="id17" name="id17">One-to-Many Relationships</a></li> ! <li><a class="reference" href="#many-to-many-relationships" id="id18" name="id18">Many-to-Many Relationships</a></li> ! <li><a class="reference" href="#selecting-multiple-objects" id="id19" name="id19">Selecting Multiple Objects</a></li> ! <li><a class="reference" href="#customizing-the-objects" id="id20" name="id20">Customizing the Objects</a><ul> ! <li><a class="reference" href="#initializing-the-objects" id="id21" name="id21">Initializing the Objects</a></li> ! <li><a class="reference" href="#adding-magic-attributes-properties" id="id22" name="id22">Adding Magic Attributes (properties)</a></li> ! <li><a class="reference" href="#overriding-column-attributes" id="id23" name="id23">Overriding Column Attributes</a></li> </ul> </li> </ul> </li> ! <li><a class="reference" href="#reference" id="id24" name="id24">Reference</a><ul> ! <li><a class="reference" href="#col-class-specifying-columns" id="id25" name="id25">Col Class: Specifying Columns</a><ul> ! <li><a class="reference" href="#subclasses-of-col" id="id26" name="id26">Subclasses of Col</a></li> </ul> </li> ! <li><a class="reference" href="#sqlobject-class-specifying-your-class" id="id27" name="id27">SQLObject Class: Specifying Your Class</a></li> ! <li><a class="reference" href="#relationships-between-classes-tables" id="id28" name="id28">Relationships Between Classes/Tables</a><ul> ! <li><a class="reference" href="#multiplejoin-one-to-many" id="id29" name="id29">MultipleJoin: One-to-Many</a></li> ! <li><a class="reference" href="#relatedjoin-many-to-many" id="id30" name="id30">RelatedJoin: Many-to-Many</a></li> </ul> </li> ! <li><a class="reference" href="#transactions" id="id31" name="id31">Transactions</a></li> ! <li><a class="reference" href="#automatic-schema-generation" id="id32" name="id32">Automatic Schema Generation</a><ul> ! <li><a class="reference" href="#columns-types" id="id33" name="id33">Columns Types</a></li> ! <li><a class="reference" href="#creating-and-dropping-tables" id="id34" name="id34">Creating and Dropping Tables</a></li> </ul> </li> </ul> </li> ! <li><a class="reference" href="#dynamic-classes" id="id35" name="id35">Dynamic Classes</a><ul> ! <li><a class="reference" href="#automatic-class-generation" id="id36" name="id36">Automatic Class Generation</a></li> ! <li><a class="reference" href="#runtime-column-changes" id="id37" name="id37">Runtime Column Changes</a></li> </ul> </li> ! <li><a class="reference" href="#legacy-database-schemas" id="id38" name="id38">Legacy Database Schemas</a><ul> ! <li><a class="reference" href="#sqlobject-requirements" id="id39" name="id39">SQLObject requirements</a></li> ! <li><a class="reference" href="#changing-the-naming-style" id="id40" name="id40">Changing the Naming Style</a></li> ! <li><a class="reference" href="#irregular-naming" id="id41" name="id41">Irregular Naming</a></li> ! <li><a class="reference" href="#non-integer-keys" id="id42" name="id42">Non-Integer Keys</a></li> </ul> </li> ! <li><a class="reference" href="#dbconnection-database-connections" id="id43" name="id43">DBConnection: Database Connections</a><ul> ! <li><a class="reference" href="#mysql" id="id44" name="id44">MySQL</a></li> ! <li><a class="reference" href="#postgres" id="id45" name="id45">Postgres</a></li> ! <li><a class="reference" href="#id6" id="id46" name="id46">SQLite</a></li> ! <li><a class="reference" href="#id7" id="id47" name="id47">Firebird</a></li> ! <li><a class="reference" href="#dbmconnection" id="id48" name="id48">DBMConnection</a></li> </ul> </li> ! <li><a class="reference" href="#exported-symbols" id="id49" name="id49">Exported Symbols</a></li> </ul> </div> *************** *** 100,106 **** <div class="section" id="requirements"> <h1><a name="requirements">Requirements</a></h1> ! <p>Currently SQLObject supports MySQL, PostgreSQL (via <tt class="literal"><span class="pre">psycopg</span></tt>), ! SQLite, and a DBM-based store. The DBM backend is the youngest, ! and somewhat experimental.</p> <p>Python 2.2 or higher is required. SQLObject makes extensive use of new-style classes.</p> --- 102,108 ---- <div class="section" id="requirements"> <h1><a name="requirements">Requirements</a></h1> ! <p>Currently SQLObject supports <a class="reference" href="#mysql">MySQL</a>, <a class="reference" href="http://postgresql.org">PostgreSQL</a> (via <tt class="literal"><span class="pre">psycopg</span></tt>), ! <a class="reference" href="http://sqlite.org">SQLite</a>, <a class="reference" href="http://firebird.sourceforge.net">Firebird</a>, and a DBM-based store. The DBM backend is ! experimental.</p> <p>Python 2.2 or higher is required. SQLObject makes extensive use of new-style classes.</p> *************** *** 156,170 **** <p>Here are some things I plan:</p> <ul class="simple"> ! <li>More databases supported. SQL databases (like Oracle or Firebird) ! should be easy, non-SQL databases like Metakit should be possible.</li> <li>Better transaction support -- right now you can use transactions for the database, but the object isn't transaction-aware, so ! non-database persistence won't be able to be rolled back. ! Locking and other techniques to handle concurrency will also be ! implemented (probably in 0.5).</li> <li>Profile of SQLObject performance, so that I can identify bottlenecks.</li> ! <li>Makes hooks with a validation and form generation package, so ! SQLObject classes (read: schemas) can be published for editing ! more directly and easily.</li> <li>Automatic joins in select queries.</li> <li>More kinds of joins, and more powerful join results (closer to how --- 158,171 ---- <p>Here are some things I plan:</p> <ul class="simple"> ! <li>More databases supported. There has been interest and some work in ! the progress for Oracle, Sybase, and MS-SQL support.</li> <li>Better transaction support -- right now you can use transactions for the database, but the object isn't transaction-aware, so ! non-database persistence won't be able to be rolled back.</li> ! <li>Optimistic locking and other techniques to handle concurrency.</li> <li>Profile of SQLObject performance, so that I can identify bottlenecks.</li> ! <li>Increase hooks with FormEncode (unreleased) validation and form ! generation package, so SQLObject classes (read: schemas) can be ! published for editing more directly and easily.</li> <li>Automatic joins in select queries.</li> <li>More kinds of joins, and more powerful join results (closer to how *************** *** 179,183 **** <p>To begin with, let's make a database connection. Choose from one of <cite>MySQLConnection</cite>, <cite>PostgresConnection</cite>, <cite>SQLiteConnection</cite>, and ! <cite>DBMConnection</cite>, depending on what database you use.</p> <pre class="literal-block"><tt><span class="normal">conn</span> <span class="symbol">=</span> <span class="function">MySQLConnection</span><span class="symbol">(</span><span class="normal">user</span><span class="symbol">=</span><span class="string">'test'</span><span class="symbol">,</span> <span class="normal">db</span><span class="symbol">=</span><span class="string">'testdb'</span><span class="symbol">)</span> --- 180,184 ---- <p>To begin with, let's make a database connection. Choose from one of <cite>MySQLConnection</cite>, <cite>PostgresConnection</cite>, <cite>SQLiteConnection</cite>, and ! <cite>FirebirdConnection</cite>, depending on what database you use.</p> <pre class="literal-block"><tt><span class="normal">conn</span> <span class="symbol">=</span> <span class="function">MySQLConnection</span><span class="symbol">(</span><span class="normal">user</span><span class="symbol">=</span><span class="string">'test'</span><span class="symbol">,</span> <span class="normal">db</span><span class="symbol">=</span><span class="string">'testdb'</span><span class="symbol">)</span> *************** *** 187,193 **** </tt></pre> <p>The rest of this will be written more-or-less in a database-agnostic ! manner, using the connection you define. (Use <cite>DBMConnection</cite> if you ! don't have another database installed or ready -- it only uses ! standard Python modules, and writes to a directory)</p> <p>We'll develop a simple addressbook-like database. We could create the tables ourselves, and just have SQLObject access those tables, but for --- 188,194 ---- </tt></pre> <p>The rest of this will be written more-or-less in a database-agnostic ! manner, using the connection you define. Use <cite>SQLite</cite> if you don't ! have another database installed or ready -- it requires <a class="reference" href="http://pysqlite.sourceforge.net/">PySQLite</a>, but ! doesn't require a client/server setup.</p> <p>We'll develop a simple addressbook-like database. We could create the tables ourselves, and just have SQLObject access those tables, but for *************** *** 216,224 **** <span class="symbol">)</span><span class="symbol">;</span> </tt></pre> ! <p>This is for MySQL. The schema for Postgres or SQLite looks a little different (especially the <tt class="literal"><span class="pre">id</span></tt> column). You'll notice the names were changed from mixedCase to underscore_separated -- this is done by ! the <a class="reference" href="#changing-the-naming-style">style object</a>. There are a variety of ways to handle ! other names that are not as SQLObject expects (see <a class="reference" href="#irregular-naming">Irregular Naming</a>).</p> <p>The tables don't yet exist. We'll let SQLObject create them:</p> --- 217,225 ---- <span class="symbol">)</span><span class="symbol">;</span> </tt></pre> ! <p>This is for MySQL. The schema for other databases looks slightly different (especially the <tt class="literal"><span class="pre">id</span></tt> column). You'll notice the names were changed from mixedCase to underscore_separated -- this is done by ! the <a class="reference" href="#changing-the-naming-style">style object</a>. There are a variety of ways to handle that names ! that don't fit conventions (see <a class="reference" href="#irregular-naming">Irregular Naming</a>).</p> <p>The tables don't yet exist. We'll let SQLObject create them:</p> *************** *** 237,241 **** as <tt class="literal"><span class="pre">INT</span> <span class="pre">PRIMARY</span> <span class="pre">KEY</span> <span class="pre">AUTO_INCREMENT</span></tt>, in Postgres <tt class="literal"><span class="pre">SERIAL</span> <span class="pre">PRIMARY</span> <span class="pre">KEY</span></tt>, and in SQLite as <tt class="literal"><span class="pre">INTEGER</span> <span class="pre">PRIMARY</span> <span class="pre">KEY</span></tt>. You can <a class="reference" href="#idname">override the ! name</a>, but some integer primary key must exist.</p> </div> <div class="section" id="using-the-class"> --- 238,243 ---- as <tt class="literal"><span class="pre">INT</span> <span class="pre">PRIMARY</span> <span class="pre">KEY</span> <span class="pre">AUTO_INCREMENT</span></tt>, in Postgres <tt class="literal"><span class="pre">SERIAL</span> <span class="pre">PRIMARY</span> <span class="pre">KEY</span></tt>, and in SQLite as <tt class="literal"><span class="pre">INTEGER</span> <span class="pre">PRIMARY</span> <span class="pre">KEY</span></tt>. You can <a class="reference" href="#idname">override the ! name</a>, but some integer primary key must exist (though <a class="reference" href="#non-integer-keys">you can use ! non-integer keys</a> with some extra effort).</p> </div> <div class="section" id="using-the-class"> *************** *** 476,480 **** <span class="normal">clauseTables</span><span class="symbol">=</span><span class="symbol">[</span><span class="string">'address'</span><span class="symbol">]</span><span class="symbol">)</span> </tt></pre> ! <p>You may wish to use <cite>SQLBuilder.sqlRepr</cite> to quote any values you use if you use this technique (quoting is automatic if you use <tt class="literal"><span class="pre">q</span></tt>). Tables given in <cite>clauseTables</cite> will be added to the <tt class="literal"><span class="pre">FROM</span></tt> portion --- 478,482 ---- <span class="normal">clauseTables</span><span class="symbol">=</span><span class="symbol">[</span><span class="string">'address'</span><span class="symbol">]</span><span class="symbol">)</span> </tt></pre> ! <p>You may wish to use <cite>MyClass.sqlrepr</cite> to quote any values you use if you use this technique (quoting is automatic if you use <tt class="literal"><span class="pre">q</span></tt>). Tables given in <cite>clauseTables</cite> will be added to the <tt class="literal"><span class="pre">FROM</span></tt> portion *************** *** 686,689 **** --- 688,715 ---- different types of columns, when SQLObject creates your tables.</p> <dl> + <dt><cite>BoolCol</cite>:</dt> + <dd>Will create a <tt class="literal"><span class="pre">BOOLEAN</span></tt> column in Postgres, or <tt class="literal"><span class="pre">INT</span></tt> in other + databses. It will also convert values to <tt class="literal"><span class="pre">"t"/"f"</span></tt> or <tt class="literal"><span class="pre">0/1</span></tt> + according to the database backend.</dd> + <dt><cite>CurrencyCol</cite>:</dt> + <dd>Equivalent to <tt class="literal"><span class="pre">DecimalCol(size=10,</span> <span class="pre">precision=2)</span></tt>.</dd> + <dt><cite>DateTimeCol</cite>:</dt> + <dd>A date and time (usually returned as an mxDateTime object).</dd> + <dt><cite>DecimalCol</cite>:</dt> + <dd>Base-10, precise number. Uses the keyword arguments <cite>size</cite> for + number of digits stored, and <cite>precision</cite> for the number of digits + after the decimal point.</dd> + <dt><cite>EnumCol</cite>:</dt> + <dd>One of several string values -- give the possible strings as a + list, with the <cite>enumValues</cite> keyword argument. MySQL has a native + <tt class="literal"><span class="pre">ENUM</span></tt> type, but will work with other databases too (storage + just won't be as efficient).</dd> + <dt><cite>FloatCol</cite>:</dt> + <dd>Floats.</dd> + <dt><cite>ForeignKey</cite>:</dt> + <dd>A key to another table/class. Use like <tt class="literal"><span class="pre">user</span> <span class="pre">=</span> + <span class="pre">ForeignKey('User')</span></tt>.</dd> + <dt><cite>IntCol</cite>:</dt> + <dd>Integers.</dd> <dt><cite>StringCol</cite>:</dt> <dd><p class="first">A string (character) column. Extra keywords:</p> *************** *** 698,721 **** </dl> </dd> - <dt><cite>IntCol</cite>:</dt> - <dd>Integers, real simple.</dd> - <dt><cite>FloatCol</cite>:</dt> - <dd>Floats.</dd> - <dt><cite>ForeignKey</cite>:</dt> - <dd>A key to another table/class. Use like <tt class="literal"><span class="pre">user</span> <span class="pre">=</span> - <span class="pre">ForeignKey('User')</span></tt>.</dd> - <dt><cite>EnumCol</cite>:</dt> - <dd>One of several string values -- give the possible strings as a - list, with the <cite>enumValues</cite> keyword argument. MySQL has a native - <tt class="literal"><span class="pre">ENUM</span></tt> type, but will work with other databases too (storage - just won't be as efficient).</dd> - <dt><cite>DateTimeCol</cite>:</dt> - <dd>A date and time (usually returned as an mxDateTime object).</dd> - <dt><cite>DecimalCol</cite>:</dt> - <dd>Base-10, precise number. Uses the keyword arguments <cite>size</cite> for - number of digits stored, and <cite>precision</cite> for the number of digits - after the decimal point.</dd> - <dt><cite>CurrencyCol</cite>:</dt> - <dd>Equivalent to <tt class="literal"><span class="pre">DecimalCol(size=10,</span> <span class="pre">precision=2)</span></tt>.</dd> </dl> </div> --- 724,727 ---- *************** *** 926,930 **** <p>You can still specify columns (in <cite>_columns</cite>), and only missing columns will be added.</p> ! <p><em>This is only supported in MySQL and Postgres</em></p> </div> <div class="section" id="runtime-column-changes"> --- 932,936 ---- <p>You can still specify columns (in <cite>_columns</cite>), and only missing columns will be added.</p> ! <p><em>This is not supported in SQLite</em></p> </div> <div class="section" id="runtime-column-changes"> *************** *** 1032,1035 **** --- 1038,1049 ---- column name.</p> </div> + <div class="section" id="non-integer-keys"> + <h2><a name="non-integer-keys">Non-Integer Keys</a></h2> + <p>While not strictly a legacy database issue, this fits into the + category of "irregularities". If you use non-integer keys, all + primary key management is up to you. You must create the table + yourself, and when you create instances you must pass a <tt class="literal"><span class="pre">id</span></tt> keyword + argument into <tt class="literal"><span class="pre">new</span></tt> (like <tt class="literal"><span class="pre">Person.new(id='555-55-5555',</span> <span class="pre">...)</span></tt>).</p> + </div> </div> <div class="section" id="dbconnection-database-connections"> *************** *** 1047,1051 **** <p>MySQLConnection supports all the features, though MySQL does not support <a class="reference" href="#transactions">transactions</a> (except using a special proprietary backend that ! no one I've seen uses).</p> </div> <div class="section" id="postgres"> --- 1061,1065 ---- <p>MySQLConnection supports all the features, though MySQL does not support <a class="reference" href="#transactions">transactions</a> (except using a special proprietary backend that ! I haven't used).</p> </div> <div class="section" id="postgres"> *************** *** 1057,1062 **** <p>PostgresConnection supports transactions and all other features.</p> </div> ! <div class="section" id="sqlite"> ! <h2><a name="sqlite">SQLite</a></h2> <p><cite>SQLiteConnection</cite> takes the a single string, which is the path to the database file.</p> --- 1071,1076 ---- <p>PostgresConnection supports transactions and all other features.</p> </div> ! <div class="section" id="id6"> ! <h2><a name="id6">SQLite</a></h2> <p><cite>SQLiteConnection</cite> takes the a single string, which is the path to the database file.</p> *************** *** 1069,1072 **** --- 1083,1097 ---- <p>SQLite may have concurrency issues, depending on your usage in a multi-threaded environment.</p> + </div> + <div class="section" id="id7"> + <h2><a name="id7">Firebird</a></h2> + <p><cite>FirebirdConnection</cite> takes the arguments <cite>host</cite>, <cite>db</cite>, <cite>user</cite> (default + <tt class="literal"><span class="pre">"sysdba"</span></tt>), <cite>passwd</cite> (default <tt class="literal"><span class="pre">"masterkey"</span></tt>).</p> + <p>Firebird supports all the features. Support is still young, so there + may be some issues, especially with concurrent access, and especially + using lazy selects. Try <tt class="literal"><span class="pre">list(MyClass.select())</span></tt> to avoid + concurrent cursors if you have problems (using <tt class="literal"><span class="pre">list()</span></tt> will + pre-fetch all the results of a select).</p> + <p>Firebird support uses the <a class="reference" href="http://kinterbasdb.sourceforge.net/">kinterbasdb</a> Python library.</p> </div> <div class="section" id="dbmconnection"> Index: SQLObject.txt =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/SQLObject.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SQLObject.txt 21 Aug 2003 05:06:59 -0000 1.5 --- SQLObject.txt 1 Nov 2003 20:34:42 -0000 1.6 *************** *** 1,4 **** ``````````````` ! SQLObject 0.4 ``````````````` --- 1,4 ---- ``````````````` ! SQLObject 0.5 ``````````````` *************** *** 43,49 **** ============ ! Currently SQLObject supports MySQL, PostgreSQL (via ``psycopg``), ! SQLite, and a DBM-based store. The DBM backend is the youngest, ! and somewhat experimental. Python 2.2 or higher is required. SQLObject makes extensive use of --- 43,53 ---- ============ ! Currently SQLObject supports MySQL_, PostgreSQL_ (via ``psycopg``), ! SQLite_, Firebird_, and a DBM-based store. The DBM backend is ! experimental. ! ! .. _PostgreSQL: http://postgresql.org ! .. _SQLite: http://sqlite.org ! .. _Firebird: http://firebird.sourceforge.net Python 2.2 or higher is required. SQLObject makes extensive use of *************** *** 113,127 **** Here are some things I plan: ! * More databases supported. SQL databases (like Oracle or Firebird) ! should be easy, non-SQL databases like Metakit should be possible. * Better transaction support -- right now you can use transactions for the database, but the object isn't transaction-aware, so non-database persistence won't be able to be rolled back. ! Locking and other techniques to handle concurrency will also be ! implemented (probably in 0.5). * Profile of SQLObject performance, so that I can identify bottlenecks. ! * Makes hooks with a validation and form generation package, so ! SQLObject classes (read: schemas) can be published for editing ! more directly and easily. * Automatic joins in select queries. * More kinds of joins, and more powerful join results (closer to how --- 117,130 ---- Here are some things I plan: ! * More databases supported. There has been interest and some work in ! the progress for Oracle, Sybase, and MS-SQL support. * Better transaction support -- right now you can use transactions for the database, but the object isn't transaction-aware, so non-database persistence won't be able to be rolled back. ! * Optimistic locking and other techniques to handle concurrency. * Profile of SQLObject performance, so that I can identify bottlenecks. ! * Increase hooks with FormEncode (unreleased) validation and form ! generation package, so SQLObject classes (read: schemas) can be ! published for editing more directly and easily. * Automatic joins in select queries. * More kinds of joins, and more powerful join results (closer to how *************** *** 138,142 **** To begin with, let's make a database connection. Choose from one of `MySQLConnection`, `PostgresConnection`, `SQLiteConnection`, and ! `DBMConnection`, depending on what database you use. .. raw:: html --- 141,145 ---- To begin with, let's make a database connection. Choose from one of `MySQLConnection`, `PostgresConnection`, `SQLiteConnection`, and ! `FirebirdConnection`, depending on what database you use. .. raw:: html *************** *** 144,150 **** The rest of this will be written more-or-less in a database-agnostic ! manner, using the connection you define. (Use `DBMConnection` if you ! don't have another database installed or ready -- it only uses ! standard Python modules, and writes to a directory) We'll develop a simple addressbook-like database. We could create the --- 147,155 ---- The rest of this will be written more-or-less in a database-agnostic ! manner, using the connection you define. Use `SQLite` if you don't ! have another database installed or ready -- it requires PySQLite_, but ! doesn't require a client/server setup. ! ! .. _PySQLite: http://pysqlite.sourceforge.net/ We'll develop a simple addressbook-like database. We could create the *************** *** 166,174 **** :file: ../examples/snippets/simpleaddress-schema-person1.html ! This is for MySQL. The schema for Postgres or SQLite looks a little different (especially the ``id`` column). You'll notice the names were changed from mixedCase to underscore_separated -- this is done by ! the `style object`_. There are a variety of ways to handle ! other names that are not as SQLObject expects (see `Irregular Naming`_). .. _`style object`: `Changing the Naming Style`_ --- 171,179 ---- :file: ../examples/snippets/simpleaddress-schema-person1.html ! This is for MySQL. The schema for other databases looks slightly different (especially the ``id`` column). You'll notice the names were changed from mixedCase to underscore_separated -- this is done by ! the `style object`_. There are a variety of ways to handle that names ! that don't fit conventions (see `Irregular Naming`_). .. _`style object`: `Changing the Naming Style`_ *************** *** 193,199 **** as ``INT PRIMARY KEY AUTO_INCREMENT``, in Postgres ``SERIAL PRIMARY KEY``, and in SQLite as ``INTEGER PRIMARY KEY``. You can `override the ! name`__, but some integer primary key must exist. __ idName_ Using the Class --- 198,206 ---- as ``INT PRIMARY KEY AUTO_INCREMENT``, in Postgres ``SERIAL PRIMARY KEY``, and in SQLite as ``INTEGER PRIMARY KEY``. You can `override the ! name`__, but some integer primary key must exist (though `you can use ! non-integer keys`_ with some extra effort). __ idName_ + .. _`you can use non-integer keys`: `Non-Integer Keys`_ Using the Class *************** *** 350,354 **** :file: ../examples/snippets/person-select3.html ! You may wish to use `SQLBuilder.sqlRepr` to quote any values you use if you use this technique (quoting is automatic if you use ``q``). Tables given in `clauseTables` will be added to the ``FROM`` portion --- 357,361 ---- :file: ../examples/snippets/person-select3.html ! You may wish to use `MyClass.sqlrepr` to quote any values you use if you use this technique (quoting is automatic if you use ``q``). Tables given in `clauseTables` will be added to the ``FROM`` portion *************** *** 533,536 **** --- 540,567 ---- different types of columns, when SQLObject creates your tables. + `BoolCol`: + Will create a ``BOOLEAN`` column in Postgres, or ``INT`` in other + databses. It will also convert values to ``"t"/"f"`` or ``0/1`` + according to the database backend. + `CurrencyCol`: + Equivalent to ``DecimalCol(size=10, precision=2)``. + `DateTimeCol`: + A date and time (usually returned as an mxDateTime object). + `DecimalCol`: + Base-10, precise number. Uses the keyword arguments `size` for + number of digits stored, and `precision` for the number of digits + after the decimal point. + `EnumCol`: + One of several string values -- give the possible strings as a + list, with the `enumValues` keyword argument. MySQL has a native + ``ENUM`` type, but will work with other databases too (storage + just won't be as efficient). + `FloatCol`: + Floats. + `ForeignKey`: + A key to another table/class. Use like ``user = + ForeignKey('User')``. + `IntCol`: + Integers. `StringCol`: A string (character) column. Extra keywords: *************** *** 543,566 **** ``CHAR`` and ``VARCHAR``, default True, i.e., use ``VARCHAR``. - `IntCol`: - Integers, real simple. - `FloatCol`: - Floats. - `ForeignKey`: - A key to another table/class. Use like ``user = - ForeignKey('User')``. - `EnumCol`: - One of several string values -- give the possible strings as a - list, with the `enumValues` keyword argument. MySQL has a native - ``ENUM`` type, but will work with other databases too (storage - just won't be as efficient). - `DateTimeCol`: - A date and time (usually returned as an mxDateTime object). - `DecimalCol`: - Base-10, precise number. Uses the keyword arguments `size` for - number of digits stored, and `precision` for the number of digits - after the decimal point. - `CurrencyCol`: - Equivalent to ``DecimalCol(size=10, precision=2)``. SQLObject Class: Specifying Your Class --- 574,577 ---- *************** *** 784,788 **** columns will be added. ! *This is only supported in MySQL and Postgres* Runtime Column Changes --- 795,799 ---- columns will be added. ! *This is not supported in SQLite* Runtime Column Changes *************** *** 901,904 **** --- 912,924 ---- column name. + Non-Integer Keys + ---------------- + + While not strictly a legacy database issue, this fits into the + category of "irregularities". If you use non-integer keys, all + primary key management is up to you. You must create the table + yourself, and when you create instances you must pass a ``id`` keyword + argument into ``new`` (like ``Person.new(id='555-55-5555', ...)``). + DBConnection: Database Connections ================================== *************** *** 920,924 **** MySQLConnection supports all the features, though MySQL does not support transactions_ (except using a special proprietary backend that ! no one I've seen uses). Postgres --- 940,944 ---- MySQLConnection supports all the features, though MySQL does not support transactions_ (except using a special proprietary backend that ! I haven't used). Postgres *************** *** 948,951 **** --- 968,987 ---- SQLite may have concurrency issues, depending on your usage in a multi-threaded environment. + + Firebird + -------- + + `FirebirdConnection` takes the arguments `host`, `db`, `user` (default + ``"sysdba"``), `passwd` (default ``"masterkey"``). + + Firebird supports all the features. Support is still young, so there + may be some issues, especially with concurrent access, and especially + using lazy selects. Try ``list(MyClass.select())`` to avoid + concurrent cursors if you have problems (using ``list()`` will + pre-fetch all the results of a select). + + Firebird support uses the kinterbasdb_ Python library. + + .. _kinterbasdb: http://kinterbasdb.sourceforge.net/ DBMConnection Index: default.css =================================================================== RCS file: /cvsroot/sqlobject/SOWeb/docs/default.css,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 |
|
From: <ian...@us...> - 2003-11-01 20:33:21
|
Update of /cvsroot/sqlobject/SQLObject/docs In directory sc8-pr-cvs1:/tmp/cvs-serv20124 Modified Files: Authors.txt Log Message: Added Sidnei Index: Authors.txt =================================================================== RCS file: /cvsroot/sqlobject/SQLObject/docs/Authors.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Authors.txt 6 Sep 2003 02:33:17 -0000 1.3 --- Authors.txt 1 Nov 2003 20:33:18 -0000 1.4 *************** *** 7,13 **** Contributions have been made by: ! * Frank Barknecht <fb...@fo...> ! * Bud P. Bruegger <bu...@si...> ! * David M. Cook <da...@da...> ! * Luke Opperman <lu...@me...> ! * James Ralston <jra...@ho...> --- 7,14 ---- Contributions have been made by: ! * Frank Barknecht <fbar at footils.org> ! * Bud P. Bruegger <bug at sistema.it> ! * David M. Cook <dave at davidcook.org> ! * Luke Opperman <luke at metathusalan.com> ! * James Ralston <jralston at hotmail.com> ! * Sidnei da Silva <sidnei at awkly.org> |
|
From: <ian...@us...> - 2003-11-01 20:30:41
|
Update of /cvsroot/sqlobject/SQLObject/docs
In directory sc8-pr-cvs1:/tmp/cvs-serv19725
Modified Files:
News.txt
Log Message:
Added date
Index: News.txt
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/docs/News.txt,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** News.txt 1 Nov 2003 19:54:28 -0000 1.9
--- News.txt 1 Nov 2003 20:30:37 -0000 1.10
***************
*** 11,14 ****
--- 11,16 ----
=============
+ Released: 1-Nov-2003
+
Features
--------
***************
*** 26,32 ****
--- 28,37 ----
* Non-integer IDs. (Automatic table creation is not supported for
non-integer IDs)
+
* Explicit IDs for new instances/rows (required for non-integer IDs).
+
* Instances can be synced with the database (in case there have been
updates to the object since it was first fetched).
+
* Instances can be expired, so that they will be synced when they are
next accessed.
***************
*** 34,49 ****
.. _Firebird: http://firebird.sourceforge.net/
! Bugs
! ----
!
! * Released all locks with ``finally:``, so that bugs won't cause
! frozen locks.
! * Tons of transaction fixes. Transactions pretty much work.
! * A class can have multiple foreign keys pointing to the same table
! (e.g., ``spouse = ForeignKey("Person"); supervisor =
! ForeignKey("Person")``)
!
! Changed Usage Notes
! -------------------
* `SQLBuilder.sqlRepr` renamed to `SQLBuilder.sqlrepr`, signature
--- 39,44 ----
.. _Firebird: http://firebird.sourceforge.net/
! Interface Changes
! -----------------
* `SQLBuilder.sqlRepr` renamed to `SQLBuilder.sqlrepr`, signature
***************
*** 63,66 ****
--- 58,73 ----
with something like ``"WHERE last_name = %s" %
Person.sqlrepr('Bob')``
+
+ Bugs
+ ----
+
+ * Released all locks with ``finally:``, so that bugs won't cause
+ frozen locks.
+
+ * Tons of transaction fixes. Transactions pretty much work.
+
+ * A class can have multiple foreign keys pointing to the same table
+ (e.g., ``spouse = ForeignKey("Person"); supervisor =
+ ForeignKey("Person")``)
SQLObject 0.4
|