From 2f97cf3f9e13280da9d161d39b8d9b0d66555307 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 17 Dec 2008 20:57:46 -0500 Subject: SiSU's sqlite module still broken for the time being: inconsistent ruby dbi api for sqlite3, (unable to begin and commit transaction) provide explicit message problem noted already in v.0.66.2 (2008-04) and last in v.0.66.3 (2008-05) module (& rb dbi) apparently worked at end 2007 (v.0.62.4) and start of 2008 (v.0.64.0) ... (did not expect broken state to last, sorry) include maintenance mode info with -M flag --- lib/sisu/v0/db_remove.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/sisu/v0/db_remove.rb') diff --git a/lib/sisu/v0/db_remove.rb b/lib/sisu/v0/db_remove.rb index 93680f2c..fef4e797 100644 --- a/lib/sisu/v0/db_remove.rb +++ b/lib/sisu/v0/db_remove.rb @@ -79,9 +79,10 @@ DELETE FROM documents WHERE metadata_tid = '#{del_id}'; DELETE FROM urls WHERE metadata_tid = '#{del_id}'; DELETE FROM metadata WHERE tid = '#{del_id}'; SQL + @conn.execute(%{#{sql_entry}}) if @opt.cmd =~/M/ @file.puts sql_entry if @opt.cmd =~/M/ - else @conn.execute(%{#{sql_entry}}) + #else @conn.execute(%{#{sql_entry}}) end else tell=SiSU_Screen::Ansi.new(@opt.cmd,"no such file in database #{@db.psql.db}::#{@opt.fns}") -- cgit v1.2.3 From 71223cf6cd035b3e395f6d4c3e4c41b79ed29510 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 22 Dec 2008 01:08:06 -0500 Subject: sqlite3 fix, populate do using rb sqlite3 driver directly (rb dbi problematic at present) sqlite fix, change ruby driver used to populate sisu sqlite3 db to rb sqlite3 for the time being. Use rb sqlite3 driver directly rather (than more convenient when working) rb dbi interface to populate content. Used to bypass problems with rb dbi sqlite3 interface noted in sisu 0.66.2 (2008-04-25) and 0.66.3 (2008-05-11) that have have persisted (apparently worked at end 2007 (v.0.62.4) and start of 2008 (v.0.64.0) * sqlite dropall, fix * fix to auto-generated sqlite cgi script sample, only works if at least one existing populated sisu sqlite database is found during the generation process --- lib/sisu/v0/db_remove.rb | 55 ++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 28 deletions(-) (limited to 'lib/sisu/v0/db_remove.rb') diff --git a/lib/sisu/v0/db_remove.rb b/lib/sisu/v0/db_remove.rb index fef4e797..a869bd24 100644 --- a/lib/sisu/v0/db_remove.rb +++ b/lib/sisu/v0/db_remove.rb @@ -67,22 +67,35 @@ module SiSU_DB_remove @db=SiSU_Env::Info_db.new end def remove - del=@conn.select_one(%{ SELECT tid FROM metadata WHERE filename LIKE '#{@opt.fns}'; }) - if del - del_id=del.join - #@conn.execute("BEGIN") - sql_entry=<