afair / postgresql_cursor

ActiveRecord PostgreSQL Adapter extension for using a cursor to return a large result set
MIT License
612 stars 47 forks source link

Add configuration for own name of cursor #38

Closed isqad closed 5 years ago

isqad commented 6 years ago

I'd like to assign my own name of cursor during declare. Here it is defined rigidly:

https://github.com/afair/postgresql_cursor/blob/410748762c4d97c93a8095070ea872a1e75739a1/lib/postgresql_cursor/cursor.rb#L180

afair commented 5 years ago

I added that capability in commit 3ba3253. Use the cursor_name: "myname" (which must be a valid cursor name. I am curious why you would need this? Perhaps tracing though the system.