aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/dbi.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-10-15 19:27:16 +0100
committerRalph Amissah <ralph@amissah.com>2007-10-15 19:27:16 +0100
commite1ec4bd2dad2bd22ad97cea398ae1cfcfae183a2 (patch)
tree6ffe3ae1b2453578a032ce053934a31f980645e9 /lib/sisu/v0/dbi.rb
parentregex 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.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