[sqlalchemy] Re: SQL ALCHEMY instantly refresh

2009-09-18 Thread Christian Démolis
Hello, Thx for the answer, thx to Alexandre to translate my mail. Sorry, i continue in english, i tried to do that at the end of my declaration file : Base.metadata.create_all(engine) import sqlalchemy.orm.query class MyQuery(sqlalchemy.orm.query.Query): def __init__(*arg, **kw):

[sqlalchemy] Re: SQL ALCHEMY instantly refresh

2009-09-18 Thread Alexandre Conrad
In Python, you have to pass self as first argument to all methods of a class: class MyQuery(sqlalchemy.orm.query.Query): def __init__(self, *arg, **kw): ... Alex 2009/9/18 Christian Démolis christiandemo...@gmail.com: Hello, Thx for the answer, thx to Alexandre to translate my

[sqlalchemy] Re: SQL ALCHEMY instantly refresh

2009-09-18 Thread Christian Démolis
^^ I m so shameful It works very well now. I post the subclass complete if anyone need it in future Base.metadata.create_all(engine) import sqlalchemy.orm.query from sqlalchemy.orm.query import Query class Query(Query): def __init__(self, *arg, **kw): print I pass here

[sqlalchemy] Re: Tables reflected in Postgresql + MySQL but not Oracle.

2009-09-18 Thread tomolds
Thanks for the help, I'm still having problems but I'm closer. Okay so I have taken the following steps: 1) Installed 0.6 from trunk. 2) Added echo='debug' to create_engine() When I add tables to the database I always specify them as schem.table_name as you mention. The SQL statement that

[sqlalchemy] Re: Tables reflected in Postgresql + MySQL but not Oracle.

2009-09-18 Thread Mike Conley
Did you verify that the full query gives results? SELECT table_name FROM all_tables WHERE nvl(tablespace_name, 'no tablespace') NOT IN ('SYSTEM', 'SYSAUX') AND owner = 'SCHEM'; I've been away from Oracle for a while, but I do remember it is unusual, but still possible for user's tables to be in

[sqlalchemy] Re: Tables reflected in Postgresql + MySQL but not Oracle.

2009-09-18 Thread tomolds
Yes, I forgot to say about this. The first query (the one that is conducted by SQLAlchemy) doesn't work when run on the database. The second query you provided, does work so it appears that my tables are actually stored in the SYSTEM tablespace. Do you know of a way around this? On 18 Sep,

[sqlalchemy] Re: Tables reflected in Postgresql + MySQL but not Oracle.

2009-09-18 Thread Mike Conley
What does the second query report for tablespace_name? SYSTEM? If so, you need to talk to your DBA about why the default tablespace for your owner is SYSTEM. Normally the system is configured to have user tables go somewhere else. From the SQLAlchemy side, the maintainers of

[sqlalchemy] Re: Tables reflected in Postgresql + MySQL but not Oracle.

2009-09-18 Thread tomolds
Okay it is clear that this is a tablespaces issue. I should have spotted it earlier. I'm sure all my problems will be resolved once I just change the tablespaces to something other than system or sysaux and get the default tablespace for the user changed. Thanks for the assistance. On 18 Sep,

[sqlalchemy] SQLAlchemy and logging

2009-09-18 Thread Vinay Sajip
Hi, I've just been discussing Python's logging package with Armin Ronacher of Pocoo over on stdlib-sig: http://mail.python.org/pipermail/stdlib-sig/2009-September/000671.html In that post, Armin says that the SQLAlchemy development team had a lot of problems with Python logging and had to do

[sqlalchemy] Oracle sequences

2009-09-18 Thread Kaukas
Hello. Should this be considered a bug? import sqlalchemy seq = sqlalchemy.Sequence('test_sequence', start=20) seq.create(my_oracle_engine) seq.execute(my_oracle_engine) 1 Thank you! Linas --~--~-~--~~~---~--~~ You received this message because you are

[sqlalchemy] Re: SQLAlchemy and logging

2009-09-18 Thread Michael Bayer
Vinay Sajip wrote: Hi, I've just been discussing Python's logging package with Armin Ronacher of Pocoo over on stdlib-sig: http://mail.python.org/pipermail/stdlib-sig/2009-September/000671.html In that post, Armin says that the SQLAlchemy development team had a lot of problems with

[sqlalchemy] Re: Oracle sequences

2009-09-18 Thread Michael Bayer
Kaukas wrote: Hello. Should this be considered a bug? import sqlalchemy seq = sqlalchemy.Sequence('test_sequence', start=20) seq.create(my_oracle_engine) seq.execute(my_oracle_engine) 1 Thank you! Linas I would say its a pending enhancement but since the start parameter is accepted

[sqlalchemy] Re: SQLAlchemy and logging

2009-09-18 Thread Vinay Sajip
On Sep 18, 3:49 pm, Michael Bayer mike...@zzzcomputing.com wrote: Vinay Sajip wrote: hmmm OK I think what he may be referring to is that we have this flag called echo which works like this: engine = create_engine(url, echo=True) what echo does is a shortcut to setting up logging and

[sqlalchemy] Re: OrderingList with a secondary table

2009-09-18 Thread Ritesh Nadhani
Hi I am looking for something similar. Any chance you can post an example? On Mon, May 25, 2009 at 5:13 AM, Christophe de VIENNE cdevie...@gmail.com wrote: Hi again, Sorry for answering my own message, but it seems that I found the solution. I will be using a combination of orderinglist

[sqlalchemy] checking a relationship exists

2009-09-18 Thread joeformd
Is there a simple way in SQLA to check if a relationship exists between two rows in a many-to-many situation, where the relationship is defined using another table? eg. the join table might look like this: user_towns = Table('user_towns', Base.metadata, Column('user_id', Integer,

[sqlalchemy] Strange LIKE behavior with TypeDecorator

2009-09-18 Thread Mike Orr
I have the following TypeDecorator type to store a tuple of strings as a delimited string. It works fine but I discovered an abnormality with LIKE. The right side of a like expression is being passed to the converter, so it has to be a one-item tuple instead of a string. This makes my model

[sqlalchemy] Re: checking a relationship exists

2009-09-18 Thread Michael Bayer
On Sep 18, 2009, at 7:44 PM, joeformd wrote: Is there a simple way in SQLA to check if a relationship exists between two rows in a many-to-many situation, where the relationship is defined using another table? eg. the join table might look like this: user_towns = Table('user_towns',

[sqlalchemy] Re: Strange LIKE behavior with TypeDecorator

2009-09-18 Thread Michael Bayer
On Sep 18, 2009, at 7:47 PM, Mike Orr wrote: I have the following TypeDecorator type to store a tuple of strings as a delimited string. It works fine but I discovered an abnormality with LIKE. The right side of a like expression is being passed to the converter, so it has to be a