[sqlalchemy] Session.mapper deprecation

2009-09-30 Thread Gaetan de Menten
Hi all, I've been trying to work around the Session.mapper deprecation warning in Elixir by providing the same functionality within Elixir. The question is whether _ScopedExt is considered deprecated too ? I guess it is but want to make sure to not duplicate code needlessly... -- Gaëtan de

[sqlalchemy] Re: Orm slow to update why?

2009-09-30 Thread Michael Bayer
Christian Démolis wrote: Thx for your answer. MakeReleased is a method of com object windows agent (self.agent = DispatchWithEvents('CosmoAgent.clsCCAgent', Evenement)) It takes 0 second to execute as we can see in the execute print yes I realized later there were two blocks of timer calls.

[sqlalchemy] Re: Session.mapper deprecation

2009-09-30 Thread Michael Bayer
Gaetan de Menten wrote: Hi all, I've been trying to work around the Session.mapper deprecation warning in Elixir by providing the same functionality within Elixir. The question is whether _ScopedExt is considered deprecated too ? I guess it is but want to make sure to not duplicate code

[sqlalchemy] Re: Session.mapper deprecation

2009-09-30 Thread Gaetan de Menten
On Wed, Sep 30, 2009 at 16:57, Michael Bayer mike...@zzzcomputing.com wrote: Gaetan de Menten wrote: I've been trying to work around the Session.mapper deprecation warning in Elixir by providing the same functionality within Elixir. The question is whether _ScopedExt is considered

[sqlalchemy] padding of CHAR fields, inconsistent where clause; Oracle example

2009-09-30 Thread volx
Hello all: Consider table: CREATE TABLE PRICE_SOURCES ( ID decimal(22) PRIMARY KEY NOT NULL, DESCRIPTION char(100) NOT NULL ) and this screen dump from ipython session: In [28]: import cx_Oracle In [29]: from sqlalchemy.ext.sqlsoup import SqlSoup In [30]: con =

[sqlalchemy] Re: padding of CHAR fields, inconsistent where clause; Oracle example

2009-09-30 Thread Michael Bayer
On Sep 30, 2:07 pm, volx victor.o...@gmail.com wrote: Hello all: Consider table: CREATE TABLE PRICE_SOURCES (    ID decimal(22) PRIMARY KEY NOT NULL,    DESCRIPTION char(100) NOT NULL ) and this screen dump from ipython session: In [28]: import cx_Oracle In [29]: from

[sqlalchemy] Re: SQLAlchemy is dropping columns on Oracle 10g

2009-09-30 Thread Andrew
On Sep 29, 6:14 pm, Michael Bayer mike...@zzzcomputing.com wrote: Andrew wrote: This is very confusing; I have an ORM generated SQL statement that is joining on a specific id. However, when I run it, for some reason, the specific id (that was joined on) is occasionally None! However,

[sqlalchemy] Re: padding of CHAR fields, inconsistent where clause; Oracle example

