[sqlalchemy] SAContext 0.3.0

2007-07-10 Thread Mike Orr
SAContext is a SQLAlchemy front end that organizes your engines, metadatas, and sessions into one convenient object, while still allowing access to the underlying objects for advanced use. Version 0.3.0 attempts to handle and document all the use cases that have been thrown at it: one database,

[sqlalchemy] Re: Pagination problems using SQLAlchemy & MSSQL in Pylons - no OFFSET

2007-07-10 Thread BruceC
Thank you all for looking into this - most appreciated! On Jul 10, 6:13 pm, "Paul Johnston" <[EMAIL PROTECTED]> wrote: > Hi, > > if 2005 supports ROW_NUMBER() OVER ORDER BY like oracle does, then yes > > > this could be a possible feature enhancement. > > Another approach that occured to me is do

[sqlalchemy] Re: problem with order_by and Eager loading

2007-07-10 Thread Michael Bayer
eager loads are aliased to prevent them from interfering with your normal query criterion, which may include joins to the same tables which are being eagerly loaded. similarly, the eager load queries, when ordered, are usually intended to control the ordering of the *child items*, not the

[sqlalchemy] problem with order_by and Eager loading

2007-07-10 Thread schettino72
Hello, I am trying apply the order_by method on a query with a mapper that uses eager loading. mapper(User, users_table, properties = { 'addresses' : relation(Address, backref=backref('user', lazy=False)) }) ... session.query(Address).order_by(asc(User.c.user_name)).select() When

[sqlalchemy] Re: Colon Errors with Explicit SQL Queries

2007-07-10 Thread Michael Bayer
http://www.sqlalchemy.org/docs/sqlconstruction.html#sql_textual_textual_binds --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Colon Errors with Explicit SQL Queries

2007-07-10 Thread Moses Ting
Thanks for the quick response Mike. Now I'm interested in finding out how to use the ':' as a bind parameter, where is it stated in the documentation? On Jul 10, 11:25 am, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Jul 10, 2007, at 11:21 AM, Moses Ting wrote: > > > > > Anyone having problems

[sqlalchemy] Re: Idea for 0.4: URI params / create_engine arguments

2007-07-10 Thread Rick Morrison
> > > ugh...i was so happy that Dialect could be written with normal > keyword arguments.while i want "comprehensive", i didnt > necessarily want to require a "getopt" layer for every dialect (as > well as every Engine class, every Pool class, etc). Well the enumeration of the options target

[sqlalchemy] Re: Idea for 0.4: URI params / create_engine arguments

2007-07-10 Thread Michael Bayer
On Jul 10, 2007, at 12:06 PM, Rick Morrison wrote: > Well the enumeration of the options targeted for a specific class > has to be specified somewhere. Otherwise, we'll end up passing its > constructor the entire dictionary of options, and it will raise > errors because of invalid keywords

[sqlalchemy] Re: Colon Errors with Explicit SQL Queries

2007-07-10 Thread Michael Bayer
On Jul 10, 2007, at 11:21 AM, Moses Ting wrote: > > Anyone having problems (or know how the remedy) to the following issue > with using a colon in your custom SQL statement: > > SQL = """ > select * from mytable > where timestamp > '2007-07-07 00:05:00'; > """ > res

[sqlalchemy] Colon Errors with Explicit SQL Queries

2007-07-10 Thread Moses Ting
Anyone having problems (or know how the remedy) to the following issue with using a colon in your custom SQL statement: SQL = """ select * from mytable where timestamp > '2007-07-07 00:05:00'; """ result = engine.text(sql).execute() It returns the following error:

[sqlalchemy] Re: Pagination problems using SQLAlchemy & MSSQL in Pylons - no OFFSET

2007-07-10 Thread Paul Johnston
Hi, if 2005 supports ROW_NUMBER() OVER ORDER BY like oracle does, then yes > this could be a possible feature enhancement. > Another approach that occured to me is doing TOP (limit+offset) then seeking the cursor. For server-side cursors this is probably nearly as efficient as LIMIT/OFFSET. I've