Re: DB::sqlite update

From: Date: Tue, 01 Jul 2003 12:19:50 +0000
Subject: Re: DB::sqlite update
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17878@lists.php.net to get a copy of this message
On Tuesday, July 1, 2003 12:46, Mika Tuupola wrote: > I have working support for sequences for DB::sqlite driver > waiting for commit. Should I go ahead? Yes do it please. > The test for sequences fails only because of differing error > message > -cut- > tests/driver#cat 05sequences.diff > 001- DB Error: no such table > 001+ DB Error: no error > 002- DB Error: no such table <- good error catched > 002+ DB Error: no error <- good error catched > -cut- > AFAIK sqlite returns > #define SQLITE_ERROR 1 > trying to query again nonexistant table. Here are the rest > of the tests. The function sql_last_error() always returns 1? The problem I see is that the function sqliteRaiseError() doesn't handle the parameter right. It should be something like: $native_errno = ($errno === null) ? sqlite_last_error($this->connection) : $errno; $db_errno = $this->errorCode($native_errno); return .. What the <driver>RaiseError() should provide is: the pear db errno, the native errno and the native errmsg. In the next future all this info will be avaible from a Pear DB Error object by some new methods. > Running selected tests. > PASS DB_driver::connect test [01connect.phpt] > PASS DB_driver::fetch test [02fetch.phpt] > PASS DB_driver::simpleQuery test [03simplequery.phpt] > PASS DB_driver::numCols test [04numcols.phpt] > FAIL DB_driver::sequences [05sequences.phpt] > PASS DB_driver::prepare/execute test [06prepexec.phpt] > PASS DB_driver::affectedRows test [08affectedrows.phpt] > PASS DB_driver::numRows test [09numrows.phpt] > FAIL DB_driver::error mapping [10errormap.phpt] > FAIL DB_driver::row limit [13limit.phpt] > PASS DB_driver::fetchmode object [14fetchmode_object.phpt] > FAIL DB_driver::escape data test [15quote.phpt] > FAIL DB_driver::bug22328 [bug22328.phpt] Please add the tests results to the STATUS document. -- Tomas V.V.Cox mailto:cox@idecnet.com

« previous php.pear.dev (#17878) next »