Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 14558c385a
== Executing Tests

First create the test database: rails_sql_views_unittest 

Next, copy test/connection.example.yml to test/connection.yml and change the
settings to match your database configuration that you are testing.

To run the tests either use:

Which will run the MySQL tests, or use something like the following:

  rake DB=native_postgresql
Substituting the directory name inside the connection directory.

== Status

Currently the following adapters have been tested:

* PostgreSQL Pure Ruby
The Oracle and SQL Server adapters have not been tested by me.

== Implementing Adapters

If you would like to implement an adapter, it should go in 
lib/rails_sql_views/connection_adapters. Follow the conventions
of the other adapters currently implemented. Every adapter must implement the 
following methods:

  base_tables(name = nil)
  views(name = nil)
  view_select_statement(view, name=nil)
The suports_views? method must return true. The views method must return an 
array of all view names. The view_select_statement method must return the 
select statement used to construct the specified view.

In addition you must include the following for testing purposes:

The script which establishes the database connection in ActiveRecord:

The schema to setup the test database in your drivers native form:

The expected schema output from a schema dump. Note that it must be formatted 
*exactly* as the output would be:
Once this is done you should send the diff of the changes to Any questions can also be emailed to this address.

== Known Issues

* If you are running on Rails 1.1.6 then the schema dumper test will fail because the formatting of the schema output has changed between 1.1.6 and 1.2.
Something went wrong with that request. Please try again.