aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/dbi.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/dbi.rb')
-rw-r--r--lib/sisu/v5/dbi.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sisu/v5/dbi.rb b/lib/sisu/v5/dbi.rb
index cc2b614e..e59a09b7 100644
--- a/lib/sisu/v5/dbi.rb
+++ b/lib/sisu/v5/dbi.rb
@@ -77,22 +77,22 @@ module SiSU_DBI
or @opt.mod.inspect =~/--(pg(?:sql)?|(?:sq)?lite)/
@sql_type=if @opt.cmd=~/D/ \
or @opt.mod.inspect =~/--pg(?:sql)?/
- maintenance_check(@opt,__FILE__,__LINE__) if @opt.cmd.inspect =~/M/
+ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on
'pg'
elsif @opt.cmd =~/d/ \
and @opt.mod.inspect =~/--(?:db[=-])?pg(?:sql)?/
- maintenance_check(@opt,__FILE__,__LINE__) if @opt.cmd.inspect =~/M/
+ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on
'pg'
elsif @opt.cmd=~/d/ \
or @opt.mod.inspect =~/--(?:sq)?lite/
- maintenance_check(@opt,__FILE__,__LINE__) if @opt.cmd.inspect =~/M/
+ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on
'sqlite'
elsif @opt.cmd =~/d/ \
and @opt.mod.inspect =~/--(?:db[=-])?(?:sq)?lite/
- maintenance_check(@opt,__FILE__,__LINE__) if @opt.cmd.inspect =~/M/
+ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on
'sqlite'
else
- maintenance_check(@opt,__FILE__,__LINE__) if @opt.cmd.inspect =~/M/
+ maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on
'sqlite'
end
end
@@ -107,7 +107,7 @@ module SiSU_DBI
@conn=@db.psql.conn_dbi
rescue
if @opt.mod.inspect=~/--(createall|create)/
- cX=SiSU_Screen::Ansi.new(@opt.cmd).cX
+ cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX
puts <<-WOK
manually create the database: "#{cX.green}#{@db.db}#{cX.off}" if it does not yet exist
#{cX.yellow}createdb #{@db.db}#{cX.off}
@@ -129,7 +129,7 @@ manually create the database: "#{cX.green}#{@db.db}#{cX.off}" if it does not yet
when /pg/; read_psql
when /sqlite/; read_sqlite
end
- SiSU_Screen::Ansi.new(@opt.cmd,"DBI (#{@sql_type}) #{@opt.mod}",@opt.fno).dbi_title unless @opt.cmd =~/q/
+ SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"DBI (#{@sql_type}) #{@opt.mod}",@opt.fno).dbi_title unless @opt.act[:quiet][:set]==:on
begin
SiSU_DbDBI::Case.new(@opt,@conn,@sql_type).cases
rescue