From 307ecb4df591aa675b71839014debf6e81d462e1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 18 May 2014 08:49:03 -0400 Subject: v5 v6: db, use symbols to identify sql engine --- lib/sisu/v5/dbi_discrete.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/sisu/v5/dbi_discrete.rb') 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+') -- cgit v1.2.3