Skip to content

Rails 4.2, Arel 6.0.0 support #3

@glennfu

Description

@glennfu

This fork here works great right now for Rails 4.1: https://github.com/jgrevzie/activerecord-sqlanywhere-adapter/tree/rails40

However in Rails 4.2, Arel 6.0.0 was introduced. With that came a whole lot of structural changes. The activerecord-fb-adapter implemented these changes by switching the Adapter based on the Arel version like so:

From: https://github.com/rowland/activerecord-fb-adapter/blob/4dd8f7c04e49ab39d0d80b5cad0a842bac0fa090/lib/active_record/connection_adapters/fb_adapter.rb

if Arel::VERSION < "6.0.0"
  require 'arel/visitors/fb'
else
  require 'arel/visitors/fb_collector'
end

The original 'arel/visitors/fb' lives here: https://github.com/rowland/activerecord-fb-adapter/blob/master/lib/arel/visitors/fb.rb
The new 'arel/visitors/fb_collector' lives here: https://github.com/rowland/activerecord-fb-adapter/blob/master/lib/arel/visitors/fb_collector.rb

Tagging @jgrevzie in hopes he sees this since he did such a great job with the other updates.

Unfortunately I'm brand new to the project that uses this gem so I don't have a test suite built up to ensure I wouldn't be breaking anything if I tried the implementation myself. I'm posting this in case it inspires someone else to take a stab at it. Maybe I'll come back to this in the future once I've gotten a bit more into it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions