Re: [SQLObject] MYSQL Transaction is not atomic

2006-04-09 Thread David Faure
e.g. ballot = Ballot(..., connection = t). Setting debug and debugOutput to True in the connection object is a good way to see the actual SQL being generated, and whether it's being issued inside the transaction or in another connection. -- David Faure -- [EMAIL PROTECTED], [EMAIL PROTECT

Re: [SQLObject] Patch: support for locking rows

2006-03-21 Thread David Faure
is created by that Aggregates constructor, isn't it? I must be misunderstanding the issue. Do you mean that it creates trouble when two instances of the script are running in parallel? It is true that I always ran it once first, to create the row. This probably means that there should be some i

Re: [SQLObject] high memory usage

2006-03-20 Thread David Faure
ne can just pass a connection (connection=my_connection). > for i in range(10): s/range/xrange/ might help reduce the memory consumption too. -- David Faure -- [EMAIL PROTECTED], [EMAIL PROTECTED] KDE/KOffice developer, Qt consultancy projects Klarälvdalens Datakonsult AB, Platform-in

Re: [SQLObject] Patch to make tableExists work with "db.table" table name

2006-03-14 Thread David Faure
== 1146: # ER_NO_SUCH_TABLE > return False > raise > > Right? Oops, sorry, my "svn diff without whitespace" fooled me. Yes, this is the intended patch. -- David Faure -- [EMAIL PROTECTED], [EMAIL PROTECTED] KDE/KOffice developer, Qt consultancy projects

Re: [SQLObject] Patch: support for locking rows

2006-03-09 Thread David Faure
;m not sure where it should go; e.g. the connection parameter of select isn't documented in SQLObject.txt (which is entry-level docu, not complete docu so it's understandable), and select() isn't in interface.py. -- David Faure -- [EMAIL PROTECTED], [EMAIL PROTECTED] KDE/KOffic

Re: [SQLObject] Patch to make tableExists work with "db.table" table name

2006-03-08 Thread David Faure
On Tuesday 21 February 2006 15:32, David Faure wrote: > SQLObject currently assumes that a default database was selected for the > connection. > However I'm using SQLObject in a C++ application which executes python > scripts, > and the connection doesn't have a defa

Re: [SQLObject] Patch: support for locking rows

2006-03-08 Thread David Faure
On Sunday 26 February 2006 16:46, Oleg Broytmann wrote: > On Wed, Feb 22, 2006 at 01:21:58AM +0100, David Faure wrote: > > +`createSQL`: > > + SQL queries run after table creation. createSQL can be a string with a > > + single SQL command, a list of SQL commands, or a

Re: [SQLObject] Rationale: Support for cache distribution delegates in SQLObject

2006-03-07 Thread David Faure
; is about "update" correctness within the transaction and not about cache correctness. It is not possible to select a value and then later update it in the same transaction, while maintaining ACID properties, without "for update." I think this is still true while using

[SQLObject] Rationale: Support for cache distribution delegates in SQLObject

2006-03-03 Thread David Faure
, then the need for (b) diminishes and we can rely more and more on (a) and on (c). We (myself and David Faure) are proposing that SQLObject support cache mechanisms that have the following properties: - when an object is persisted to the database, a registered delegate may distribute that obj

Re: [SQLObject] Patch: support for locking rows

2006-02-23 Thread David Faure
On Wednesday 22 February 2006 14:51, Oleg Broytmann wrote: > On Wed, Feb 22, 2006 at 02:48:42PM +0100, David Faure wrote: > > >Why do you want to lock the row with cacheValues=False? > > > > Because another process might be accessing the same table row at the same

Re: [SQLObject] Setting mysql engine for created tables

2006-02-22 Thread David Faure
On Wednesday 22 February 2006 10:13, Oleg Broytmann wrote: > On Wed, Feb 22, 2006 at 10:04:47AM +0100, David Faure wrote: > > There are 1000 things that one might want to do with ALTER TABLE... > >SQLObject is designed (at least that is an intent) to avoid direct > mani

