On Monday, August 19, 2013 10:52:15 AM UTC-7, BH wrote:
>
> When iterating over rows in a postgres DB using 'use_cursor', the 
> underlying 'cursor_fetch_rows' always names the cursor 'sequel_cursor'. 
>  This means that use_cursor calls cannot be embedded within each other 
> (say, for doing joins in memory).  Is it possible to have an optimal 
> :cursor_name argument passed to 'use_cursor' to prevent this? 
>

Such a thing is possible as you demonstrate.  In general, Dataset#each 
calls cannot be nested in Sequel.  However, the postgres adapter supports 
nesting of Dataset#each if you aren't using sequel_pg streaming, so I don't 
think there will be any inconsistency if we support manually overriding the 
cursor name via an option.

Note that patches should generally be submitted as diffs and include 
updates to the test suite and the documentation.  If you can provide a 
patch that does that, I'll definitely consider it.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to