I have added some rudimentary support for limit and offset. its not the fancy array-slice thing right now, its just a "limit" and an "offset" flag. I might look into adding more of the list interface type of thing later on.

caveats:

Oracle doesnt really have limit and offset. so the oracle module tries to wrap the query in a subquery and then use "rownum" to limit the rows. I use this technique all the time with Oracle but it is fundamentally sketchy, so its not ideal.

limit and offset can also be specified to a regular mapper.select(). however, things get tricky with regards to eager loading. in that case, its going to create a subquery to select the rows with the limit/offset, then eagerly select the objects joined against that subquery. I totally need to write test cases for this idea since its quite wacky.

SQL query construction:
http://www.sqlalchemy.org/docs/sqlconstruction.html#sql_select_options

mappers:
http://www.sqlalchemy.org/docs/ adv_datamapping.html#adv_datamapping_limits

im sure theres many more features missing, just keep them coming ! (and create tickets, thats the best way)
On Dec 6, 2005, at 3:21 PM, Sean Cazzell wrote:

Ok, SQLAlchemy looks great - but how do I specify limits and offsets to
queries?  I must be missing something in the docs :)


Thanks,

Sean



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to