diff options
author | Ralph Amissah <ralph@amissah.com> | 2008-12-24 00:34:50 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2008-12-24 00:34:50 -0500 |
commit | 0c679c4085b7e026c2dc0faa843ed483c4a5590d (patch) | |
tree | ff9a43334f4da5b0aac0289d43d683075ef7bfe4 /lib/sisu/v0/db_load_tuple.rb | |
parent | Merge branch 'upstream' into debian/sid (diff) | |
parent | sqlite3 fix, populate do using rb sqlite3 driver directly (rb dbi problematic (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v0/db_load_tuple.rb')
-rw-r--r-- | lib/sisu/v0/db_load_tuple.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/sisu/v0/db_load_tuple.rb b/lib/sisu/v0/db_load_tuple.rb index aefa10c4..c5169b4e 100644 --- a/lib/sisu/v0/db_load_tuple.rb +++ b/lib/sisu/v0/db_load_tuple.rb @@ -85,6 +85,10 @@ module SiSU_DB_tuple "INSERT INTO documents (lid, metadata_tid, lev, clean, body, ocn, ocnd, ocns, seg, lev1, lev2, lev3, lev4, lev5, lev6, digest_clean, digest_all) VALUES (#{@col[:lid]}, #{@col[:tid]}, #{@col[:lev]}, '#{@col[:plaintext]}', '#{@col[:body]}', '#{@col[:ocn]}', '#{@col[:ocnd]}', '#{@col[:ocns]}', '#{@col[:seg]}', '#{@col[:lv1]}', '#{@col[:lv2]}', '#{@col[:lv3]}', '#{@col[:lv4]}', '#{@col[:lv5]}', '#{@col[:lv6]}', '#{@col[:digest_clean]}', '#{@col[:digest_all]}');" end if @opt.cmd =~/M/ + if @opt.cmd =~/V/ + puts @file.inspect + puts sql_entry + end @file.puts sql_entry else @conn.execute(sql_entry) end @@ -117,7 +121,7 @@ module SiSU_DB_tuple if @opt.cmd =~/M/ puts "maintenance mode on: creating sql transaction file (for last transaction set (document) only):\n\t#{@file.inspect}" @file.puts sql_entry - else @conn.execute(%{#{sql_entry}}) + else @conn.execute(sql_entry) end end end @@ -129,7 +133,7 @@ module SiSU_DB_tuple sql_entry="INSERT INTO urls (#{@f[:txt]} #{@f[:html_toc]} #{@f[:html_doc]} #{@f[:xhtml]} #{@f[:xml_sax]} #{@f[:xml_dom]} #{@f[:odf]} #{@f[:pdf_p]} #{@f[:pdf_l]} #{@f[:concordance]} #{@f[:latex_p]} #{@f[:latex_l]} #{@f[:manifest]} #{@f[:digest]} #{@f[:markup]} #{@f[:sisupod]} metadata_tid) VALUES (#{@u[:txt]} #{@u[:html_toc]} #{@u[:html_doc]} #{@u[:xhtml]} #{@u[:xml_sax]} #{@u[:xml_dom]} #{@u[:odf]} #{@u[:pdf_p]} #{@u[:pdf_l]} #{@u[:concordance]} #{@u[:latex_p]} #{@u[:latex_l]} #{@u[:manifest]} #{@u[:digest]} #{@u[:markup]} #{@u[:sisupod]} #{@id});" if @opt.cmd =~/M/ @file.puts sql_entry - else @conn.execute(%{#{sql_entry}}) + else @conn.execute(sql_entry) end end end @@ -141,7 +145,7 @@ module SiSU_DB_tuple sql_entry="INSERT INTO #{@en[:type]} (nid, document_lid, nr, clean, body, ocn, ocnd, ocns, metadata_tid, digest_clean) VALUES ('#{@en[:id]}', '#{@en[:lid]}', '#{@en[:nr]}', '#{@en[:txt]}', '#{@en[:body]}', '#{@en[:ocn]}', '#{@en[:ocnd]}', '#{@en[:ocns]}', '#{@en[:id_t]}', '#{@en[:hash]}');" if @opt.cmd =~/M/ @file.puts sql_entry - else @conn.execute(%{#{sql_entry}}) + else @conn.execute(sql_entry) end end end |