"limit" is not really portable to all databases; in some cases  
(particularly Oracle) SQLAlchemy has to use some completely different  
syntaxes to come up with LIMIT.

Additionally, the purpose of a bind parameter is to represent data  
that is compared against or inserted into a column expression.    
Whereas the LIMIT expression is part of the SQL construct  
itself...seems like PG and sqlite both allow it though but im not  
sure how oracle, mssql can deal with it (im pretty sure mysql allows  
it).

more importantly whats the use case here ?  just trying to cut down  
on the time SQLAlchemy spends compile statements ?


On Sep 18, 2007, at 5:30 PM, dykang wrote:

>
> Hi,
>
> I was trying to write a query where the limit clause was actually a
> bind param, however it appears that, (in 3.10), this isn't possible.
> Am I missing something, or is this a bug?
>
> for example I'm just doing
> s = select ([Table], whereclause, limit=bindparam('mylimit'))
> s.execute(mylimit=5)
>
>
> Can someone tell me if this is not a supported behavior, or what I
> need to do for this to work?
>
> Thanks,
> D
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to