diff options
author | Ralph Amissah <ralph@amissah.com> | 2007-10-15 19:27:16 +0100 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2007-10-15 19:27:16 +0100 |
commit | e1ec4bd2dad2bd22ad97cea398ae1cfcfae183a2 (patch) | |
tree | 6ffe3ae1b2453578a032ce053934a31f980645e9 /lib/sisu/v0/dbi.rb | |
parent | regex matching of images, (and rearrangement of conditionals) (diff) |
mostly the arrangement of conditionals
Diffstat (limited to 'lib/sisu/v0/dbi.rb')
-rw-r--r-- | lib/sisu/v0/dbi.rb | 20 |
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 |