aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/dbi_discrete.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-05-18 08:49:03 -0400
committerRalph Amissah <ralph@amissah.com>2014-05-18 08:49:03 -0400
commit307ecb4df591aa675b71839014debf6e81d462e1 (patch)
tree647e6738bc5868f09c62e07cc03c45ab64e3c1cd /lib/sisu/v5/dbi_discrete.rb
parentv6: utils, add ok code marker (diff)
v5 v6: db, use symbols to identify sql engine
Diffstat (limited to 'lib/sisu/v5/dbi_discrete.rb')
-rw-r--r--lib/sisu/v5/dbi_discrete.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sisu/v5/dbi_discrete.rb b/lib/sisu/v5/dbi_discrete.rb
index cd8c7de1..b0468e8d 100644
--- a/lib/sisu/v5/dbi_discrete.rb
+++ b/lib/sisu/v5/dbi_discrete.rb
@@ -83,7 +83,7 @@ module SiSU_DBI_Discrete #% database building
@md=@particulars.md
if @opt.cmd =~/[d]/ \
or @opt.mod.inspect =~/--((?:sq)?lite)/
- @sql_type='sqlite'
+ @sql_type=:sqlite
maintenance_check(@opt,__FILE__,__LINE__) if @opt.act[:maintenance][:set]==:on
end
@output_path=@md.file.output_path.sqlite_discrete.dir
@@ -122,8 +122,8 @@ module SiSU_DBI_Discrete #% database building
def create_and_populate
db=SiSU_Env::DbOp.new(@md)
conn=db.sqlite_discrete.conn_sqlite3
- sdb=SiSU_DbDBI::Create.new(@opt,conn,@file,'sqlite')
- sdb_index=SiSU_DbDBI::Index.new(@opt,conn,@file,'sqlite')
+ sdb=SiSU_DbDBI::Create.new(@opt,conn,@file,:sqlite)
+ sdb_index=SiSU_DbDBI::Index.new(@opt,conn,@file,:sqlite)
sdb.output_dir?
begin
SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],'SQLite',"[#{@opt.f_pth[:lng_is]}] #{@opt.fno}").green_title_hi unless @opt.act[:quiet][:set]==:on
@@ -136,7 +136,7 @@ module SiSU_DBI_Discrete #% database building
sdb.create_table.urls
sdb_index.create_indexes
db_exist?(db,conn)
- sdb_import=SiSU_DbDBI::Import.new(@opt,conn,@file_maint,'sqlite')
+ sdb_import=SiSU_DbDBI::Import.new(@opt,conn,@file_maint,:sqlite)
sdb_import.marshal_load
tell=SiSU_Screen::Ansi.new(@opt.act[:color_state][:set],"sqlite3 #{db.sqlite.db} database?")
tell.puts_grey if @opt.act[:verbose][:set]==:on
@@ -174,7 +174,7 @@ module SiSU_DBI_Discrete #% database building
file=if @opt.inspect =~/M/
if @opt.fns and not @opt.fns.empty?
@env=SiSU_Env::InfoEnv.new(@opt.fns) if @opt.fns
- puts "\n#{@env.processing_path.sqlite}/#{@opt.fns}.sql" if @sql_type =~/sqlite/ and @opt.act[:maintenance][:set]==:on
+ puts "\n#{@env.processing_path.sqlite}/#{@opt.fns}.sql" if @sql_type ==:sqlite and @opt.act[:maintenance][:set]==:on
@db=SiSU_Env::InfoDb.new
@job="sqlite3 #{@db.sqlite.db} < #{@env.processing_path.sqlite}/#{@opt.fns}.sql"
File.new("#{@env.processing_path.sqlite}/#{@opt.fns}.sql",'w+')