PHP PEAR CVS 20 CVS PEAR DB DB SQLITE PHP
Date: Tue, 01 Jul 2003 13:31:48 -0000

Subject: cvs: pear /DB/DB sqlite.php
From: tuupola@no-spam (Mika Tuupola)

tuupola Tue Jul 1 09:31:48 2003 EDT
Modified files: /pear/DB/DB sqlite.php Log:
* comments Index: pear/DB/DB/sqlite.php diff -u pear/DB/DB/sqlite.php:1.3 pear/DB/DB/sqlite.php:1.4
--- pear/DB/DB/sqlite.php:1.3 Tue Jul 1 08:33:13 2003
+++ pear/DB/DB/sqlite.php Tue Jul 1 09:31:48 2003
@@no-spam -16,7 +16,7 @@no-spam // | Author: Urs Gehrig <urs@no-spam> |
// +----------------------------------------------------------------------+
//
-// $Id: sqlite.php,v 1.3 2003/07/01 12:33:13 tuupola Exp $
+// $Id: sqlite.php,v 1.4 2003/07/01 13:31:48 tuupola Exp $
//
// Database independent query interface definition for the PECL's SQLite // extension.
@@no-spam -126,11 +126,6 @@no-spam 'transactions' => false,
'limit' => 'alter'
);
-/*
- $this->options = array (
- 'optimize' => 'portability'
- );
-*/
// SQLite data types, http://www.sqlite.org/datatypes.html $this->keywords = array (
@@no-spam -262,11 +257,11 @@no-spam }
/* sqlite_query() seems to allways return a resource */
- /* so cant use that */
+ /* so cant use that. Using $ismanip instead */
if (!$ismanip) {
$numRows = $this->numRows($result);
- /* if numRows() returnet PEAR_Error */
+ /* if numRows() returned PEAR_Error */
if (is_object($numRows )) {
return $numRows;
}
@@no-spam -453,6 +448,21 @@no-spam return($result);
} }
+
+
+ /**
+ * Get the next value in a sequence. We emulate sequences + * for SQLite. Will create the sequence if it does not exist.
+ *
+ * @no-spam public + *
+ * @no-spam string $seq_name the name of the sequence + *
+ * @no-spam bool $ondemand whether to create the sequence table on demand + * (default is true)
+ *
+ * @no-spam mixed a sequence integer, or a DB error + */
function nextId($seq_name, $ondemand = true)
{