Sha256: 5a7a21e3e4660def3cdabe221f39557ac8bbdbfd3e75263b7eaf90d2d15271ab

Contents?: true

Size: 1.29 KB

Versions: 22

Compression:

Stored size: 1.29 KB

Contents

== Rails SQL Views

Library which adds SQL Views to Rails. Adds create_view and drop_view to the ActiveRecord::ConnectionAdapters::AbstractAdapter (which makes them available to migrations) and adds support for dumping views in the ActiveRecord::SchemaDumper.

== Installation

To install:

  gem install rails_sql_views
 
Then add the following to your Rails config/environment.rb:

  require_gem 'rails_sql_views'
  require 'rails_sql_views'

== Usage

You can then use create_view and drop_view in your migrations. For example:

  class CreatePersonView < ActiveRecord::Migration
    def self.up
      create_view :v_people, "select * from people" do |t|
        t.column :id
        t.column :name
        t.column :social_security
      end
    end

    def self.down
      drop_view :v_people
    end
  end
  
This extension also adds support for views in the ActiveRecord::SchemaDumper class.

The following drivers are supported:

 MySQL
 PostgreSQL (Native and Pure Ruby)
 Oracle
 SQL Server

== Known Issues

* Drivers not mentioned above are not supported.

If you find any issues please send an email to anthonyeden@gmail.com .

== Contributing

If you would like to implement view support for other adapters then please drop me an email. Better yet, write up the adapter modifications and send them to me. :-)

Version data entries

22 entries across 22 versions & 8 rubygems

Version Path
mereghost-rails_sql_views-0.8.6 README
robdimarco_rails_sql_views-0.9.0 README
qubole_rails_sql_views-0.10.3 README
qubole_rails_sql_views-0.10.1 README
qubole_rails_sql_views-0.10.0 README
mereghost-rails_sql_views-0.8.5 README
mereghost-rails_sql_views-0.8.3 README
mereghost-rails_sql_views-0.8.2 README
mereghost-rails_sql_views-0.8.1 README
lunks-rails_sql_views-0.9.2 README
ctreatma-rails_sql_views-0.9.1 README
ctreatma-rails_sql_views-0.9.0 README
molo-0.7.6 vendor/rails_sql_views/README
molo-0.7.5 vendor/rails_sql_views/README
molo-0.7.4 vendor/rails_sql_views/README
molo-0.7.3 vendor/rails_sql_views/README
molo-0.7.2 vendor/rails_sql_views/README
molo-0.7.1 vendor/rails_sql_views/README
molo-0.7.0 vendor/rails_sql_views/README
rails_sql_views-0.8.0 README