From: alex <bin...@li...> - 2001-08-16 22:24:57
Attachments:
alex-20010816152448.txt
|
alex Thu Aug 16 15:24:48 2001 EDT Added files: /r2/binarycloud/base/mgr QueryManager.php Log: Added QueryManager |
From: andi <bin...@li...> - 2001-09-12 18:14:09
|
andi Wed Sep 12 11:14:04 2001 EDT Modified files: /r2/binarycloud/base/mgr QueryManager.php Log: Changes to match new conf filenames Index: r2/binarycloud/base/mgr/QueryManager.php diff -u r2/binarycloud/base/mgr/QueryManager.php:1.3 r2/binarycloud/base/mgr/QueryManager.php:1.4 --- r2/binarycloud/base/mgr/QueryManager.php:1.3 Fri Aug 31 11:57:22 2001 +++ r2/binarycloud/base/mgr/QueryManager.php Wed Sep 12 11:14:04 2001 @@ -1,7 +1,7 @@ <?php // Header {{{ /* - * -File $Id: QueryManager.php,v 1.3 2001/08/31 18:57:22 alex Exp $ + * -File $Id: QueryManager.php,v 1.4 2001/09/12 18:14:04 andi Exp $ * -License LGPL (http://www.gnu.org/copyleft/lesser.html) * -Copyright 2000, Intacct Corporation * -Author John P. Campbell @@ -64,7 +64,7 @@ function PrepareConnection($_name = null) { global $Debug; - import('user.conf.datasources'); + import('user.conf.Datasources'); // determine datasources[index] to use. if _name is not found // it takes last occuring default entry |
From: andi <bin...@li...> - 2001-09-21 10:45:15
|
andi Fri Sep 21 03:44:54 2001 EDT Modified files: /r2/binarycloud/base/mgr QueryManager.php Log: Removed metabase hack and extra abstraction code (workaround for older metabase to support retreive meta-data). QueryManager is now clear. Index: r2/binarycloud/base/mgr/QueryManager.php diff -u r2/binarycloud/base/mgr/QueryManager.php:1.4 r2/binarycloud/base/mgr/QueryManager.php:1.5 --- r2/binarycloud/base/mgr/QueryManager.php:1.4 Wed Sep 12 11:14:04 2001 +++ r2/binarycloud/base/mgr/QueryManager.php Fri Sep 21 03:44:54 2001 @@ -1,7 +1,7 @@ <?php // Header {{{ /* - * -File $Id: QueryManager.php,v 1.4 2001/09/12 18:14:04 andi Exp $ + * -File $Id: QueryManager.php,v 1.5 2001/09/21 10:44:54 andi Exp $ * -License LGPL (http://www.gnu.org/copyleft/lesser.html) * -Copyright 2000, Intacct Corporation * -Author John P. Campbell @@ -571,34 +571,8 @@ } // }}} - // method _GetNumColumns($_result) {{{ - /** - * This method determines the number of columns fetched by the last - * query. It takes the result handle as parameter. - * - * I don't like this here. But it's a metabase problem. The Metabase - * drivers currently do not implement this feauture. - * - * @param int Result handle - * @return int Number of fields in last query - * @access private - * @see QueryManager::_ProcessResult() - */ - - function _GetNumColumns($_result) { - switch ($this->dbType) { - case 'oci': return OCINumCols($_result); - case 'mysql': return mysql_num_fields($_result); - case 'ifx': return ifx_num_fields($_result); - case 'msql': return msql_num_fields($_result); - case 'mssql': return mssql_num_fields($_result); - case 'pgsql': return pg_numfields($_result); - case 'odbc': return odbc_num_fields($_result); - } - } - - // }}} // method _ProcessResult($_code, $_result, &$_buffer, $_headers) {{{ + /** * _ProcessResult processes a query result fetched by a select statement * and fills a buffer passed by reference with the result values. @@ -622,27 +596,14 @@ function _ProcessResult($_code, $_result, &$_buffer, $_headers = true) { global $Debug; - // Get the column names into the column data member. - // (This is really a hack of the Metabase library. - // | - // | We have to modifiy the other metabase drivers mSQL,MySQL and - // | PostgreSQL. It would be very nice to have - // | MetabaseGetNumCols($database, $result) and - // | MetabaseGetColumnNames($database, $result) - // | Should be no problem 'caus php supports this for all dbms - // | metabase abstracts - // | + if ($_headers) { - global $metabase_interfaces; - global $metabase_databases; - $metaIF =& $metabase_interfaces[$metabase_databases[$this->handle]->interface]; - $metaIF->GetColumnNames($_result); - $colNames = $metaIF->columns[$_result]; + $colNames = MetabaseGetColumnNames($this->handle, $_result); $Debug->CaptureVar('QueryManager: Result columnames', $colNames); } $colCount = 0; - $colCount = $this->_GetNumColumns($_result); + $colCount = MetabaseNumberOfColumns($this->handle, $_result); if ($_result != 0) { $eor = MetabaseEndOfResult($this->handle, $_result); |
From: andi <bin...@li...> - 2001-10-01 11:16:58
|
andi Mon Oct 1 04:16:52 2001 EDT Modified files: /r2/binarycloud/base/mgr QueryManager.php Log: Fixed wrong parameter count in MetabaseGetColumnNames() call. Index: r2/binarycloud/base/mgr/QueryManager.php diff -u r2/binarycloud/base/mgr/QueryManager.php:1.5 r2/binarycloud/base/mgr/QueryManager.php:1.6 --- r2/binarycloud/base/mgr/QueryManager.php:1.5 Fri Sep 21 03:44:54 2001 +++ r2/binarycloud/base/mgr/QueryManager.php Mon Oct 1 04:16:52 2001 @@ -1,7 +1,7 @@ <?php // Header {{{ /* - * -File $Id: QueryManager.php,v 1.5 2001/09/21 10:44:54 andi Exp $ + * -File $Id: QueryManager.php,v 1.6 2001/10/01 11:16:52 andi Exp $ * -License LGPL (http://www.gnu.org/copyleft/lesser.html) * -Copyright 2000, Intacct Corporation * -Author John P. Campbell @@ -598,7 +598,7 @@ global $Debug; if ($_headers) { - $colNames = MetabaseGetColumnNames($this->handle, $_result); + $success = MetabaseGetColumnNames($this->handle, $_result, $colNames); $Debug->CaptureVar('QueryManager: Result columnames', $colNames); } |