avdd wrote:
I'm glad you brought this up. It seems to me that the the declarative
instrumentation keys classes by their unqualified class name,
precluding using the same class name for different declarative
subclasses (ie, in different modules).
Indeed, but I suspect there's more to it than
Hi,
I'm using PostgreSQL advisory locks in a multithreaded program. Worker
threads acquire locks with
session.execute(select([func.pg_advisory_lock(key)])) during a
transaction and release them just after session.commit(). Sometimes
however, the connection behind the thread's session will have
Hello,
I'm building a CMS-like webapp where I use inheritance a lot.
One feature that I would like to allow is that when an user add a new
section (a new container), he would be able to select the default
with_polymorphic() clause, order_by, objects per page when browsing the
container, etc.
Hi guys.
I've got a little problem with the sqlalchemy syntax.
I've got two tables with relations:
Table_Goups
id int(4) PrimaryKey not null,
name varchar(50) not null;
and
Table_User
id int(4) Primary Key not null,
login varchar(50) not null,
id_group int(4) Foreign Key not null;
i would
On Aug 24, 2010, at 3:04 AM, Chris Withers wrote:
avdd wrote:
I'm glad you brought this up. It seems to me that the the declarative
instrumentation keys classes by their unqualified class name,
precluding using the same class name for different declarative
subclasses (ie, in different
On Aug 24, 2010, at 6:12 AM, Julien Demoor wrote:
Hi,
I'm using PostgreSQL advisory locks in a multithreaded program. Worker
threads acquire locks with
session.execute(select([func.pg_advisory_lock(key)])) during a
transaction and release them just after session.commit(). Sometimes
Hi,
On 24/08/2010 10:14, Dobrysmak wrote:
Hi guys.
I've got a little problem with the sqlalchemy syntax.
I've got two tables with relations:
Table_Goups
id int(4) PrimaryKey not null,
name varchar(50) not null;
and
Table_User
id int(4) Primary Key not null,
login varchar(50) not null,
On 24/08/2010 15:53, werner wrote:
Hi,
On 24/08/2010 10:14, Dobrysmak wrote:
Hi guys.
I've got a little problem with the sqlalchemy syntax.
I've got two tables with relations:
Table_Goups
id int(4) PrimaryKey not null,
name varchar(50) not null;
and
Table_User
id int(4) Primary Key not
Thanks a lot, that solves my problem. Also it seems to work well
without instantiating the scoped session, so this is perfect.
On Aug 24, 3:13 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Aug 24, 2010, at 6:12 AM, Julien Demoor wrote:
Hi,
I'm using PostgreSQL advisory locks in a
Hello,
I am trying to reflect the example from
http://hg.sqlalchemy.org/sqlalchemy/file/04c17c7d88d6/examples/association/basic_association.py
but with my own data structures.
I want to manage nutrients, nutrient values and nutrition lists.
Therefore I have created a custom data type weight
On Aug 24, 2010, at 11:03 AM, Frank wrote:
Hello,
I am trying to reflect the example from
http://hg.sqlalchemy.org/sqlalchemy/file/04c17c7d88d6/examples/association/basic_association.py
but with my own data structures.
I want to manage nutrients, nutrient values and nutrition lists.
On Sat, Aug 21, 2010 at 01:45:48PM -0400, Michael Bayer wrote:
columns in a property
column = prop.columns[0]
props = []
for pr in mapper.iterate_properties:
if isinstance(pr, properties.RelationProperty):
if pr.direction.name in ('MANYTOONE',):
I'm holding an orm object that will have changes made to it. Once done it will
be passed to the business logic layer that will have to make decisions from the
before and after state of the object...
What's the best way to get an object, save its state ('before'), modify it
('after) without
On Aug 24, 2010, at 2:08 PM, Michael Hipp wrote:
I'm holding an orm object that will have changes made to it. Once done it
will be passed to the business logic layer that will have to make decisions
from the before and after state of the object...
What's the best way to get an object,
Greetings,
I was playing around and trying to extend the DeclarativeBase with
some Elixir like functions...
I may be to green in Python itself that I'm missing something though,
here's what I got...
class ModelBase(DeclarativeMeta):
@classmethod
def get(cls, id):
row =
On 8/24/2010 1:51 PM, Michael Bayer wrote:
On Aug 24, 2010, at 2:08 PM, Michael Hipp wrote:
I'm holding an orm object that will have changes made to it. Once done it will
be passed to the business logic layer that will have to make decisions from the
before and after state of the object...
Michael Hipp wrote:
On 8/24/2010 1:51 PM, Michael Bayer wrote:
On Aug 24, 2010, at 2:08 PM, Michael Hipp wrote:
I'm holding an orm object that will have changes made to it. Once done
it will be passed to the business logic layer that will have to make
decisions from the before and after
On Aug 24, 2010, at 7:54 PM, waugust wrote:
Greetings,
I was playing around and trying to extend the DeclarativeBase with
some Elixir like functions...
I may be to green in Python itself that I'm missing something though,
here's what I got...
class ModelBase(DeclarativeMeta):
In the code below I set up two users using an orm session, and then
delete one of them with a second orm session.
import sqlalchemy as sa
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
Base = declarative_base()
class User(Base):
On Aug 25, 12:01 am, Fernando Takai fernando.ta...@gmail.com wrote:
Have you tried:
#delete the fred user...
name_to_delete = fred
s2 = Session()
s2.query(User).filter_by(name = name_to_delete).delete()
s2.commit()
?
No I had not... :( That works absolutely perfectly, though with
20 matches
Mail list logo