Looks like I beat you to the answer by about 3 mins, thanks for
answering though. :)
I have a follow-up though. The foreign key constraints are not
getting created with ON DELETE CASCADE as expected. I tried this in
both MSSQL and Postgres. Is this expected behavior?
If so, is it possible to
I use PostgreSQL, but it does not matter, because when someone changes
the configuration it has still work.
a new Engine needs to be created in each child fork
If a worker can perform at any given time only one synchronous request
and for each worker I create a new engine, it does not have any
Hi Sergey,
I'll give it a try, thanks !
On 2 June 2011 03:15, Sergey V. sergey.volob...@gmail.com wrote:
Hi,
One easy/obvious improvement would be to delete all user's
identifiers and groups at once without iterating over them for
every user. Actually, iterating over the list of user_ids
Hi,
I experienced the exception while accessing a mysql database in
windows via sqlalchemy0.7.0.
It should be due to source code error in 0.7.0:
The member tables of class MetaData is created as immutabledict,
sqlalchemy\schema.py::line 2181
self.tables = util.immutabledict()
But the
Hello Everyone
My mysql server wait_timeout is set to 35.
and if i run this code:
# Session s made with autocommit=False
mm=s.query(ss.Machine).get(1)
In [9]:
In [10]: for i in range(1000):
: sleep(15)
: print commiting
: s.commit()
: sleep(25)
On Jun 2, 2011, at 3:14 AM, Randy Syring wrote:
Looks like I beat you to the answer by about 3 mins, thanks for
answering though. :)
I have a follow-up though. The foreign key constraints are not
getting created with ON DELETE CASCADE as expected. I tried this in
both MSSQL and
This is a bug (you've just discovered it, thanks !). I've added ticket #2181
for this and I'm hoping to do a pass for 0.7.1 this weekend. The issue is
specific to windows and MySQL (not a platform we get as much opportunity to
test on...).
I would be curious, if you are naming the table
The Session doesn't interact with the database until statements are first
emitted, so while its being put into a new transaction each time with your
block of code, probably nothing is being sent to the DB. If you stuck a line:
s.execute(select 1) in there, that would likely wake it up.
On
Hello Michael
Thanks a lot for your quick response.
I changed this loop to:
or i in range(1000):
: sleep(15)
: print commiting
: mm.name=u'old name'
: s.commit()
: sleep(25)
: mm.name=u'new name'
: print commiting2
On Jun 2, 2011, at 11:35 AM, Aalok Sood wrote:
Hello Michael
Thanks a lot for your quick response.
I changed this loop to:
or i in range(1000):
: sleep(15)
: print commiting
: mm.name=u'old name'
: s.commit()
: sleep(25)
:
Yes its all so very clear now, kind of obvious :)
Thank you for taking out time to help me.
Regards
Aalok Sood.
On Jun 2, 9:20 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 2, 2011, at 11:35 AM, Aalok Sood wrote:
Hello Michael
Thanks a lot for your quick response.
I
I am trying to issue a straight SQL TRUNCATE table command:
engine = engine_from_config(config, 'sqlalchemy.')
connection = engine.connect()
connection.execute('truncate table cms_history;')
Everything runs fine without error -- but the table does not truncate
-- nothing is affected. Am I
I found the answer. I needs to be wrapped in a transaction, like this:
engine = engine_from_config(config, 'sqlalchemy.')
connection = engine.connect()
trans = connection.begin()
try:
connection.execute('truncate table cms_history;')
not to answer every question today, but we also added an autocommit flag for
this kind of thing:
connection.execution_options(autocommit=True).execute(statement that normally
isn't autocommit)
some background:
http://www.sqlalchemy.org/docs/core/connections.html#understanding-autocommit
On
Hi,
I want to establish a relationship with an object whose key is defined
inside a JSON BLOB column in the child. Naively, I know I can do this
via a regular python @property that uses object_session() to then do a
query() using the id from inside the blob. Is there a better way that
lets
Using a BLOB as a key is a really bad idea and wont work on all backends, but
other than the database-level limitations inherent, SQLAlchemy will let you set
up whatever column you'd like to use as the key just fine within a
relationship(). Guessing what the problem might be. Foreign key ?
I'm not intending for the contents of the BLOB to be readable to
MySQL. It would only be cracked open and read from within Python.
Meaning Python only knows what the key actually is. So yeah, I
understand the caveats of this approach. I merely want to provide a
mechanism to, as a second
On Thu, Jun 2, 2011 at 5:18 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 2, 2011, at 8:11 PM, Ben Chess wrote:
I'm not intending for the contents of the BLOB to be readable to
MySQL. It would only be cracked open and read from within Python.
Meaning Python only knows what the
On Jun 2, 2011, at 8:25 PM, Ben Chess wrote:
On Thu, Jun 2, 2011 at 5:18 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
On Jun 2, 2011, at 8:11 PM, Ben Chess wrote:
I'm not intending for the contents of the BLOB to be readable to
MySQL. It would only be cracked open and read from
Sounds far more complicated than something I'd want to take on.
Thanks for your thoughts and the detailed response.
Ben
On Thu, Jun 2, 2011 at 6:28 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 2, 2011, at 8:25 PM, Ben Chess wrote:
On Thu, Jun 2, 2011 at 5:18 PM, Michael Bayer
Thanks, the patch works now.
Jun Zhou
--
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 to
sqlalchemy+unsubscr...@googlegroups.com.
For
That was it, thanks. I was trying to go through the column and looking
at it's foreign_keys collection. When I set those values, it didn't
affect the output. Reflects my ignorance of SA, obviously.
Thanks again.
--
Randy Syring
Intelicom
Direct:
22 matches
Mail list logo