2009-09-30 Thread volx
I have just now and it looks that this post probably belongs on cx_Oracle mailing list. In [47]: cursor.execute(select * from price_sources where desciption = :someparam, dict(someparam='EJV')).fetchall() Out[47]: [] In [49]: cursor.execute(select * from price_sources where desciption =

[sqlalchemy] Aggregation funnctions as mapped column_properties

2009-09-30 Thread Bj
Hi, I'm trying to get aggregation functions to work as column_properties, but I'm having a hard time figuring it out. The example below doesnt work.. maybe someone can help? ratings = Table('ratings', metadata, Column('rating_key', Integer, primary_key=True), Column('user_id',

[sqlalchemy] Re: padding of CHAR fields, inconsistent where clause; Oracle example

2009-09-30 Thread volx
cx_Oracle actually has thread on that a topic at http://sourceforge.net/mailarchive/message.php?msg_id=47BED8B8.3983.00E5.0%40uwinnipeg.ca It boils down to having to specify a type for input parameter. Is that something I could plug-in as a decorator or would that need to be hacked on SqlAlchemy

[sqlalchemy] Re: padding of CHAR fields, inconsistent where clause; Oracle example

2009-09-30 Thread volx
I missed one important statement - prepare must be called on the query: query = select * from price_sources where description = :someparam cursor.prepare(query) cursor.setinputsizes(dict(someparam=cx_Oracle.FIXED_CHAR)) cursor.execute(query, dict(someparam='EJV')).fetchall() On Sep 30, 3:07 pm,

[sqlalchemy] Re: SQLAlchemy is dropping columns on Oracle 10g

2009-09-30 Thread Michael Bayer
Andrew wrote: On Sep 29, 6:14 pm, Michael Bayer mike...@zzzcomputing.com wrote: Andrew wrote: This is very confusing; I have an ORM generated SQL statement that is joining on a specific id. However, when I run it, for some reason, the specific id (that was joined on) is occasionally

[sqlalchemy] vertical partitioning

2009-09-30 Thread Adrian von Bidder
Heyho! Is there a tutorial on vertical partitioning? I have a table Entry and a table EntryFlags (1:1 relation from EntryFlags to Entry). The idea is that while there is a large number of Entry rows only a small number has flags set (and thus needs an entry in EntryFlags; note that they

[sqlalchemy] Re: SQLAlchemy is dropping columns on Oracle 10g

2009-09-30 Thread Andrew
On Sep 30, 3:19 pm, Michael Bayer mike...@zzzcomputing.com wrote: first of all, SQLA does generate (+) = if you set use_ansi=False in your oracle create_engine, and then use outerjoin.   Its obviously not a widely used feature and I'd be curious if it holds up with all your queries (it holds

[sqlalchemy] Re: padding of CHAR fields, inconsistent where clause; Oracle example

2009-09-30 Thread Michael Bayer
volx wrote: cx_Oracle actually has thread on that a topic at http://sourceforge.net/mailarchive/message.php?msg_id=47BED8B8.3983.00E5.0%40uwinnipeg.ca It boils down to having to specify a type for input parameter. Is that something I could plug-in as a decorator or would that need to be

[sqlalchemy] Re: SQLAlchemy is dropping columns on Oracle 10g

2009-09-30 Thread Michael Bayer
Andrew wrote: On Sep 30, 3:19 pm, Michael Bayer mike...@zzzcomputing.com wrote: first of all, SQLA does generate (+) = if you set use_ansi=False in your oracle create_engine, and then use outerjoin.   Its obviously not a widely used feature and I'd be curious if it holds up with all your

[sqlalchemy] Re: SQLAlchemy is dropping columns on Oracle 10g

2009-09-30 Thread Andrew
On Sep 30, 3:46 pm, Michael Bayer mike...@zzzcomputing.com wrote: what happens if you say: engine.execute(myquery.statement).fetchall() ? That worked (spaced out for readability): [ (Decimal('468811'), ... ), (Decimal('468810'), ... ), (Decimal('468721'), ...) , ...] What does this

[sqlalchemy] Re: vertical partitioning

2009-09-30 Thread Kevin Horn
On Wed, Sep 30, 2009 at 1:04 PM, Adrian von Bidder avbid...@fortytwo.chwrote: Heyho! Is there a tutorial on vertical partitioning? I have a table Entry and a table EntryFlags (1:1 relation from EntryFlags to Entry). The idea is that while there is a large number of Entry rows only a small

[sqlalchemy] Re: SQLAlchemy is dropping columns on Oracle 10g

2009-09-30 Thread Andrew
On Sep 30, 4:00 pm, Andrew redmu...@gmail.com wrote: On Sep 30, 3:46 pm, Michael Bayer mike...@zzzcomputing.com wrote: what happens if you say: engine.execute(myquery.statement).fetchall() ? That worked (spaced out for readability): [ (Decimal('468811'), ... ),

[sqlalchemy] Re: SQLAlchemy is dropping columns on Oracle 10g

2009-09-30 Thread Michael Bayer
Andrew wrote: On Sep 30, 3:46 pm, Michael Bayer mike...@zzzcomputing.com wrote: what happens if you say: engine.execute(myquery.statement).fetchall() ? That worked (spaced out for readability): [ (Decimal('468811'), ... ), (Decimal('468810'), ... ), (Decimal('468721'), ...) ,

[sqlalchemy] Re: SQLAlchemy is dropping columns on Oracle 10g

2009-09-30 Thread Michael Bayer
Andrew wrote: I also went ahead and checked the raw output of query.all()--it worked correctly; all the IDs were retrieved and displayed in raw format: Decimal(###) and so on. HOWEVER, when parsing those rows using a simple for loop, a'la str = for row in query.all():

[sqlalchemy] Re: SQLAlchemy is dropping columns on Oracle 10g

2009-09-30 Thread Andrew
On Sep 30, 4:31 pm, Michael Bayer mike...@zzzcomputing.com wrote: Andrew wrote: I also went ahead and checked the raw output of query.all()--it worked correctly; all the IDs were retrieved and displayed in raw format: Decimal(###) and so on.  HOWEVER, when parsing those rows using a

[sqlalchemy] Re: SQLAlchemy is dropping columns on Oracle 10g

2009-09-30 Thread Michael Bayer
Andrew wrote: On Sep 30, 4:31 pm, Michael Bayer mike...@zzzcomputing.com wrote: Andrew wrote: I also went ahead and checked the raw output of query.all()--it worked correctly; all the IDs were retrieved and displayed in raw format: Decimal(###) and so on.  HOWEVER, when parsing those

[sqlalchemy] Re: vertical partitioning

2009-09-30 Thread Adrian von Bidder
On Wednesday 30 September 2009 21.58:55 Kevin Horn wrote: I have a table Entry and a table EntryFlags (1:1 relation from EntryFlags to Entry). The idea is that while there is a large number of Entry rows only a small number has flags set (and thus needs an entry in EntryFlags; note that

[sqlalchemy] Re: NULL values sorting

2009-09-30 Thread alex9999
order_by(func.coalesce (items.c.code0, '00')) Works perfectly, thanks --~--~-~--~~~---~--~~ 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