aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/dbi.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/dbi.rb')
-rw-r--r--lib/sisu/v0/dbi.rb20
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/sisu/v0/dbi.rb b/lib/sisu/v0/dbi.rb
index 0ad4880a..17568ce6 100644
--- a/lib/sisu/v0/dbi.rb
+++ b/lib/sisu/v0/dbi.rb
@@ -70,13 +70,21 @@ module SiSU_DBI
SiSU_Env::Load.new('dbi',true).prog
@opt=opt
@db=SiSU_Env::Info_db.new
- if @opt.cmd =~/d/i or @opt.mod.inspect =~/--pg(?:sql)?|(?:sq)?lite/
- @sql_type=if @opt.cmd=~/D/ or @opt.mod.inspect =~/--pg(?:sql)?/; 'pg'
- elsif @opt.cmd =~/d/ and @opt.mod.inspect =~/--(?:db[=-])?pg(?:sql)?/; 'pg'
- elsif @opt.mod.inspect =~/--(?:sq)?lite/; 'sqlite'
- elsif @opt.cmd =~/d/ and @opt.mod.inspect =~/--(?:db[=-])?(?:sq)?lite/; 'sqlite'
+ if @opt.cmd =~/d/i \
+ or @opt.mod.inspect =~/--pg(?:sql)?|(?:sq)?lite/
+ @sql_type=if @opt.cmd=~/D/ \
+ or @opt.mod.inspect =~/--pg(?:sql)?/
+ 'pg'
+ elsif @opt.cmd =~/d/ \
+ and @opt.mod.inspect =~/--(?:db[=-])?pg(?:sql)?/
+ 'pg'
+ elsif @opt.mod.inspect =~/--(?:sq)?lite/
+ 'sqlite'
+ elsif @opt.cmd =~/d/ \
+ and @opt.mod.inspect =~/--(?:db[=-])?(?:sq)?lite/
+ 'sqlite'
#elsif @opt.cmd =~/d/ and @opt.mod.select =~/--my(?:sql)?/; 'mysql'
- else 'sqlite'
+ else 'sqlite'
end
end
end