From: Reini U. <ru...@us...> - 2007-06-07 21:37:39
|
Update of /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26472 Modified Files: ADODB.php PearDB.php PearDB_pgsql.php Log Message: add native asArray methods to generic iters (for DebugInfo) Index: ADODB.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend/ADODB.php,v retrieving revision 1.98 retrieving revision 1.99 diff -u -2 -b -p -d -r1.98 -r1.99 --- ADODB.php 28 May 2007 20:13:46 -0000 1.98 +++ ADODB.php 7 Jun 2007 21:37:39 -0000 1.99 @@ -1343,4 +1343,11 @@ extends WikiDB_backend_iterator } + function asArray () { + $result = array(); + while ($page = $this->next()) + $result[] = $page; + return $result; + } + function free () { if ($this->_result) { @@ -1549,4 +1556,7 @@ class WikiDB_backend_ADODB_search extend // $Log$ +// Revision 1.99 2007/06/07 21:37:39 rurban +// add native asArray methods to generic iters (for DebugInfo) +// // Revision 1.98 2007/05/28 20:13:46 rurban // Overwrite all attributes at once at page->save to delete dangling meta Index: PearDB.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend/PearDB.php,v retrieving revision 1.107 retrieving revision 1.108 diff -u -2 -b -p -d -r1.107 -r1.108 --- PearDB.php 28 May 2007 20:13:46 -0000 1.107 +++ PearDB.php 7 Jun 2007 21:37:39 -0000 1.108 @@ -1216,4 +1216,11 @@ extends WikiDB_backend_iterator } } + + function asArray () { + $result = array(); + while ($page = $this->next()) + $result[] = $page; + return $result; + } } @@ -1253,4 +1260,7 @@ class WikiDB_backend_PearDB_search exten // $Log$ +// Revision 1.108 2007/06/07 21:37:39 rurban +// add native asArray methods to generic iters (for DebugInfo) +// // Revision 1.107 2007/05/28 20:13:46 rurban // Overwrite all attributes at once at page->save to delete dangling meta Index: PearDB_pgsql.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiDB/backend/PearDB_pgsql.php,v retrieving revision 1.26 retrieving revision 1.27 diff -u -2 -b -p -d -r1.26 -r1.27 --- PearDB_pgsql.php 4 Jan 2007 16:45:49 -0000 1.26 +++ PearDB_pgsql.php 7 Jun 2007 21:37:39 -0000 1.27 @@ -6,6 +6,6 @@ require_once('lib/WikiDB/backend/PearDB. if (!defined("USE_BYTEA")) // see schemas/psql-initialize.sql + //define("USE_BYTEA", true); define("USE_BYTEA", false); - //define("USE_BYTEA", false); /* @@ -230,4 +230,5 @@ extends WikiDB_backend_PearDB $fields .= ", $page_tbl.pagedata as pagedata, " . $this->version_tbl_fields; + // TODO: title still ignored, need better rank and subselect $callback = new WikiMethodCb($searchobj, "_fulltext_match_clause"); $search_string = $search->makeTsearch2SqlClauseObj($callback); @@ -312,4 +313,5 @@ select * from stat('select idxfti from v return $word; + // clause specified above. return $this->_pagename_match_clause($node) . " OR idxFTI @@ to_tsquery('$word')"; } @@ -317,4 +319,7 @@ select * from stat('select idxfti from v // $Log$ +// Revision 1.27 2007/06/07 21:37:39 rurban +// add native asArray methods to generic iters (for DebugInfo) +// // Revision 1.26 2007/01/04 16:45:49 rurban // Clarify API: sortby,limit and exclude are strings. |