diff options
Diffstat (limited to 'lib/sisu/v5/db_select.rb')
-rw-r--r-- | lib/sisu/v5/db_select.rb | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/lib/sisu/v5/db_select.rb b/lib/sisu/v5/db_select.rb index 3aebe828..898dcb71 100644 --- a/lib/sisu/v5/db_select.rb +++ b/lib/sisu/v5/db_select.rb @@ -173,8 +173,16 @@ module SiSU_DbSelect db_exist? @sdb_import.marshal_load tell=case @sql_type - when :sqlite then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{@db.sqlite.db} database?") - when :pg then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"pgaccess or psql #{@db.psql.db} database?") + when :sqlite + SiSU_Screen::Ansi.new( + @opt.act[:color_state][:set], + "sqlite3 #{@db.sqlite.db} database?" + ) + when :pg + SiSU_Screen::Ansi.new( + @opt.act[:color_state][:set], + "pgaccess or psql #{@db.psql.db} database?" + ) else '???' end tell.puts_grey if @opt.act[:verbose][:set]==:on @@ -183,8 +191,16 @@ module SiSU_DbSelect @sdb_remove_doc.remove @sdb_import.marshal_load tell=case @sql_type - when :sqlite then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{@db.sqlite.db} database?") - when :pg then SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"pgaccess or psql #{@db.psql.db} database?") + when :sqlite + SiSU_Screen::Ansi.new( + @opt.act[:color_state][:set], + "sqlite3 #{@db.sqlite.db} database?" + ) + when :pg + SiSU_Screen::Ansi.new( + @opt.act[:color_state][:set], + "pgaccess or psql #{@db.psql.db} database?" + ) else '???' end tell.puts_grey if @opt.act[:verbose][:set]==:on @@ -214,7 +230,10 @@ module SiSU_DbSelect end if @opt.act[:psql][:set]==:on \ and @opt.mod.inspect !~/--(?:createdb|init(?:ialize)?|create(?:all)?|createtables?|recreate|cr(eate)?lex|cr(eate)?metadata|import|update|remove|index|droptable(s)?|dropindex(es)?|dropall|drop)/ - SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"--pg requires further instruction").warn unless @opt.act[:quiet][:set]==:on + SiSU_Screen::Ansi.new( + @opt.act[:color_state][:set], + "--pg requires further instruction" + ).warn unless @opt.act[:quiet][:set]==:on end begin rescue; @sdb.output_dir? |