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/sysenv.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib/sisu/v0/sysenv.rb') diff --git a/lib/sisu/v0/sysenv.rb b/lib/sisu/v0/sysenv.rb index ded14951..8356e5ee 100644 --- a/lib/sisu/v0/sysenv.rb +++ b/lib/sisu/v0/sysenv.rb @@ -2759,7 +2759,10 @@ WOK else "DBI:Pg:database=#{psql.db};port=#{psql.port}" end end - self + def conn_dbi + DBI.connect(psql.dbi,psql.user,psql.db) + end + self end def mysql def db @@ -2780,6 +2783,15 @@ WOK def dbi "DBI:SQLite3:#{sqlite.db}" #sqlite3 ? end + def sqlite3 + sqlite.db #sqlite3 ? + end + def conn_dbi + DBI.connect(sqlite.dbi) + end + def conn_sqlite3 + SQLite3::Database.new(sqlite.sqlite3) + end self end end -- cgit v1.2.3