Re: [SQLObject] sqlbuilder REPLACE

2007-12-04 Thread Oleg Broytmann
On Tue, Dec 04, 2007 at 03:15:12PM -0800, Frank Conradie wrote: > * postgresql: does not even have any sort of REPLACE at all (AFAICT) It doesn't. > * sqlite: REPLACE works like its INSERT: /"The REPLACE command is an > alias for the "INSERT OR REPLACE" variant of the INSERT command. This >

Re: [SQLObject] sqlbuilder REPLACE

2007-12-04 Thread Frank Conradie
Oleg I see your point - I am using MySQL and didn't think about the other DB's. Looking more closely at the postgresql and sqlite docs, plus the fact that REPLACE is not standard SQL at all, I see that it will be quite a job to implement a more flexible Replace expression that supports all th

Re: [SQLObject] sqlbuilder REPLACE

2007-12-04 Thread Oleg Broytmann
On Tue, Dec 04, 2007 at 02:29:10PM -0800, Frank Conradie wrote: > I don't want to fight with you, but INSERT also supports SET: No, it doesn't (meaning "standard" SQL). http://www.postgresql.org/docs/7.3/static/sql-insert.html : INSERT INTO table [ ( column [, ...] ) ] { DEFAULT VALUES |

Re: [SQLObject] sqlbuilder REPLACE

2007-12-04 Thread Frank Conradie
Hi Oleg I don't want to fight with you, but INSERT also supports SET: INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name SET col_name={expr | DEFAULT}, ... And here is the REPLACE syntax: REPLACE [LOW_PRIORITY | DELAYED] [INTO] tbl_name SET col_name={expr | DE

Re: [SQLObject] refreshing atribute values, how?

2007-12-04 Thread Oleg Broytmann
On Tue, Dec 04, 2007 at 11:22:29PM +0100, Petr Jake?? wrote: > Or have I consider some other problem (bottle neck) than the performance of > the script? No, performance is the only concern. If you are satisfied - no problem. Oleg. -- Oleg Broytmannhttp://phd.pp.ru/

Re: [SQLObject] sqlbuilder REPLACE

2007-12-04 Thread Oleg Broytmann
On Tue, Dec 04, 2007 at 02:19:31PM -0800, Frank Conradie wrote: > I will have to disagree again - please read the page that you link to > below carefully: "|REPLACE| works exactly like |INSERT| SQLObject is more interested in syntax. SET and name/value pairs make it much more like UPDATE than

Re: [SQLObject] refreshing atribute values, how?

2007-12-04 Thread Petr Jakeš
> > On Tue, Dec 04, 2007 at 10:50:58PM +0100, Petr Jake?? wrote: > > I would like my atributes have actual values from the database in the > time > > they are used (called). > > Trying to googling and searching discussion goups for a while, I have > found > > following solution: > > > > class sqlme

Re: [SQLObject] sqlbuilder REPLACE

2007-12-04 Thread Frank Conradie
Hi Oleg I will have to disagree again - please read the page that you link to below carefully: "|REPLACE| works exactly like |INSERT|, except that if an old row in the table has the same value as a new row for a |PRIMARY KEY| or a |UNIQUE| index, the old row is deleted before the new row is i

Re: [SQLObject] SQLObject doesn't find Table on Ubuntu + MySQL 5.0.22

2007-12-04 Thread Oleg Broytmann
On Fri, Nov 30, 2007 at 10:10:45PM +0100, Nicolas Riedel wrote: > ProgrammingError: Table 'ntime.Worktime' doesn't exist [skip] > class Worktime(SQLObject): This looks as if someone (TurboGears?) has replaced style. The default style in SQLObject converts class names to lowercased table names b

Re: [SQLObject] sqlbuilder REPLACE

2007-12-04 Thread Oleg Broytmann
On Fri, Nov 30, 2007 at 08:44:18PM -0800, Frank Conradie wrote: > In sqlbuilder the "Replace" expression currently inherits from "Update", > but in MySQL, according to their official docs, "REPLACE works exactly > like INSERT", i.e. "REPLACE INTO ...". Thus it looks like it should > rather inher

Re: [SQLObject] refreshing atribute values, how?

2007-12-04 Thread Oleg Broytmann
On Tue, Dec 04, 2007 at 10:50:58PM +0100, Petr Jake?? wrote: > I would like my atributes have actual values from the database in the time > they are used (called). > Trying to googling and searching discussion goups for a while, I have found > following solution: > > class sqlmeta: > cache

[SQLObject] refreshing atribute values, how?

2007-12-04 Thread Petr Jakeš
I would like my atributes have actual values from the database in the time they are used (called). Trying to googling and searching discussion goups for a while, I have found following solution: class sqlmeta: cacheValues = False Is this the only solution how to solve this problem? Best