sorry somehow hit the enter button. I'll repeat here:

We are porting some stored procs and need a cross driver implementation 
specifically across oracle and postgres but ideally across all major 
popular rdms and at the very least MS Sequel Server.

Our approach is to use the jdbc drivers since we want to deploy on Jruby 
for various reasons.

Given that it seems that our only strategy would be to use pagination but 
just in case I want to create some leeway in case we decide for example to 
support the native pg driver which now Sequel has the use_cursor support. 

thus my idea is to do something like this:

def cursor a_table

    a_table.paginate

end 

the idea is that this will return a "paginated" view to which we can apply 
where criteria. 

Here's an example of the stored proc code I'm trying to port to Sequel:

CURSOR my_cursor RETURN my_table%ROWTYPE IS 
        SELECT * FROM my_table where col1 = 'V'
   ORDER BY col2
        FOR UPDATE; 

the idea is that later if need be I can add some instrospection to said 
method above to determine whether a native pg driver is being use , if so 
then leverage the "use_cursor" call but otherwise default to the use of 
pagination.

So concretely I guess I'm asking:


   1. do paginated datasets implement all dataset behaviors and thus allow 
   me to use the same filter , where and etc methods ?
   2. what instrospection is available so that I can determine if I'm using 
   a native pg driver i.e. do I just determine that by looking at the 
   connection string or is there something more elegant.
   3. If anything else comes to mind pls share:)

thank you kindly for your help

-Charles






>

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


Reply via email to