[sqlalchemy] How can I perform one query with a sort on unicode field with sqlalchemy and sqlite backend. I need to use collations features ?

2009-04-07 Thread KLEIN Stéphane
Hi, I use sqlalchemy with sqlite backend. I've one table with unicodes fields. When I launch one query with order statement on unicode field, I've bad sort result. I've one issue with all no ASCII characters. I've see some information about sqlite collation (

[sqlalchemy] Mapper with declarative

2009-04-07 Thread Scripper
Hello everyone, I have a concrete question about using declarative mapper in my project. There are three tables: user, services and objects Class Services(Base): user_id = Column(user_id, Integer, ForeignKey (user_table.user_id)) .. Class Objects(Base): user_id =

[sqlalchemy] Mapper with declarative

2009-04-07 Thread Scripper
Hello everyone, I have a concrete question about using declarative mapper in my project. There are three tables: user, services and objects Class Services(Base): user_id = Column(user_id, Integer, ForeignKey (user_table.user_id)) .. Class Objects(Base): user_id =

[sqlalchemy] Mapper with declarative

2009-04-07 Thread Scripper
Hello everyone, I have a concrete question about the declarative mapper in my project. There are three tables: user, services and objects Class Services(Base): mote_id = Column(mote_id, Integer, ForeignKey (mote_table.mote_id)) Class Objects(Base): mote_id = Column(mote_id,

[sqlalchemy] Mapper with declarative

2009-04-07 Thread Scripper
Hello everyone, I have a concrete question about using declarative mapper in my project. There are three tables: user, services and objects Class Services(Base): user_id = Column(user_id, Integer, ForeignKey (user_table.user_id)) .. Class Objects(Base): user_id =

[sqlalchemy] Re: How can I perform one query with a sort on unicode field with sqlalchemy and sqlite backend. I need to use collations features ?

2009-04-07 Thread Michael Bayer
you're free to access the raw connection and use the pysqlite create_collation method. If you'd like to assemble this on all connections, look into the PoolListener API described in

[sqlalchemy] Re: Mapper with declarative

2009-04-07 Thread Michael Bayer
Scripper wrote: When i there appeared some errors. I wonder whether declarative mapper supports two relation in a single class. Thanks! a single class can have as many relation()s or other properties as you'd like. --~--~-~--~~~---~--~~ You received this

[sqlalchemy] Re: eagerload and count() doesn't use join

2009-04-07 Thread Michael Bayer
sector119 wrote: meta.Session.query(model.Report).join((model.User, model.Report.reporter_id==model.User.id)).filter(model.User.office_id==62).count() 18:08:29,568 INFO [sqlalchemy.engine.base.Engine.0x...888c] SELECT count(1) AS count_1 FROM system.reports JOIN system.users ON

[sqlalchemy] Re: Mapper with declarative

2009-04-07 Thread J. Cliff Dyer
On Tue, 2009-04-07 at 06:28 -0700, Scripper wrote: Hello everyone, I have a concrete question about using declarative mapper in my project. When i there appeared some errors. I wonder whether declarative mapper supports two relation in a single class. Thanks! Well, so far, that's an

[sqlalchemy] Re: How can I perform one query with a sort on unicode field with sqlalchemy and sqlite backend. I need to use collations features ?

2009-04-07 Thread KLEIN Stéphane
On 7 avr, 16:31, Michael Bayer mike...@zzzcomputing.com wrote: you're free to access the raw connection and use the pysqlite create_collation method.  If you'd like to assemble this on all connections, look into the PoolListener API described

[sqlalchemy] 0.5.3 and mssql

2009-04-07 Thread Lukasz Szybalski
Hello, Is this still proper connection string for mssql where I specify the tds version and a connection driver name? e = sqlalchemy.create_engine(mssql://user:p...@server:1433/db_name?driver=TDSodbc_options='TDS_Version=8.0') What is the syntax for driver, and how can I pass TDS_Version=8.0

[sqlalchemy] Re: select A join B where B is null

2009-04-07 Thread David Gardner
Thanks that ended up working. so a query like this would do it: session.query(JobInfo).filter(~JobInfo.Job.has() -- David Gardner Pipeline Tools Programmer, Sid the Science Kid Jim Henson Creature Shop dgard...@creatureshop.com --~--~-~--~~~---~--~~ You

[sqlalchemy] Re: How can I perform one query with a sort on unicode field with sqlalchemy and sqlite backend. I need to use collations features ?

2009-04-07 Thread Michael Bayer
KLEIN Stéphane wrote: On 7 avr, 16:31, Michael Bayer mike...@zzzcomputing.com wrote: you're free to access the raw connection and use the pysqlite create_collation method.  If you'd like to assemble this on all connections, look into the PoolListener API described

[sqlalchemy] Re: How can I perform one query with a sort on unicode field with sqlalchemy and sqlite backend. I need to use collations features ?

2009-04-07 Thread KLEIN Stéphane
On 7 avr, 22:16, Michael Bayer mike...@zzzcomputing.com wrote: KLEIN Stéphane wrote: On 7 avr, 16:31, Michael Bayer mike...@zzzcomputing.com wrote: you're free to access the raw connection and use the pysqlite create_collation method.  If you'd like to assemble this on all connections,

[sqlalchemy] Re: How can I perform one query with a sort on unicode field with sqlalchemy and sqlite backend. I need to use collations features ?

2009-04-07 Thread KLEIN Stéphane
On 7 avr, 22:16, Michael Bayer mike...@zzzcomputing.com wrote: KLEIN Stéphane wrote: On 7 avr, 16:31, Michael Bayer mike...@zzzcomputing.com wrote: you're free to access the raw connection and use the pysqlite create_collation method.  If you'd like to assemble this on all connections,

[sqlalchemy] Calling Oracle Stored Procedures Having Out Cursor Parameter

2009-04-07 Thread cbaron
Hey all, I have to call some pre-existing Oracle stored procedures that have cursor out parameters. I've had no luck doing this short of using raw cursors. Is there a better way to do this? Here is a simple stored procedure modelled after what I have to call: create or replace package

[sqlalchemy] When to create new sessions?

2009-04-07 Thread rintin...@googlemail.com
Hey Everyone, I'm new to SQLAlchemy (used to using Django's ORM but need to switch) and there's just one thing I'm struggling with, which is when am I supposed to create Sessions? I am of course creating scoped sessions. I feel like a real dunce for not being able to get my head around it. Do I

[sqlalchemy] Re: How can I perform one query with a sort on unicode field with sqlalchemy and sqlite backend. I need to use collations features ?

2009-04-07 Thread Michael Bayer
On Apr 7, 2009, at 5:09 PM, KLEIN Stéphane wrote: Is there a solution to define this collate at the level of mapper or table definition ? I would like define this parameter globally to my application. there's an old trac ticket to somehow implement full collation ability but I think

[sqlalchemy] Re: Calling Oracle Stored Procedures Having Out Cursor Parameter

2009-04-07 Thread Michael Bayer
On Apr 7, 2009, at 4:11 PM, cbaron wrote: Hey all, I have to call some pre-existing Oracle stored procedures that have cursor out parameters. I've had no luck doing this short of using raw cursors. Is there a better way to do this? we have an outparam construct which makes use of

[sqlalchemy] Re: When to create new sessions?

2009-04-07 Thread Michael Bayer
On Apr 7, 2009, at 6:07 PM, rintin...@googlemail.com wrote: Hey Everyone, I'm new to SQLAlchemy (used to using Django's ORM but need to switch) and there's just one thing I'm struggling with, which is when am I supposed to create Sessions? I am of course creating scoped sessions. I feel