Sha256: 320e785a151f9f3d1e911e15000118b0d81faa865d652073ee9c9574ca195e4d

Contents?: true

Size: 455 Bytes

Versions: 2

Compression:

Stored size: 455 Bytes

Contents

module RailsDb
  class Database
    include Connection
    extend Connection

    def self.tables
      connection.tables.sort - ['schema_migrations']
    end

    def self.adapter
      case connection.class.to_s
      when /Mysql/
        RailsDb::Adapters::Mysql
      when /Postgre/
        RailsDb::Adapters::Postgres
      when /SQLite/
        RailsDb::Adapters::Sqlite
      else
        RailsDb::Adapters::BaseAdapter
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_db-0.2.1 lib/rails_db/database.rb
rails_db-0.2 lib/rails_db/database.rb