cvs: pear /MDB2/MDB2/Driver fbsql.php mssql.php /MDB2/MDB2/Driver/Datatype Common.php /MDB2/MDB2/Driver/Function Common.php
/MDB2/MDB2/Driver/Manager Common.php /MDB2/MDB2/Driver/Reverse Common.php

From: Date: Sun, 30 Apr 2006 19:12:35 +0000
Subject: cvs: pear /MDB2/MDB2/Driver fbsql.php mssql.php /MDB2/MDB2/Driver/Datatype Common.php /MDB2/MDB2/Driver/Function Common.php
/MDB2/MDB2/Driver/Manager Common.php /MDB2/MDB2/Driver/Reverse Common.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-39912@lists.php.net to get a copy of this message
lsmith Sun Apr 30 19:12:35 2006 UTC Modified files: /pear/MDB2/MDB2/Driver fbsql.php mssql.php /pear/MDB2/MDB2/Driver/Datatype Common.php /pear/MDB2/MDB2/Driver/Function Common.php /pear/MDB2/MDB2/Driver/Manager Common.php /pear/MDB2/MDB2/Driver/Reverse Common.php Log: - various minor tweaks to error messages, phpdoc and adding stub methods to the common driver

http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/fbsql.php?r1=1.94&r2=1.95&diff_format=u Index: pear/MDB2/MDB2/Driver/fbsql.php diff -u pear/MDB2/MDB2/Driver/fbsql.php:1.94 pear/MDB2/MDB2/Driver/fbsql.php:1.95 --- pear/MDB2/MDB2/Driver/fbsql.php:1.94 Tue Apr 18 17:33:06 2006 +++ pear/MDB2/MDB2/Driver/fbsql.php Sun Apr 30 19:12:34 2006 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.94 2006/04/18 17:33:06 lsmith Exp $ +// $Id: fbsql.php,v 1.95 2006/04/30 19:12:34 lsmith Exp $ // /** @@ -623,7 +623,6 @@ /** * Move the internal result pointer to the next available result - * Currently not supported * * @return true on success, false if there is no more result set or an error object on failure * @access public http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/mssql.php?r1=1.108&r2=1.109&diff_format=u Index: pear/MDB2/MDB2/Driver/mssql.php diff -u pear/MDB2/MDB2/Driver/mssql.php:1.108 pear/MDB2/MDB2/Driver/mssql.php:1.109 --- pear/MDB2/MDB2/Driver/mssql.php:1.108 Tue Apr 18 17:33:06 2006 +++ pear/MDB2/MDB2/Driver/mssql.php Sun Apr 30 19:12:35 2006 @@ -43,7 +43,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.108 2006/04/18 17:33:06 lsmith Exp $ +// $Id: mssql.php,v 1.109 2006/04/30 19:12:35 lsmith Exp $ // // {{{ Class MDB2_Driver_mssql /** @@ -681,7 +681,6 @@ /** * Move the internal result pointer to the next available result - * Currently not supported * * @return true on success, false if there is no more result set or an error object on failure * @access public http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/Datatype/Common.php?r1=1.58&r2=1.59&diff_format=u Index: pear/MDB2/MDB2/Driver/Datatype/Common.php diff -u pear/MDB2/MDB2/Driver/Datatype/Common.php:1.58 pear/MDB2/MDB2/Driver/Datatype/Common.php:1.59 --- pear/MDB2/MDB2/Driver/Datatype/Common.php:1.58 Fri Apr 7 15:24:59 2006 +++ pear/MDB2/MDB2/Driver/Datatype/Common.php Sun Apr 30 19:12:35 2006 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.58 2006/04/07 15:24:59 lsmith Exp $ +// $Id: Common.php,v 1.59 2006/04/30 19:12:35 lsmith Exp $ require_once 'MDB2/LOB.php'; @@ -1425,6 +1425,29 @@ } return implode(', ', $return); } + + + // }}} + // {{{ mapNativeDatatype() + + /** + * Maps a native array description of a field to a MDB2 datatype and length + * + * @param array $field native field description + * @return array containing the various possible types and the length + * @access public + */ + function mapNativeDatatype($field) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'mapNativeDatatype: method not implemented'); + } + } ?> \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/Function/Common.php?r1=1.10&r2=1.11&diff_format=u Index: pear/MDB2/MDB2/Driver/Function/Common.php diff -u pear/MDB2/MDB2/Driver/Function/Common.php:1.10 pear/MDB2/MDB2/Driver/Function/Common.php:1.11 --- pear/MDB2/MDB2/Driver/Function/Common.php:1.10 Wed Mar 1 12:15:33 2006 +++ pear/MDB2/MDB2/Driver/Function/Common.php Sun Apr 30 19:12:35 2006 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.10 2006/03/01 12:15:33 lsmith Exp $ +// $Id: Common.php,v 1.11 2006/04/30 19:12:35 lsmith Exp $ // /** @@ -82,7 +82,7 @@ } $error =& $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'query: method not implemented'); + 'executeStoredProc: method not implemented'); return $error; } http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/Manager/Common.php?r1=1.49&r2=1.50&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/Common.php diff -u pear/MDB2/MDB2/Driver/Manager/Common.php:1.49 pear/MDB2/MDB2/Driver/Manager/Common.php:1.50 --- pear/MDB2/MDB2/Driver/Manager/Common.php:1.49 Tue Apr 18 17:22:39 2006 +++ pear/MDB2/MDB2/Driver/Manager/Common.php Sun Apr 30 19:12:35 2006 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.49 2006/04/18 17:22:39 lsmith Exp $ +// $Id: Common.php,v 1.50 2006/04/30 19:12:35 lsmith Exp $ // /** @@ -89,18 +89,19 @@ return $db; } - if (is_array($fields)) { - foreach ($fields as $field_name => $field) { - $query = $db->getDeclaration($field['type'], $field_name, $field); - if (PEAR::isError($query)) { - return $query; - } - $query_fields[] = $query; + if (!is_array($fields) || empty($fields)) { + return $db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, + 'getFieldDeclarationList: missing any fields'); + } + + foreach ($fields as $field_name => $field) { + $query = $db->getDeclaration($field['type'], $field_name, $field); + if (PEAR::isError($query)) { + return $query; } - return implode(', ', $query_fields); + $query_fields[] = $query; } - return $db->raiseError(MDB2_ERROR_NEED_MORE_DATA, null, null, - 'getFieldDeclarationList: the definition of the table "'.$table_name.'" does not contain any fields'); + return implode(', ', $query_fields); } // }}} @@ -175,7 +176,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'createDatabase: database creation is not supported'); + 'createDatabase: method not implemented'); } // }}} @@ -196,7 +197,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'dropDatabase: database dropping is not supported'); + 'dropDatabase: method not implemented'); } // }}} @@ -379,7 +380,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'alterTable: database table alterations are not supported'); + 'alterTable: method not implemented'); } // }}} @@ -399,7 +400,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'listDatabases: list databases is not supported'); + 'listDatabases: method not implementedd'); } // }}} @@ -419,7 +420,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'listUsers: list user is not supported'); + 'listUsers: method not implemented'); } // }}} @@ -440,7 +441,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'listViews: list view is not supported'); + 'listViews: method not implemented'); } // }}} @@ -461,7 +462,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'listTableViews: list view by table is not supported'); + 'listTableViews: method not implemented'); } // }}} @@ -483,7 +484,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'listTriggers: list view is not supported'); + 'listTriggers: method not implemented'); } // }}} // {{{ listFunctions() @@ -502,7 +503,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'listFunctions: list function is not supported'); + 'listFunctions: method not implemented'); } // }}} // {{{ listTables() @@ -522,7 +523,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'listTables: list tables is not supported'); + 'listTables: method not implemented'); } // }}} @@ -543,7 +544,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'listTableFields: list table fields is not supported'); + 'listTableFields: method not implemented'); } // }}} @@ -639,7 +640,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'listTableIndexes: List Indexes is not supported'); + 'listTableIndexes: method not implemented'); } // }}} @@ -730,7 +731,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'listTableConstraints: List Constraints is not supported'); + 'listTableConstraints: method not implemented'); } // }}} @@ -752,7 +753,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'createSequence: sequence creation not supported'); + 'createSequence: method not implemented'); } // }}} @@ -773,7 +774,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'dropSequence: sequence dropping not supported'); + 'dropSequence: method not implemented'); } // }}} @@ -794,7 +795,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'listSequences: List sequences is not supported'); + 'listSequences: method not implemented'); } } http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/Reverse/Common.php?r1=1.18&r2=1.19&diff_format=u Index: pear/MDB2/MDB2/Driver/Reverse/Common.php diff -u pear/MDB2/MDB2/Driver/Reverse/Common.php:1.18 pear/MDB2/MDB2/Driver/Reverse/Common.php:1.19 --- pear/MDB2/MDB2/Driver/Reverse/Common.php:1.18 Tue Apr 18 18:37:00 2006 +++ pear/MDB2/MDB2/Driver/Reverse/Common.php Sun Apr 30 19:12:35 2006 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.18 2006/04/18 18:37:00 quipo Exp $ +// $Id: Common.php,v 1.19 2006/04/30 19:12:35 lsmith Exp $ // /** @@ -88,7 +88,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'getTableFieldDefinition: table field definition is not supported'); + 'getTableFieldDefinition: method not implemented'); } // }}} @@ -110,7 +110,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'getTableIndexDefinition: getting index definition is not supported'); + 'getTableIndexDefinition: method not implemented'); } // }}} @@ -132,7 +132,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'getTableConstraintDefinition: getting index definition is not supported'); + 'getTableConstraintDefinition: method not implemented'); } // }}} @@ -187,7 +187,7 @@ } return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, - 'getTriggerDefinition: getting trigger definition is not supported'); + 'getTriggerDefinition: method not implemented'); } // }}}
« previous php.pear.cvs (#39912) next »