aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/dbi_discrete.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/dbi_discrete.rb')
-rw-r--r--lib/sisu/v6/dbi_discrete.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sisu/v6/dbi_discrete.rb b/lib/sisu/v6/dbi_discrete.rb
index 0ac84db4..0f534e42 100644
--- a/lib/sisu/v6/dbi_discrete.rb
+++ b/lib/sisu/v6/dbi_discrete.rb
@@ -77,13 +77,13 @@ module SiSU_DBI_Discrete #% database building
end
class SQL
def initialize(opt)
- SiSU_Env::Load.new('dbi',true).prog
+ SiSU_Env::Load.new('sqlite3',true).prog
@opt=opt
@particulars=SiSU_Particulars::CombinedSingleton.instance.get_all(opt)
@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+')