aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/dbi.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/dbi.rb')
-rw-r--r--lib/sisu/v6/dbi.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/sisu/v6/dbi.rb b/lib/sisu/v6/dbi.rb
index acb75e0f..5bd98b8a 100644
--- a/lib/sisu/v6/dbi.rb
+++ b/lib/sisu/v6/dbi.rb
@@ -79,22 +79,22 @@ module SiSU_DBI
@sql_type=if @opt.cmd=~/D/ \
or @opt.mod.inspect =~/--pg(?:sql)?/
maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on
- 'pg'
+ :pg
elsif @opt.cmd =~/d/ \
and @opt.mod.inspect =~/--(?:db[=-])?pg(?:sql)?/
maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on
- 'pg'
+ :pg
elsif @opt.cmd=~/d/ \
or @opt.mod.inspect =~/--(?:sq)?lite/
maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on
- 'sqlite'
+ :sqlite
elsif @opt.cmd =~/d/ \
and @opt.mod.inspect =~/--(?:db[=-])?(?:sq)?lite/
maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on
- 'sqlite'
+ :sqlite
else
maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on
- 'sqlite'
+ :sqlite
end
end
end
@@ -107,7 +107,7 @@ module SiSU_DBI
begin
@conn=@db.psql.conn_dbi
rescue
- if @opt.mod.inspect=~/--(createall|create)/
+ if @opt.mod.inspect=~/--(?:createall|create)/
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
@@ -130,8 +130,8 @@ manually create the database: "#{cX.green}#{@db.db}#{cX.off}" if it does not yet
end
def connect
case @sql_type
- when /pg/ then read_psql
- when /sqlite/ then read_sqlite
+ when :pg then read_psql #read_pg
+ when :sqlite then read_sqlite
end
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