From 683ca12cf2ace7a5203e2f9340cb69b2021c2e11 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 5 Apr 2012 14:48:12 -0400 Subject: v3: sql creation -v reporting reduced --- lib/sisu/v3/db_create.rb | 12 ++++++------ lib/sisu/v3/db_indexes.rb | 4 ++-- lib/sisu/v3/dbi_discreet.rb | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v3/db_create.rb b/lib/sisu/v3/db_create.rb index 627f0ea5..02c33b99 100644 --- a/lib/sisu/v3/db_create.rb +++ b/lib/sisu/v3/db_create.rb @@ -99,7 +99,7 @@ module SiSU_DbCreate to be populated from document files create tables metadata_and_text data import through ruby transfer - } unless @opt.cmd =~/q/ + } if @opt.cmd =~/[VM]/ @conn.execute(%{ CREATE TABLE metadata_and_text ( tid BIGINT PRIMARY KEY, @@ -210,7 +210,7 @@ module SiSU_DbCreate to be populated from documents files create tables doc_objects data import through ruby transfer - } unless @opt.cmd =~/q/ + } if @opt.cmd =~/[VM]/ @conn.execute(%{ CREATE TABLE doc_objects ( lid BIGINT PRIMARY KEY, @@ -251,7 +251,7 @@ module SiSU_DbCreate to be populated from document files create tables endnotes data import through ruby transfer - } unless @opt.cmd =~/q/ + } if @opt.cmd =~/[VM]/ @conn.execute(%{ CREATE TABLE endnotes ( nid BIGINT PRIMARY KEY, @@ -273,7 +273,7 @@ module SiSU_DbCreate to be populated from document files create tables endnotes_asterisk data import through ruby transfer - } unless @opt.cmd =~/q/ + } if @opt.cmd =~/[VM]/ @conn.execute(%{ CREATE TABLE endnotes_asterisk ( nid BIGINT PRIMARY KEY, @@ -295,7 +295,7 @@ module SiSU_DbCreate to be populated from document files create tables endnotes_plus data import through ruby transfer - } unless @opt.cmd =~/q/ + } if @opt.cmd =~/[VM]/ @conn.execute(%{ CREATE TABLE endnotes_plus ( nid BIGINT PRIMARY KEY, @@ -318,7 +318,7 @@ module SiSU_DbCreate to be populated from doc_objects files create tables urls data import through ruby transfer - } unless @opt.cmd =~/q/ + } if @opt.cmd =~/[VM]/ @conn.execute(%{ CREATE TABLE urls ( metadata_tid BIGINT REFERENCES metadata_and_text, diff --git a/lib/sisu/v3/db_indexes.rb b/lib/sisu/v3/db_indexes.rb index f61c584f..0f41c5df 100644 --- a/lib/sisu/v3/db_indexes.rb +++ b/lib/sisu/v3/db_indexes.rb @@ -71,7 +71,7 @@ module SiSU_DbIndex end end def base - print "\n create documents common indexes\n" unless @opt.cmd =~/q/ + print "\n create documents common indexes\n" if @opt.cmd =~/[VM]/ sql_arr=[ %{CREATE INDEX idx_ocn ON doc_objects(ocn);}, %{CREATE INDEX idx_digest_clean ON doc_objects(digest_clean);}, @@ -99,7 +99,7 @@ module SiSU_DbIndex conn_execute_array(sql_arr) end def text - print "\n create documents TEXT indexes\n" unless @opt.cmd =~/q/ + print "\n create documents TEXT indexes\n" if @opt.cmd =~/[VM]/ sql_arr=[ %{CREATE INDEX idx_clean ON doc_objects(clean);}, %{CREATE INDEX idx_endnote ON endnotes(clean);} diff --git a/lib/sisu/v3/dbi_discreet.rb b/lib/sisu/v3/dbi_discreet.rb index d9ecd8e7..61ab3a3d 100644 --- a/lib/sisu/v3/dbi_discreet.rb +++ b/lib/sisu/v3/dbi_discreet.rb @@ -118,6 +118,7 @@ module SiSU_DBI_Discreet #% database building sdb_index=SiSU_DbDBI::Index.new(@opt,conn,@file,'sqlite') sdb.output_dir? begin + SiSU_Screen::Ansi.new(@opt.cmd,'SQLite',"[#{@opt.f_pth[:lng_is]}] #{@opt.fns}").green_title_hi unless @opt.cmd =~/q/ sdb.create_db sdb.create_table.metadata_and_text sdb.create_table.doc_objects -- cgit v1.2.3