Hi!
I have a model with a parent-child relationship on the same entity.
The children collection on a parent instance has events set to intercept
adding and removing instances to/from it. This is needed to update an
attribute from the parent instance.
But when I delete an instance which is the
Hello,
I'm using SQLAlchemy 0.7.6 and PostgreSQL 9.0.7 which support a FOR
UPDATE and a FOR SHARE clause to lock selected rows.
I noticed that the .with_lockmode() method of the Query object
Hoping for advice: I'm using sqlalchemy against a legacy application's
database design, most of which isn't in my control. I have a situation
where single table inheritance should work beautifully but there is one
catch: of the 7 polymorphic sub classes, there is one which is allowed to
On Mar 21, 2012, at 9:49 AM, Kent wrote:
Hoping for advice: I'm using sqlalchemy against a legacy application's
database design, most of which isn't in my control. I have a situation where
single table inheritance should work beautifully but there is one catch: of
the 7 polymorphic sub
the PG dialect has only FOR UPDATE and FOR UPDATE NOWAIT at the moment,
easy enough to add more options though it would be helpful if someone could
volunteer a patch on it (with tests as always!):
http://www.sqlalchemy.org/trac/ticket/2445
On Mar 21, 2012, at 6:00 AM, Julien Cigar wrote:
On Mar 21, 2012, at 5:18 AM, Pau Tallada wrote:
Hi!
I have a model with a parent-child relationship on the same entity.
The children collection on a parent instance has events set to intercept
adding and removing instances to/from it. This is needed to update an
attribute from the
Hi Mike,
I would be happy to provide a patch (when I find some time).
I never made any patch for SQLAlchemy, what's the preferred method to do
it? Attach an `hg diff` to the ticket or a pull request on Bitbucket .. ?
Thanks,
Julien
On 03/21/2012 15:08, Michael Bayer wrote:
the PG dialect
That will work for me, thanks!
P.S. make a note that the doc statement that it will be a future release
should be updated.
On 3/21/2012 10:04 AM, Michael Bayer wrote:
also polymorphic_on can be any SQL expression in 0.7, like a CASE statement if
you wanted.
--
You received this message
On Mar 21, 2012, at 10:29 AM, Kent Bower wrote:
That will work for me, thanks!
P.S. make a note that the doc statement that it will be a future release
should be updated.
can you point me right to where it says that
On 3/21/2012 10:04 AM, Michael Bayer wrote:
also polymorphic_on
Yes, I meant that :P
I'll try with the before_flush_event.
Thanks!!
2012/3/21 Michael Bayer mike...@zzzcomputing.com
On Mar 21, 2012, at 5:18 AM, Pau Tallada wrote:
Hi!
I have a model with a parent-child relationship on the same entity.
The children collection on a parent instance has
I tried sqlit. it is fine.
engine = create_engine('sqlite+pysqlite:///file.db')
but, MySQL can't connect.
2012年3月21日水曜日12時46分23秒 UTC+9 shinriyo:
Hi there
I use sqlalchemy and Python3.2 and pymysql on Windows7.
I tried below
from sqlalchemy import *
engine =
it seems like you connect without a host using mysql.exe, so try:
create_engine('mysql+pymysql://teaspoon:teaspoon@/teaspoon')
otherwise you need to add an entry for 'teaspoon'@'localhost' to your user
table:
http://dev.mysql.com/doc/refman/5.0/en/connection-access.html
On Mar 21, 2012, at
*
Hi Michael Bayer
Thank you for your help.
I tried to change create_engine args you suggested below.
create_engine('mysql+pymysql://teaspoon:teaspoon@/teaspoon')
But, same problem was happened.
So, I create user table like the URL you tought me.
---
CREATE TABLE user
(
user VARCHAR(64),
13 matches
Mail list logo