diff options
Diffstat (limited to 'lib/sisu/v5/dbi.rb')
-rw-r--r-- | lib/sisu/v5/dbi.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/sisu/v5/dbi.rb b/lib/sisu/v5/dbi.rb index 737f02fd..0e438c3e 100644 --- a/lib/sisu/v5/dbi.rb +++ b/lib/sisu/v5/dbi.rb @@ -71,7 +71,6 @@ module SiSU_DBI include SiSU_FormatShared class SQL def initialize(opt) - SiSU_Env::Load.new('dbi',true).prog @opt=opt @db=SiSU_Env::InfoDb.new if @opt.cmd =~/[Dd]/ \ @@ -96,6 +95,9 @@ module SiSU_DBI maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on :sqlite end + if @sql_type==:pg then SiSU_Env::Load.new('pg',true).prog + elsif @sql_type==:sqlite then SiSU_Env::Load.new('sqlite3',true).prog + end end end def maintenance_check(opt,file,line) @@ -105,7 +107,8 @@ module SiSU_DBI end def read_psql begin - @conn=@db.psql.conn_dbi + require 'pg' + @conn=@db.psql.conn_pg rescue if @opt.mod.inspect=~/--(?:createall|create)/ cX=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set]).cX |