diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dbshell/database_client.rb | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/lib/dbshell/database_client.rb b/lib/dbshell/database_client.rb new file mode 100644 index 0000000..8d55095 --- /dev/null +++ b/lib/dbshell/database_client.rb @@ -0,0 +1,15 @@ +class DBShell::DatabaseClient +  def self.handler(connection_params) +    case connection_params['adapter'] +    when 'sqlite3' +      DBShell::Sqlite3Client +    when 'postgresql' +      DBShell::PostgresClient +    else +      raise DBShell::InvalidDatabaseAdapter +    end +  end +end + + +class DBShell::InvalidDatabaseAdapter < StandardError; end | 
