aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dbshell/client/mysql.rb
diff options
context:
space:
mode:
authorTeddy Wing2017-04-29 22:58:11 +0200
committerTeddy Wing2017-04-29 22:58:11 +0200
commitfb9ff6eb8cbad57b3ca2bbd58dc098f208edd1e1 (patch)
tree3af3a4176ecc848d7f280c29fb90eaf64fee7eff /lib/dbshell/client/mysql.rb
parent56a002d2681431b34be36cf7247dc41a313601d9 (diff)
downloaddbshell-rails-fb9ff6eb8cbad57b3ca2bbd58dc098f208edd1e1.tar.bz2
Integrate MySQL support
* Create a `.runshell()` method in `DBShell::Client::MySQL` * Delegate to that class & method from `DBShell::Client::Database`
Diffstat (limited to 'lib/dbshell/client/mysql.rb')
-rw-r--r--lib/dbshell/client/mysql.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/dbshell/client/mysql.rb b/lib/dbshell/client/mysql.rb
index 6cb8233..536186a 100644
--- a/lib/dbshell/client/mysql.rb
+++ b/lib/dbshell/client/mysql.rb
@@ -3,6 +3,11 @@ module DBShell
class MySQL
EXECUTABLE_NAME = 'mysql'
+ def self.runshell(db_info)
+ args = self.build_command(db_info)
+ exec(*args)
+ end
+
def self.build_command(db_info)
args = [EXECUTABLE_NAME]