sqlobject-cvs Mailing List for SQLObject (Page 152)
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: <sub...@co...> - 2005-11-27 05:54:21
|
Author: ianb
Date: 2005-11-27 05:54:15 +0000 (Sun, 27 Nov 2005)
New Revision: 1325
Modified:
SQLObject/trunk/sqlobject/joins.py
Log:
Moved the .clause setting to a later stage when all classes have been resolved
Modified: SQLObject/trunk/sqlobject/joins.py
===================================================================
--- SQLObject/trunk/sqlobject/joins.py 2005-11-26 21:49:08 UTC (rev 1324)
+++ SQLObject/trunk/sqlobject/joins.py 2005-11-27 05:54:15 UTC (rev 1325)
@@ -412,15 +412,15 @@
classregistry.registry(
soClass.sqlmeta.registry).addClassCallback(
join, self._setOtherClass)
- self.clause = (
- sqlbuilder.Field(self.otherClass.sqlmeta.table, self.joinColumn)
- == self.soClass.q.id)
def _setOtherClass(self, otherClass):
self.otherClass = otherClass
if not self.joinColumn:
self.joinColumn = styles.getStyle(
self.soClass).tableReference(self.soClass.sqlmeta.table)
+ self.clause = (
+ sqlbuilder.Field(self.otherClass.sqlmeta.table, self.joinColumn)
+ == self.soClass.q.id)
def __get__(self, obj, type):
if obj is None:
|
|
From: <sub...@co...> - 2005-11-26 21:49:12
|
Author: ianb
Date: 2005-11-26 21:49:08 +0000 (Sat, 26 Nov 2005)
New Revision: 1324
Added:
SQLObject/trunk/sqlobject/tests/test_combining_joins.py
Log:
Added test for last commit
Added: SQLObject/trunk/sqlobject/tests/test_combining_joins.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/test_combining_joins.py 2005-11-26 21:44:54 UTC (rev 1323)
+++ SQLObject/trunk/sqlobject/tests/test_combining_joins.py 2005-11-26 21:49:08 UTC (rev 1324)
@@ -0,0 +1,42 @@
+from sqlobject import *
+from dbtest import *
+
+class ComplexGroup(SQLObject):
+ name = StringCol()
+ complexes = OneToMany('Complex')
+ def _get_unit_models(self):
+ q = self.complexes.clause & Complex.unit_models.clause
+ return UnitModel.select(q)
+
+class Complex(SQLObject):
+ name = StringCol()
+ unit_models = ManyToMany('UnitModel')
+ complex_group = ForeignKey('ComplexGroup')
+
+class UnitModel(SQLObject):
+ class sqlmeta:
+ defaultOrderBy = 'name'
+ name = StringCol()
+ complexes = ManyToMany('Complex')
+
+def test_join_sqlrepr():
+ setupClass([ComplexGroup, UnitModel, Complex])
+ cg1 = ComplexGroup(name='cg1')
+ cg2 = ComplexGroup(name='cg2')
+ c1 = Complex(name='c1', complex_group=cg1)
+ c2 = Complex(name='c2', complex_group=cg2)
+ c3 = Complex(name='c3', complex_group=cg2)
+ u1 = UnitModel(name='u1')
+ u2 = UnitModel(name='u2')
+ u1.complexes.add(c1)
+ u1.complexes.add(c2)
+ u2.complexes.add(c2)
+ u2.complexes.add(c3)
+ assert list(Complex.selectBy(name='c1')) == [c1]
+
+ assert list(cg1.unit_models) == [u1]
+ assert list(cg2.unit_models) == [u1, u2, u2]
+ assert list(cg2.unit_models.distinct()) == [u1, u2]
+
+ assert list(
+ cg2.unit_models.filter(UnitModel.q.name=='u1')) == [u1]
Property changes on: SQLObject/trunk/sqlobject/tests/test_combining_joins.py
___________________________________________________________________
Name: svn:eol-style
+ native
|
|
From: <sub...@co...> - 2005-11-26 21:44:58
|
Author: ianb
Date: 2005-11-26 21:44:54 +0000 (Sat, 26 Nov 2005)
New Revision: 1323
Modified:
SQLObject/trunk/sqlobject/joins.py
Log:
Added a clause attribute to ManyToMany and OneToMany join objects, which you can use in queries
Modified: SQLObject/trunk/sqlobject/joins.py
===================================================================
--- SQLObject/trunk/sqlobject/joins.py 2005-11-26 21:43:25 UTC (rev 1322)
+++ SQLObject/trunk/sqlobject/joins.py 2005-11-26 21:44:54 UTC (rev 1323)
@@ -316,6 +316,11 @@
self.soClass, events.CreateTableSignal)
events.listen(self.event_CreateTableSignal,
self.otherClass, events.CreateTableSignal)
+ self.clause = (
+ (self.otherClass.q.id ==
+ sqlbuilder.Field(self.intermediateTable, self.otherColumn))
+ & (sqlbuilder.Field(self.intermediateTable, self.joinColumn)
+ == self.soClass.q.id))
def __get__(self, obj, type):
if obj is None:
@@ -407,6 +412,9 @@
classregistry.registry(
soClass.sqlmeta.registry).addClassCallback(
join, self._setOtherClass)
+ self.clause = (
+ sqlbuilder.Field(self.otherClass.sqlmeta.table, self.joinColumn)
+ == self.soClass.q.id)
def _setOtherClass(self, otherClass):
self.otherClass = otherClass
|
|
From: <sub...@co...> - 2005-11-26 21:43:31
|
Author: ianb
Date: 2005-11-26 21:43:25 +0000 (Sat, 26 Nov 2005)
New Revision: 1322
Modified:
SQLObject/trunk/sqlobject/main.py
Log:
Move the attribute setup until later, so that some class fixups occur before __addtoclass__ is called
Modified: SQLObject/trunk/sqlobject/main.py
===================================================================
--- SQLObject/trunk/sqlobject/main.py 2005-11-26 21:13:23 UTC (rev 1321)
+++ SQLObject/trunk/sqlobject/main.py 2005-11-26 21:43:25 UTC (rev 1322)
@@ -701,8 +701,6 @@
def __classinit__(cls, new_attrs):
- declarative.setup_attributes(cls, new_attrs)
-
# This is true if we're initializing the SQLObject class,
# instead of a subclass:
is_base = cls.__bases__ == (object,)
@@ -800,6 +798,10 @@
if connection and not hasattr(cls, '_connection'):
cls.setConnection(connection)
+ # Now the class is in an essentially OK-state, so we can
+ # set up any magic attributes:
+ declarative.setup_attributes(cls, new_attrs)
+
# We have to check if there are columns in the inherited
# _columns where the attribute has been set to None in this
# class. If so, then we need to remove that column from
|
|
From: <sub...@co...> - 2005-11-26 21:13:28
|
Author: ianb
Date: 2005-11-26 21:13:23 +0000 (Sat, 26 Nov 2005)
New Revision: 1321
Modified:
SQLObject/trunk/sqlobject/boundattributes.py
SQLObject/trunk/sqlobject/declarative.py
SQLObject/trunk/sqlobject/joins.py
Log:
Update boundattributes, mostly trying to simplify it some; make declarative allow restricting the attributes you can set; change the new joins to use boundattributes
Modified: SQLObject/trunk/sqlobject/boundattributes.py
===================================================================
--- SQLObject/trunk/sqlobject/boundattributes.py 2005-11-26 20:57:28 UTC (rev 1320)
+++ SQLObject/trunk/sqlobject/boundattributes.py 2005-11-26 21:13:23 UTC (rev 1321)
@@ -27,6 +27,7 @@
'bind_attributes_local']
import declarative
+import events
class BoundAttribute(declarative.Declarative):
@@ -41,6 +42,8 @@
name, **attrs)`` and maybe ``set_object(added_class, name,
**attrs)`` (the default implementation of ``set_object``
just resets the attribute to whatever ``make_object`` returned).
+
+ Also see ``BoundFactory``.
"""
_private_variables = (
@@ -51,9 +54,11 @@
'_add_attrs',
'set_object',
'make_object',
+ 'clone_in_subclass',
)
_all_attrs = ()
+ clone_for_subclass = True
def __classinit__(cls, new_attrs):
declarative.Declarative.__classinit__(cls, new_attrs)
@@ -61,7 +66,7 @@
def __instanceinit__(self, new_attrs):
declarative.Declarative.__instanceinit__(self, new_attrs)
- self._all_attrs = self._add_attrs(self, new_attrs)
+ self.__dict__['_all_attrs'] = self._add_attrs(self, new_attrs)
def _add_attrs(this_object, new_attrs):
private = this_object._private_variables
@@ -82,6 +87,18 @@
attrs['added_class'] = added_class
attrs['attr_name'] = attr_name
obj = me.make_object(**attrs)
+
+ if self.clone_for_subclass:
+ def on_rebind(new_class_name, bases, new_attrs,
+ post_funcs, early_funcs):
+ def rebind(new_class):
+ me.set_object(
+ new_class, attr_name,
+ me.make_object(**attrs))
+ post_funcs.append(rebind)
+ events.listen(receiver=on_rebind, soClass=added_class,
+ signal=events.ClassCreateSignal, weak=False)
+
me.set_object(added_class, attr_name, obj)
__addtoclass__ = declarative.classinstancemethod(__addtoclass__)
@@ -96,29 +113,24 @@
make_object = classmethod(make_object)
+ def __setattr__(self, name, value):
+ self.__dict__['_all_attrs'] = self._add_attrs(self, {name: value})
+ self.__dict__[name] = value
+
class BoundFactory(BoundAttribute):
+ """
+ This will bind the attribute to whatever is given by
+ ``factory_class``. This factory should be a callable with the
+ signature ``factory_class(added_class, attr_name, *args, **kw)``.
+
+ The factory will be reinvoked (and the attribute rebound) for
+ every subclassing.
+ """
+
factory_class = None
+ _private_variables = (
+ BoundAttribute._private_variables + ('factory_class',))
def make_object(cls, added_class, attr_name, *args, **kw):
return cls.factory_class(added_class, attr_name, *args, **kw)
-
-def bind_attributes(cls, new_attrs):
- for name, value in new_attrs.items():
- if hasattr(value, '__addtoclass__'):
- value.__addtoclass__(cls, name)
-
-def bind_attributes_local(cls, new_attrs):
- new_bound_attributes = {}
- for name, value in getattr(cls, '__bound_attributes__', {}).items():
- if new_attrs.has_key(name):
- # The attribute is being REbound, so don't try to bind it
- # again.
- continue
- value.__addtoclass__(cls, name)
- new_bound_attributes[name] = value
- for name, value in new_attrs.items():
- if hasattr(value, '__addtoclass__'):
- value.__addtoclass__(cls, name)
- new_bound_attributes[name] = value
- cls.__bound_attributes__ = new_bound_attributes
Modified: SQLObject/trunk/sqlobject/declarative.py
===================================================================
--- SQLObject/trunk/sqlobject/declarative.py 2005-11-26 20:57:28 UTC (rev 1320)
+++ SQLObject/trunk/sqlobject/declarative.py 2005-11-26 21:13:23 UTC (rev 1321)
@@ -112,6 +112,8 @@
__metaclass__ = DeclarativeMeta
+ __restrict_attributes__ = None
+
def __classinit__(cls, new_attrs):
cls.declarative_count = counter.next()
for name in cls.__mutableattributes__:
@@ -119,6 +121,12 @@
setattr(cls, copy.copy(getattr(cls, name)))
def __instanceinit__(self, new_attrs):
+ if self.__restrict_attributes__ is not None:
+ for name in new_attrs:
+ if name not in self.__restrict_attributes__:
+ raise TypeError(
+ '%s() got an unexpected keyword argument %r'
+ % (self.__class__.__name__, name))
for name, value in new_attrs.items():
setattr(self, name, value)
if not new_attrs.has_key('declarative_count'):
Modified: SQLObject/trunk/sqlobject/joins.py
===================================================================
--- SQLObject/trunk/sqlobject/joins.py 2005-11-26 20:57:28 UTC (rev 1320)
+++ SQLObject/trunk/sqlobject/joins.py 2005-11-26 21:13:23 UTC (rev 1321)
@@ -268,43 +268,24 @@
+import boundattributes
-class ManyToMany(object):
-
- def __init__(self, otherClassName,
- intermediateTable=None,
- joinColumn=None,
- otherColumn=None,
- createJoinTable=True):
- self.otherClassName = otherClassName
- self.intermediateTable = intermediateTable
- self.joinColumn = joinColumn
- self.otherColumn = otherColumn
- self.createJoinTable = createJoinTable
-
- def __addtoclass__(self, soClass, name):
- setattr(soClass, name,
- SOManyToMany(soClass, name=name,
- otherClassName=self.otherClassName,
- intermediateTable=self.intermediateTable,
- joinColumn=self.joinColumn,
- otherColumn=self.otherColumn,
- createJoinTable=self.createJoinTable))
-
class SOManyToMany(object):
- def __init__(self, soClass, name, otherClassName,
+ def __init__(self, soClass, name, join,
intermediateTable, joinColumn, otherColumn,
- createJoinTable):
+ createJoinTable, **attrs):
self.name = name
self.intermediateTable = intermediateTable
self.joinColumn = joinColumn
self.otherColumn = otherColumn
self.createJoinTable = createJoinTable
self.soClass = self.otherClass = None
+ for name, value in attrs.items():
+ setattr(self, name, value)
classregistry.registry(
soClass.sqlmeta.registry).addClassCallback(
- otherClassName, self._setOtherClass)
+ join, self._setOtherClass)
classregistry.registry(
soClass.sqlmeta.registry).addClassCallback(
soClass.__name__, self._setThisClass)
@@ -345,10 +326,7 @@
& (sqlbuilder.Field(self.intermediateTable, self.joinColumn)
== obj.id))
select = self.otherClass.select(query)
- return _ManyToManySelectWrapper(obj, self, select)
-
- def __sqlrepr__(self, dbname):
- return self.query.__sqlrepr__(self, dbname)
+ return _ManyToManySelectWrapper(obj, self, select)
def event_CreateTableSignal(self, soClass, connection, extra_sql,
post_funcs):
@@ -359,6 +337,19 @@
if connection.tableExists(self.intermediateTable):
return
connection._SO_createJoinTable(self)
+
+class ManyToMany(boundattributes.BoundFactory):
+ factory_class = SOManyToMany
+ __restrict_attributes__ = (
+ 'join', 'intermediateTable',
+ 'joinColumn', 'otherColumn', 'createJoinTable')
+ __unpackargs__ = ('join',)
+
+ # Default values:
+ intermediateTable = None
+ joinColumn = None
+ otherColumn = None
+ createJoinTable = True
class _ManyToManySelectWrapper(object):
@@ -370,7 +361,7 @@
def __getattr__(self, attr):
# @@: This passes through private variable access too... should it?
# Also magic methods, like __str__
- return getattr(self.select, attr)
+ return getattr(self, select, attr)
def __repr__(self):
return '<%s for: %s>' % (self.__class__.__name__, repr(self.select))
@@ -385,7 +376,6 @@
return self.select[key]
def add(self, obj):
- print "Add", obj, "to", self.forObject
obj._connection._SO_intermediateInsert(
self.join.intermediateTable,
self.join.joinColumn,
@@ -405,28 +395,18 @@
obj = self.join.otherClass(**kw)
self.add(obj)
return obj
-
-class OneToMany(object):
-
- def __init__(self, otherClassName, joinColumn=None):
- self.otherClassName = otherClassName
- self.joinColumn = joinColumn
-
- def __addtoclass__(self, soClass, name):
- setattr(soClass, name,
- SOOneToMany(soClass, name=name,
- otherClassName=self.otherClassName,
- joinColumn=self.joinColumn))
class SOOneToMany(object):
- def __init__(self, soClass, name, otherClassName, joinColumn):
+ def __init__(self, soClass, name, join, joinColumn, **attrs):
self.soClass = soClass
self.name = name
self.joinColumn = joinColumn
+ for name, value in attrs.items():
+ setattr(self, name, value)
classregistry.registry(
soClass.sqlmeta.registry).addClassCallback(
- otherClassName, self._setOtherClass)
+ join, self._setOtherClass)
def _setOtherClass(self, otherClass):
self.otherClass = otherClass
@@ -443,6 +423,15 @@
select = self.otherClass.select(query)
return _OneToManySelectWrapper(obj, self, select)
+class OneToMany(boundattributes.BoundFactory):
+ factory_class = SOOneToMany
+ __restrict_attributes__ = (
+ 'join', 'joinColumn')
+ __unpackargs__ = ('join',)
+
+ # Default values:
+ joinColumn = None
+
class _OneToManySelectWrapper(object):
def __init__(self, forObject, join, select):
@@ -453,7 +442,7 @@
def __getattr__(self, attr):
# @@: This passes through private variable access too... should it?
# Also magic methods, like __str__
- return getattr(self, select, attr)
+ return getattr(self.select, attr)
def __repr__(self):
return '<%s for: %s>' % (self.__class__.__name__, repr(self.select))
|
|
From: <sub...@co...> - 2005-11-26 20:57:36
|
Author: ianb
Date: 2005-11-26 20:57:28 +0000 (Sat, 26 Nov 2005)
New Revision: 1320
Modified:
SQLObject/trunk/sqlobject/tests/dbtest.py
Log:
Run all the constraints when setting up a class for a test
Modified: SQLObject/trunk/sqlobject/tests/dbtest.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/dbtest.py 2005-11-26 19:15:44 UTC (rev 1319)
+++ SQLObject/trunk/sqlobject/tests/dbtest.py 2005-11-26 20:57:28 UTC (rev 1320)
@@ -161,14 +161,18 @@
"""
sql = getattr(soClass, soClass._connection.dbName + 'Create',
None)
+ all_extra = []
if sql:
soClass._connection.query(sql)
else:
- sql, constraints = soClass.createTableSQL()
+ sql, extra_sql = soClass.createTableSQL()
soClass.createTable()
+ all_extra.extend(extra_sql)
cls(tableName=soClass.sqlmeta.table,
createSQL=sql,
connectionURI=soClass._connection.uri())
+ for extra_sql in all_extra:
+ soClass._connection.query(extra_sql)
install = classmethod(install)
def drop(cls, soClass):
|
|
From: <sub...@co...> - 2005-11-26 19:15:54
|
Author: ianb Date: 2005-11-26 19:15:44 +0000 (Sat, 26 Nov 2005) New Revision: 1319 Modified: SQLObject/docs/SQLObject.txt Log: Fixed typo noted by Baiju M Modified: SQLObject/docs/SQLObject.txt =================================================================== --- SQLObject/docs/SQLObject.txt 2005-11-22 16:10:46 UTC (rev 1318) +++ SQLObject/docs/SQLObject.txt 2005-11-26 19:15:44 UTC (rev 1319) @@ -19,7 +19,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +GNU Lesser General Public License for more details. Introduction ============ |
|
From: SourceForge.net <no...@so...> - 2005-11-22 21:49:32
|
Patches item #1364165, was opened at 2005-11-22 16:48 Message generated for change (Comment added) made by magnum3065 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1364165&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Matthew Good (magnum3065) Assigned to: Nobody/Anonymous (nobody) Summary: mssql SQL Native Client support Initial Comment: In order to use SQLObject with the new free Express Edition of SQL Server 2005 I needed to use the SQLNCLI provider for oledb instead of SQLOLEDB that was used before. This patch supports using the SQLNCLI provider by adding an optional query parameter to the URI such as: mssql://MYHOST\SQLEXPRESS/my_db?sspi=true&ncli=true ---------------------------------------------------------------------- >Comment By: Matthew Good (magnum3065) Date: 2005-11-22 16:49 Message: Logged In: YES user_id=716848 Oops, the box needs checked for the attachment to be uploaded. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1364165&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2005-11-22 21:48:32
|
Patches item #1364165, was opened at 2005-11-22 16:48 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1364165&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Matthew Good (magnum3065) Assigned to: Nobody/Anonymous (nobody) Summary: mssql SQL Native Client support Initial Comment: In order to use SQLObject with the new free Express Edition of SQL Server 2005 I needed to use the SQLNCLI provider for oledb instead of SQLOLEDB that was used before. This patch supports using the SQLNCLI provider by adding an optional query parameter to the URI such as: mssql://MYHOST\SQLEXPRESS/my_db?sspi=true&ncli=true ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1364165&group_id=74338 |
|
From: <sub...@co...> - 2005-11-22 16:10:56
|
Author: test
Date: 2005-11-22 16:10:46 +0000 (Tue, 22 Nov 2005)
New Revision: 1318
Modified:
SQLObject/trunk/sqlobject/tests/test_basic.py
Log:
Fixed asDict test
Modified: SQLObject/trunk/sqlobject/tests/test_basic.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/test_basic.py 2005-11-22 16:09:47 UTC (rev 1317)
+++ SQLObject/trunk/sqlobject/tests/test_basic.py 2005-11-22 16:10:46 UTC (rev 1318)
@@ -279,5 +279,6 @@
def testAsDict():
setupGetters(TestSO1)
bob = TestSO1.selectBy(name='bob')[0]
- assert bob.sqlmeta.asDict() == {'passwd': 'tbq', 'name': 'bob'}
+ assert bob.sqlmeta.asDict() == {
+ 'passwd': 'tbq', 'name': 'bob', 'id': bob.id}
|
|
From: <sub...@co...> - 2005-11-22 16:09:55
|
Author: test
Date: 2005-11-22 16:09:47 +0000 (Tue, 22 Nov 2005)
New Revision: 1317
Modified:
SQLObject/trunk/sqlobject/tests/test_events.py
Log:
Added sorted() for pre-2.4 Pythons
Modified: SQLObject/trunk/sqlobject/tests/test_events.py
===================================================================
--- SQLObject/trunk/sqlobject/tests/test_events.py 2005-11-22 16:07:07 UTC (rev 1316)
+++ SQLObject/trunk/sqlobject/tests/test_events.py 2005-11-22 16:09:47 UTC (rev 1317)
@@ -3,6 +3,24 @@
from sqlobject import events
import sys
+try:
+ sorted
+except NameError:
+ # For Python 2.3 and under:
+ def sorted(lst, cmp=None, key=None, reverse=False):
+ if key:
+ lst = [(key(i), i) for i in lst]
+ lst = lst[:]
+ if cmp:
+ lst.sort(cmp)
+ else:
+ lst.sort()
+ if key:
+ lst = [i for k, i in lst]
+ if reverse:
+ lst.reverse()
+ return lst
+
class EventTester(SQLObject):
name = StringCol()
|
|
From: <sub...@co...> - 2005-11-22 16:07:11
|
Author: test Date: 2005-11-22 16:07:07 +0000 (Tue, 22 Nov 2005) New Revision: 1316 Modified: SQLObject/docs/presentation-2004-11/ui/custom.css SQLObject/docs/presentation-2004-11/ui/framing.css SQLObject/docs/presentation-2004-11/ui/opera.css SQLObject/docs/presentation-2004-11/ui/pretty.css SQLObject/docs/presentation-2004-11/ui/print.css SQLObject/docs/presentation-2004-11/ui/s5-core.css SQLObject/docs/presentation-2004-11/ui/slides.css Log: Fixed mime type Property changes on: SQLObject/docs/presentation-2004-11/ui/custom.css ___________________________________________________________________ Name: svn:mime-type + text/css Property changes on: SQLObject/docs/presentation-2004-11/ui/framing.css ___________________________________________________________________ Name: svn:mime-type + text/css Property changes on: SQLObject/docs/presentation-2004-11/ui/opera.css ___________________________________________________________________ Name: svn:mime-type + text/css Property changes on: SQLObject/docs/presentation-2004-11/ui/pretty.css ___________________________________________________________________ Name: svn:mime-type + text/css Property changes on: SQLObject/docs/presentation-2004-11/ui/print.css ___________________________________________________________________ Name: svn:mime-type + text/css Property changes on: SQLObject/docs/presentation-2004-11/ui/s5-core.css ___________________________________________________________________ Name: svn:mime-type + text/css Property changes on: SQLObject/docs/presentation-2004-11/ui/slides.css ___________________________________________________________________ Name: svn:mime-type + text/css |
|
From: <sub...@co...> - 2005-11-22 16:07:07
|
Author: test Date: 2005-11-22 16:06:38 +0000 (Tue, 22 Nov 2005) New Revision: 1315 Modified: SQLObject/docs/presentation-2004-11/sqlobject-and-database-programming.html Log: Added mime type Property changes on: SQLObject/docs/presentation-2004-11/sqlobject-and-database-programming.html ___________________________________________________________________ Name: svn:mime-type + text/html |
|
From: <sub...@co...> - 2005-11-21 18:33:54
|
Author: phd
Date: 2005-11-21 18:33:47 +0000 (Mon, 21 Nov 2005)
New Revision: 1314
Modified:
home/phd/SQLObject/paramstyles/sqlobject/col.py
home/phd/SQLObject/paramstyles/sqlobject/mssql/mssqlconnection.py
Log:
Merged patches from the revisions 1312:1313 from the trunk: DecimalValidator
Modified: home/phd/SQLObject/paramstyles/sqlobject/col.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/col.py 2005-11-21 18:29:12 UTC (rev 1313)
+++ home/phd/SQLObject/paramstyles/sqlobject/col.py 2005-11-21 18:33:47 UTC (rev 1314)
@@ -1116,6 +1116,47 @@
baseClass = SOTimeCol
+try:
+ from decimal import Decimal
+except ImportError:
+ Decimal = float
+
+class DecimalValidator(validators.Validator):
+ def to_python(self, value, state):
+ if value is None:
+ return None
+ if isinstance(value, (int, long, Decimal, sqlbuilder.SQLExpression)):
+ return value
+ if isinstance(value, float):
+ value = str(value)
+ connection = state.soObject._connection
+ if hasattr(connection, "decimalSeparator"):
+ value = value.replace(connection.decimalSeparator, ".")
+ try:
+ return Decimal(value)
+ except:
+ raise validators.Invalid("expected a Decimal in the DecimalCol '%s', got %s %r instead" % \
+ (self.name, type(value), value), value, state)
+
+ def from_python(self, value, state):
+ if value is None:
+ return None
+ if isinstance(value, float):
+ value = str(value)
+ if isinstance(value, (str, unicode)):
+ connection = state.soObject._connection
+ if hasattr(connection, "decimalSeparator"):
+ value = value.replace(connection.decimalSeparator, ".")
+ try:
+ return Decimal(value)
+ except:
+ raise validators.Invalid("can not parse Decimal value '%s' in the DecimalCol '%s'" %
+ (value, self.name), value, state)
+ if not isinstance(value, (int, long, Decimal, sqlbuilder.SQLExpression)):
+ raise validators.Invalid("expected a decimal in the DecimalCol '%s', got %s %r instead" % \
+ (self.name, type(value), value), value, state)
+ return value
+
class SODecimalCol(SOCol):
def __init__(self, **kw):
@@ -1130,6 +1171,10 @@
def _sqlType(self):
return 'DECIMAL(%i, %i)' % (self.size, self.precision)
+ def createValidators(self):
+ return [DecimalValidator()] + \
+ super(SODecimalCol, self).createValidators()
+
class DecimalCol(Col):
baseClass = SODecimalCol
Modified: home/phd/SQLObject/paramstyles/sqlobject/mssql/mssqlconnection.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/mssql/mssqlconnection.py 2005-11-21 18:29:12 UTC (rev 1313)
+++ home/phd/SQLObject/paramstyles/sqlobject/mssql/mssqlconnection.py 2005-11-21 18:33:47 UTC (rev 1314)
@@ -24,11 +24,12 @@
self.make_conn_str = lambda keys: \
["Provider=SQLOLEDB;Data Source=%s;Initial Catalog=%s;Integrated Security=SSPI;Persist Security Info=False" % (
keys.host, keys.db)]
- del kw["sspi"]
else:
self.make_conn_str = lambda keys: \
["Provider=SQLOLEDB;Data Source=%s;User Id=%s;Password=%s;Initial Catalog=%s" % (
keys.host, keys.user, keys.password, keys.db)]
+ if "sspi" in kw:
+ del kw["sspi"]
except ImportError: # raise the exceptions other than ImportError for adodbapi absence
import pymssql as sqlmodule
self.dbconnection = sqlmodule.connect
@@ -68,6 +69,8 @@
con = self.dbconnection( *self.make_conn_str(self) )
cur = con.cursor()
cur.execute('SET ANSI_NULLS ON')
+ cur.execute("SELECT CAST('12345.21' AS DECIMAL(10, 2))")
+ self.decimalSeparator = cur.fetchone()[0][-3]
cur.close()
return con
|
|
From: <sub...@co...> - 2005-11-21 18:29:27
|
Author: phd
Date: 2005-11-21 18:29:12 +0000 (Mon, 21 Nov 2005)
New Revision: 1313
Modified:
SQLObject/trunk/sqlobject/col.py
SQLObject/trunk/sqlobject/mssql/mssqlconnection.py
Log:
A patch by Murat Ozsoyler <mur...@is...>: DecimalValidator.
Modified: SQLObject/trunk/sqlobject/col.py
===================================================================
--- SQLObject/trunk/sqlobject/col.py 2005-11-21 00:18:34 UTC (rev 1312)
+++ SQLObject/trunk/sqlobject/col.py 2005-11-21 18:29:12 UTC (rev 1313)
@@ -1116,6 +1116,47 @@
baseClass = SOTimeCol
+try:
+ from decimal import Decimal
+except ImportError:
+ Decimal = float
+
+class DecimalValidator(validators.Validator):
+ def to_python(self, value, state):
+ if value is None:
+ return None
+ if isinstance(value, (int, long, Decimal, sqlbuilder.SQLExpression)):
+ return value
+ if isinstance(value, float):
+ value = str(value)
+ connection = state.soObject._connection
+ if hasattr(connection, "decimalSeparator"):
+ value = value.replace(connection.decimalSeparator, ".")
+ try:
+ return Decimal(value)
+ except:
+ raise validators.Invalid("expected a Decimal in the DecimalCol '%s', got %s %r instead" % \
+ (self.name, type(value), value), value, state)
+
+ def from_python(self, value, state):
+ if value is None:
+ return None
+ if isinstance(value, float):
+ value = str(value)
+ if isinstance(value, (str, unicode)):
+ connection = state.soObject._connection
+ if hasattr(connection, "decimalSeparator"):
+ value = value.replace(connection.decimalSeparator, ".")
+ try:
+ return Decimal(value)
+ except:
+ raise validators.Invalid("can not parse Decimal value '%s' in the DecimalCol '%s'" %
+ (value, self.name), value, state)
+ if not isinstance(value, (int, long, Decimal, sqlbuilder.SQLExpression)):
+ raise validators.Invalid("expected a decimal in the DecimalCol '%s', got %s %r instead" % \
+ (self.name, type(value), value), value, state)
+ return value
+
class SODecimalCol(SOCol):
def __init__(self, **kw):
@@ -1130,6 +1171,10 @@
def _sqlType(self):
return 'DECIMAL(%i, %i)' % (self.size, self.precision)
+ def createValidators(self):
+ return [DecimalValidator()] + \
+ super(SODecimalCol, self).createValidators()
+
class DecimalCol(Col):
baseClass = SODecimalCol
Modified: SQLObject/trunk/sqlobject/mssql/mssqlconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/mssql/mssqlconnection.py 2005-11-21 00:18:34 UTC (rev 1312)
+++ SQLObject/trunk/sqlobject/mssql/mssqlconnection.py 2005-11-21 18:29:12 UTC (rev 1313)
@@ -24,11 +24,12 @@
self.make_conn_str = lambda keys: \
["Provider=SQLOLEDB;Data Source=%s;Initial Catalog=%s;Integrated Security=SSPI;Persist Security Info=False" % (
keys.host, keys.db)]
- del kw["sspi"]
else:
self.make_conn_str = lambda keys: \
["Provider=SQLOLEDB;Data Source=%s;User Id=%s;Password=%s;Initial Catalog=%s" % (
keys.host, keys.user, keys.password, keys.db)]
+ if "sspi" in kw:
+ del kw["sspi"]
except ImportError: # raise the exceptions other than ImportError for adodbapi absence
import pymssql as sqlmodule
self.dbconnection = sqlmodule.connect
@@ -68,6 +69,8 @@
con = self.dbconnection( *self.make_conn_str(self) )
cur = con.cursor()
cur.execute('SET ANSI_NULLS ON')
+ cur.execute("SELECT CAST('12345.21' AS DECIMAL(10, 2))")
+ self.decimalSeparator = cur.fetchone()[0][-3]
cur.close()
return con
|
|
From: SourceForge.net <no...@so...> - 2005-11-18 21:02:31
|
Patches item #1354113, was opened at 2005-11-11 19:15 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1354113&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Sidnei da Silva (dreamcatcher) Assigned to: Nobody/Anonymous (nobody) Summary: Patch to backport mssql support to 0.7-bugfix branch Initial Comment: This patch applies cleanly to 0.7-bugfix branch. Contains all the changes, including tests, to add mssql support. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2005-11-19 00:02 Message: Logged In: YES user_id=4799 You have forgotten to add the mssql directory to the patch. I'll try to copy it from the trunc... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1354113&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2005-11-18 20:58:27
|
Bugs item #1356102, was opened at 2005-11-14 01:13 Message generated for change (Comment added) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1356102&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: SQLObject release (specify) Status: Open Resolution: None Priority: 5 Submitted By: stan pinte (stanpinte) >Assigned to: Oleg Broytmann (phd) Summary: INSERT fails without error Initial Comment: I have an INSERT that fails with no apparent reason from the database... (in that case postgres 8.0) 1/QueryIns: INSERT INTO log (id, message, state, operation, mtime) VALUES (5, 'Station: None', 'Error', 'ImportData', '2005-11-13 23:51:43') 1/COMMIT : auto 2/QueryOne: SELECT mtime, operation, state, message FROM log WHERE id = 5 2/QueryR : SELECT mtime, operation, state, message FROM log WHERE id = 5 2/COMMIT : auto Traceback (most recent call last): ... raise SQLObjectNotFound, "The object %s by the ID %s does not exist" % (self.__class__.__name__, self.id) sqlobject.main.SQLObjectNotFound: The object log by the ID 5 does not exist any idea? thanks a lot, Stan. ---------------------------------------------------------------------- >Comment By: Oleg Broytmann (phd) Date: 2005-11-18 23:58 Message: Logged In: YES user_id=4799 Can you create a short test program that demonstrates the problem? Attach it to this report... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1356102&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2005-11-18 20:39:23
|
Patches item #1181657, was opened at 2005-04-12 21:40 Message generated for change (Settings changed) made by phd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1181657&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Rejected Priority: 5 Submitted By: David M. Cook (daverz) Assigned to: Nobody/Anonymous (nobody) Summary: Direct support for UNIQUE table constraint Initial Comment: This is a patch to provide direct support for UNIQUE table constraints by marking each column in the constraint with uniqueKey=True. I stole the idea from hibernate (actually in hibernate you specify a constraint name, so you can have multiple unique constraints per table; this is just a first pass at the idea and a RFC). class Foo(SQLObject): baz = StringCol(uniqueKey=True) quux = StringCol(uniqueKey=True) would produce CREATE TABLE foo ( id INTEGER PRIMARY KEY, quux TEXT, baz TEXT, UNIQUE(quux, baz) ); Right now you can get the same practical effect with a unique index, but this provides direct semantic (or is it syntactic? I get them confused) support for unique table constraints, and lets the database decide how it will enforce the constraint. I think all the supported DBs support UNIQUE table constraints, I haven't checked yet. I'll try to come up with some test cases later. ---------------------------------------------------------------------- Comment By: Oleg Broytmann (phd) Date: 2005-09-13 16:58 Message: Logged In: YES user_id=4799 Then close the patch, please. ---------------------------------------------------------------------- Comment By: David M. Cook (daverz) Date: 2005-04-13 05:10 Message: Logged In: YES user_id=668544 Eh, after implementing this, even allowing multiple constraints per column, my enthusiasm has cooled. It's redundant, and I think doing it with unique indexes actually makes the intent clearer, e.g. c1 = DatabaseIndex('bar', 'baz', unique=True) c2 = DatabaseIndex('bar', 'quux', unique=True) vs. bar = StringCol(uniqueKey=('c1', 'c2')) baz = StringCol(uniqueKey='c1') quux = StringCol(uniqueKey='c2') ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1181657&group_id=74338 |
|
From: SourceForge.net <no...@so...> - 2005-11-15 16:51:28
|
Bugs item #1356912, was opened at 2005-11-14 16:21 Message generated for change (Settings changed) made by ianbicking You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1356912&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: another application using sqlobject Initial Comment: A not-so-new application using sqlobject: MyNewspaper http://inigo.katxi.org/devel/mynewspaper/ MyNewspaper is a personal RSS aggregator and reader with a Web UI. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1356912&group_id=74338 |
|
From: <sub...@co...> - 2005-11-15 16:51:21
|
Author: test Date: 2005-11-15 16:51:09 +0000 (Tue, 15 Nov 2005) New Revision: 1271 Modified: SQLObject/docs/links.txt Log: Added My Newspaper to links Modified: SQLObject/docs/links.txt =================================================================== --- SQLObject/docs/links.txt 2005-11-15 16:48:53 UTC (rev 1270) +++ SQLObject/docs/links.txt 2005-11-15 16:51:09 UTC (rev 1271) @@ -54,6 +54,9 @@ browsing, reading, and managing books from `Project Gutenberg <http://www.gutenberg.org/>`_. +* `My Newspaper <http://inigo.katxi.org/devel/mynewspaper/>`_, a + personal RSS Aggregator and Reader. + Articles and Documentation -------------------------- |
|
From: SourceForge.net <no...@so...> - 2005-11-15 16:49:34
|
Bugs item #1312108, was opened at 2005-10-03 12:43 Message generated for change (Settings changed) made by ianbicking You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1312108&group_id=74338 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Viktor Ferenczi (complex) Assigned to: Nobody/Anonymous (nobody) Summary: Broken link on SQLObject's homepage Initial Comment: Navigate to: http://sqlobject.org/News.html#sqlobject-0-7-0 The link under "documented reflection interface" points to the invalid URL: http://sqlobject.org/interface.py.html ---------------------------------------------------------------------- >Comment By: Ian Bicking (ianbicking) Date: 2005-11-15 10:49 Message: Logged In: YES user_id=210337 Fixed in r1270 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1312108&group_id=74338 |
|
From: <sub...@co...> - 2005-11-15 16:48:59
|
Author: test Date: 2005-11-15 16:48:53 +0000 (Tue, 15 Nov 2005) New Revision: 1270 Modified: SQLObject/docs/News.txt Log: Fixed link (1312108) Modified: SQLObject/docs/News.txt =================================================================== --- SQLObject/docs/News.txt 2005-11-15 16:43:01 UTC (rev 1269) +++ SQLObject/docs/News.txt 2005-11-15 16:48:53 UTC (rev 1270) @@ -82,10 +82,10 @@ column. * New `documented reflection interface - <http://sqlobject.org/docs/interface.py.html>`_, using the new - ``.sqlmeta`` class/instance. Most special attributes that started - with ``_`` were moved into ``sqlmeta`` (with leading underscore - removed). + <http://svn.colorstudy.com/SQLObject/docs/interface.py>`_, using the + new ``.sqlmeta`` class/instance. Most special attributes that + started with ``_`` were moved into ``sqlmeta`` (with leading + underscore removed). * New aggregate functions for select results, like ``cls.select().max(columnName)``: ``.max()``, ``.min()``, |
|
From: <sub...@co...> - 2005-11-15 16:43:20
|
Author: test
Date: 2005-11-15 16:43:01 +0000 (Tue, 15 Nov 2005)
New Revision: 1269
Modified:
SQLObject/docs/SQLObject.txt
Log:
Minor fix from Steve Zatz
Modified: SQLObject/docs/SQLObject.txt
===================================================================
--- SQLObject/docs/SQLObject.txt 2005-11-15 07:30:48 UTC (rev 1268)
+++ SQLObject/docs/SQLObject.txt 2005-11-15 16:43:01 UTC (rev 1269)
@@ -534,7 +534,7 @@
statements with these it'll give you the SQL for that statement. You
can also create your SQL more manually::
- >>> peeps = Person.select("""address.id = person.id AND
+ >>> peeps = Person.select("""address.person_id = person.id AND
... address.zip LIKE '504%'""",
... clauseTables=['address'])
|
|
From: <sub...@co...> - 2005-11-15 03:31:40
|
Author: ianb Date: 2005-11-15 03:31:33 +0000 (Tue, 15 Nov 2005) New Revision: 1267 Added: SQLObject/contrib/README.txt Log: Added document explaining system Added: SQLObject/contrib/README.txt =================================================================== --- SQLObject/contrib/README.txt 2005-11-15 03:28:46 UTC (rev 1266) +++ SQLObject/contrib/README.txt 2005-11-15 03:31:33 UTC (rev 1267) @@ -0,0 +1,17 @@ +SQLObject contrib/ +================== + +This directory is for indexing all the user contributions to SQLObject +that are not in the trunk, or directly in a branch. These +contributions typically do not contain copies of the SQLObject trunk, +but just bits of useful code for use with SQLObject. + +Users who are adding these modules should add them in subdirectories +of their home (svn.colorstudy.com/home/username/package). These will +be included in this directory through svn:externals; you can add those +with:: + + svn propedit svn:externals contrib/ + # adding a line: + package_name http://svn.colorstudy.com/home/username/package + Property changes on: SQLObject/contrib/README.txt ___________________________________________________________________ Name: svn:keywords + LastChangedDate LastChangedRevision Name: svn:eol-style + native |
|
From: <sub...@co...> - 2005-11-15 03:28:58
|
Author: ianb Date: 2005-11-15 03:28:46 +0000 (Tue, 15 Nov 2005) New Revision: 1266 Added: SQLObject/contrib/ Log: Creating a contrib directory which will serve as an index of non-core contributions |