Hi,
In order to achieve concurrency control using optimistic locking, we
are doing the following:
1. Adding a column in the table like this:
page_tbl = Table('page', metadata,
Column('page_id', Integer, primary_key=True, autoincrement=True),
Column('link_name', Unicode(30),
That is, in my case, lifetime of objects is much longer that
lifetime of all database-and-related stuff - and seems this is not
expected pattern of usage.
more questions on the theme.
What is the expected sequence / lifetime / pattern-of-usage for
engine, metadata, mappers, and finally, my
On Jun 21, 2007, at 4:50 AM, Sanjay wrote:
Hi,
In order to achieve concurrency control using optimistic locking, we
are doing the following:
1. Adding a column in the table like this:
page_tbl = Table('page', metadata,
Column('page_id', Integer, primary_key=True,
On Jun 21, 2007, at 6:59 AM, svilen wrote:
more questions on the theme.
What is the expected sequence / lifetime / pattern-of-usage for
engine, metadata, mappers, and finally, my objects?
mappers need tables and therefore metadata, objects have mapped
properties and therefore mappers. no
Thank you. Glad it worked out easily.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email
thanks a lot, that cleared some mist.
btw u can make a entry on the FAQ from this... e.g. lifetimes and
usage patterns - or similar.
The other rule inferred from above problem is
b) objects lifetime should be shorter than mappers (ORM); else
one needs to delete o._instance_key and
Hi -
those of you involved with the internal tinkerings of SQLAlchemy,
please join over on the sqlalchemy-devel group, which is also at
google groups:
http://groups.google.com/group/sqlalchemy-devel
- mike
--~--~-~--~~~---~--~~
You received this message
On Jun 20, 2:09 pm, Rick Morrison [EMAIL PROTECTED] wrote:
The SA MSSQL module currently supports the three DBAPI modules mentioned
above (pyodbc, pymssql, adodbapi).
You'll need to either get one of those three to import under IronPython, or
add support for the IPCE adaptor.
pyodbc,
I'm using MySQL and when I need to lock a table, I do:
conn = engine.connect()
conn._autocommit = dummyFunc
conn.execute(LOCK TABLES tablename WRITE)
try:
...
conn.execute(COMMIT)
except:
conn.execute(ROLLBACK)
...
finally:
conn = engine.connect()
trans = conn.begin()
...etc
trans.commit()
table locking is usually either implicit to SQL operations performed
within the transaction or using a construct like SELECT..FOR UPDATE,
but you can still issue your straight text if you like (but LOCK
TABLES isnt portable).
10 matches
Mail list logo