Re: [SQLObject] Question about orderby

2007-07-17 Thread RO
On 7/17/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Tue, Jul 17, 2007 at 11:59:05AM +0800, ro wrote: > > On 7/16/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > > >On Mon, Jul 16, 2007 at 05:07:33PM +0800, ro wrote: > > > About MultipleJoin: it d

Re: [SQLObject] Question about orderby

2007-07-16 Thread ro
On 7/16/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Mon, Jul 16, 2007 at 05:07:33PM +0800, ro wrote: > About MultipleJoin: it doesn't use backend's ORDER BY, it sorts itself > in Python, hence the order "uppercase before lowercase". To use backend

Re: [SQLObject] Question about orderby

2007-07-16 Thread ro
On 7/16/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Mon, Jul 16, 2007 at 04:54:54PM +0800, ro wrote: > > The result of SqlObject give me is the uppercase before lowercase, for > > example: > > the "GetLastModifiedTime" before the "functions&quo

Re: [SQLObject] Question about orderby

2007-07-16 Thread ro
On 7/16/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Mon, Jul 16, 2007 at 04:54:54PM +0800, ro wrote: > > pages = MultipleJoin('Page', orderBy='name') > > > > I can get the pages from Space but the orderby is different the "order > >

[SQLObject] Question about orderby

2007-07-16 Thread ro
hi all I meet a problem I have create a column as class Space(SQLObject): pages = MultipleJoin('Page', orderBy='name') I can get the pages from Space but the orderby is different the "order by" in a normal SQL syntax. The result of SqlObject give me is the uppercase before lowercase, for ex

[SQLObject] problem while _get_ function with parameter

2007-05-17 Thread ro
hi all I meet a problem I write a _get_ function in my class: class Page(SQLObject): ... def _get_link_copy_by_space(self, space_id): return None And while I call this function by such code: page = Page.get(page_id) page.link_copy_by_space(space.id) sqlobject give me th

Re: [SQLObject] How to use Update

2007-05-17 Thread ro
On 5/17/07, ro <[EMAIL PROTECTED]> wrote: > On 5/16/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > > Page._connection.query(Page._connection.sqlrepr( > > Update(Page.sqlmeta.table, {"synchronized": True}, where=Space.q.id==1) > > )) > > >

Re: [SQLObject] How to use Update

2007-05-17 Thread ro
On 5/16/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Wed, May 16, 2007 at 08:36:00PM +0800, ro wrote: > > I need to update all of records' synchronized attribute to 'True' in > > page table where the space.id is 1. > > > > fr

Re: [SQLObject] How to use Update

2007-05-16 Thread ro
On 5/16/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Wed, May 16, 2007 at 09:02:38PM +0800, ro wrote: > > Include the MySQL question:) > > Does my advice work? (I do not use MySQL personally so I have to rely on > patches and tests from other people.) > > O

Re: [SQLObject] How to use Update

2007-05-16 Thread ro
On 5/16/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Wed, May 16, 2007 at 08:58:28PM +0800, ro wrote: > > I want to learn that, which document introduce it? > > Source code ;) Want to submit documentation patches?.. > Yes, of course. Include the MySQL question:

Re: [SQLObject] How to use Update

2007-05-16 Thread ro
On 5/16/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Wed, May 16, 2007 at 08:36:00PM +0800, ro wrote: > > I need to update all of records' synchronized attribute to 'True' in > > page table where the space.id is 1. > > > > fr

[SQLObject] UTF8 problem while SQLObject vs MySQL

2007-05-16 Thread ro
hi all While I use sqlobject to commit UTF8 string to MySQL, this error caused File "d:\python24\lib\site-packages\SQLObject-0.7.5-py2.4.egg\sqlobject\mysql\mysqlconnection.py", line 77, in _executeRetry myquery = unicode(query, self.encoding) UnicodeDecodeError: 'ascii' codec can't decode by

[SQLObject] How to use Update

2007-05-16 Thread ro
Hi all I want to update a table named Space that have a column pages: class Space(SQLObject): .. pages = MultipleJoin('Page', orderBy=['type', 'name']) And there is Page class: class Page(SQLObject): ... space = ForeignKey('Space') synchronized = BoolCol(default=False) I need