ARel Sybase ASE visitor
Arel is a Relational Algebra for Ruby. Read more about arel on http://github.com/rails/arel
This repository contains an Arel Visitor for Sybase ASE, that implements .limit() and .offset() using ROWCOUNT and Server-Side Cursors. Because cursors must be declared in their own batch, this visitor requires a patched sybase adapter, available onto a public IFAD GitHub Repository
Bundler is required. Gemfile:
gem 'activerecord-sybase-adapter', :git => 'git://github.com/ifad/activerecord-sybase-adapter' gem 'arel-sybase-visitor', :git => 'git://github.com/ifad/arel-sybase-visitor'
config.after_initialize do require 'arel/visitors/sybase' end
The above is quite dirty, will be fixed soon.
Sybase ASE >= 15.0 - for SCROLL CURSORS. Use the ase_12_5 branch if you're stuck at the 12.5 version. arel ~> 2.0.7 - earlier releases won't work.