Re: [SQLObject] Setting mysql engine for created tables

2006-02-22 Thread David Faure
On Wednesday 22 February 2006 09:48, you wrote: > On 2/21/06, David Faure <[EMAIL PROTECTED]> wrote: > > I'm looking for how to choose the mysql engine > > (http://mysql.speedbone.de/doc/refman/5.0/en/storage-engines.html) > > used by tables created by SQLObje

Re: [SQLObject] Patch: support for locking rows

2006-02-22 Thread David Faure
On Wednesday 22 February 2006 14:40, Oleg Broytmann wrote: > On Wed, Feb 22, 2006 at 02:34:59PM +0100, David Faure wrote: > > >class sqlmeta: > > > cacheValues = False > > > > > >Now EVERY access to an attribute causes SELECT or UPDATE. >

Re: [SQLObject] Patch: support for locking rows

2006-02-22 Thread David Faure
On Wednesday 22 February 2006 14:28, Oleg Broytmann wrote: > On Wed, Feb 22, 2006 at 02:21:06PM +0100, David Faure wrote: > > Could you help me a bit so that I can do the right thing then? > > What's the idea behind loadvalue and getvalue issueing a SELECT statement? > >

Re: [SQLObject] Patch: support for locking rows

2006-02-22 Thread David Faure
On Wednesday 22 February 2006 14:01, Oleg Broytmann wrote: > On Wed, Feb 22, 2006 at 01:26:49PM +0100, David Faure wrote: > > I think that sqlmeta.lockRows is the best way to make -all- selects lock > > rows, > >I dont think there is a general need to *always* lock ro

Re: [SQLObject] Patch: support for locking rows

2006-02-22 Thread David Faure
On Wednesday 22 February 2006 09:27, Oleg Broytmann wrote: > On Wed, Feb 22, 2006 at 01:21:58AM +0100, David Faure wrote: > > +`createSQL`: > > + SQL queries run after table creation. createSQL can be a string with a > > + single SQL command, a list of SQL commands, or a

Re: [SQLObject] Setting mysql engine for created tables

2006-02-22 Thread David Faure
On Wednesday 22 February 2006 09:48, BJörn Lindqvist wrote: > On 2/21/06, David Faure <[EMAIL PROTECTED]> wrote: > > I'm looking for how to choose the mysql engine > > (http://mysql.speedbone.de/doc/refman/5.0/en/storage-engines.html) > > used by tables created by

Re: [SQLObject] Setting mysql engine for created tables

2006-02-22 Thread David Faure
On Wednesday 22 February 2006 09:24, Oleg Broytmann wrote: > On Wed, Feb 22, 2006 at 12:32:47AM +0100, David Faure wrote: > > class TNSQLObject(SQLObject): > > class sqlmeta: > > # this solves the problem of the global naming style posted > > previ

[SQLObject] Patch: support for locking rows

2006-02-21 Thread David Faure
atement will be + ``FOR UPDATE`` so that the corresponding rows are write-locked until + the end of the current transaction. There is also one instance attribute: -- David Faure -- [EMAIL PROTECTED], [EMAIL PROTECTED] KDE/KOffice developer, Qt consultancy projects Klarälvdalens Datakonsu

[SQLObject] Setting mysql engine for created tables

2006-02-21 Thread David Faure
SQLs = map( replacer, tableCreateSQLs ) return tableCreateSQLs or [] def createTableSQL(self, soClass): Does this look OK? If yes can it be applied to CVS? -- David Faure -- [EMAIL PROTECTED], [EMAIL PROTECTED] KDE/KOffice developer, Qt consultancy projects Klarälvdalens

[SQLObject] Patch to make tableExists work with "db.table" table name; __connection__ question

2006-02-21 Thread David Faure
that getattr(cls, '_connection', None) works, and returns , which is indeed the connection I have set... It just got the default style back again, somehow... (I also tried "sqlobject.sqlhub.processConnection = connection", no change) -- David Faure -- [EMAIL PROTECTED], [EMAIL PRO