Index: trunk/phase3/includes/db/DatabaseIbm_db2.php |
— | — | @@ -21,9 +21,9 @@ |
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Builder method for the class |
25 | | - * @param DatabaseIbm_db2 $db Database interface |
26 | | - * @param string $table table name |
27 | | - * @param string $field column name |
| 25 | + * @param $db DatabaseIbm_db2: Database interface |
| 26 | + * @param $table String: table name |
| 27 | + * @param $field String: column name |
28 | 28 | * @return IBM_DB2Field |
29 | 29 | */ |
30 | 30 | static function fromText($db, $table, $field) { |
— | — | @@ -403,12 +403,13 @@ |
404 | 404 | |
405 | 405 | /** |
406 | 406 | * |
407 | | - * @param string $server hostname of database server |
408 | | - * @param string $user username |
409 | | - * @param string $password |
410 | | - * @param string $dbName database name on the server |
411 | | - * @param function $failFunction (optional) |
412 | | - * @param integer $flags database behaviour flags (optional, unused) |
| 407 | + * @param $server String: hostname of database server |
| 408 | + * @param $user String: username |
| 409 | + * @param $password String: password |
| 410 | + * @param $dbName String: database name on the server |
| 411 | + * @param $failFunction Callback (optional) |
| 412 | + * @param $flags Integer: database behaviour flags (optional, unused) |
| 413 | + * @param $schema String |
413 | 414 | */ |
414 | 415 | public function DatabaseIbm_db2($server = false, $user = false, $password = false, |
415 | 416 | $dbName = false, $failFunction = false, $flags = 0, |
— | — | @@ -441,9 +442,9 @@ |
442 | 443 | |
443 | 444 | /** |
444 | 445 | * Enables options only if the ibm_db2 extension version supports them |
445 | | - * @param string $name Name of the option in the options array |
446 | | - * @param string $const Name of the constant holding the right option value |
447 | | - * @param int $type Whether this is a Connection or Statement otion |
| 446 | + * @param $name String: name of the option in the options array |
| 447 | + * @param $const String: name of the constant holding the right option value |
| 448 | + * @param $type Integer: whether this is a Connection or Statement otion |
448 | 449 | */ |
449 | 450 | private function setDB2Option($name, $const, $type) { |
450 | 451 | if (defined($const)) { |
— | — | @@ -457,7 +458,7 @@ |
458 | 459 | |
459 | 460 | /** |
460 | 461 | * Outputs debug information in the appropriate place |
461 | | - * @param string $string The relevant debug message |
| 462 | + * @param $string String: the relevant debug message |
462 | 463 | */ |
463 | 464 | private function installPrint($string) { |
464 | 465 | wfDebug("$string"); |
— | — | @@ -471,10 +472,10 @@ |
472 | 473 | * Opens a database connection and returns it |
473 | 474 | * Closes any existing connection |
474 | 475 | * @return a fresh connection |
475 | | - * @param string $server hostname |
476 | | - * @param string $user |
477 | | - * @param string $password |
478 | | - * @param string $dbName database name |
| 476 | + * @param $server String: hostname |
| 477 | + * @param $user String |
| 478 | + * @param $password String |
| 479 | + * @param $dbName String: database name |
479 | 480 | */ |
480 | 481 | public function open( $server, $user, $password, $dbName ) |
481 | 482 | { |
— | — | @@ -576,14 +577,14 @@ |
577 | 578 | |
578 | 579 | /** |
579 | 580 | * Returns a fresh instance of this class |
580 | | - * @static |
581 | | - * @return |
582 | | - * @param string $server hostname of database server |
583 | | - * @param string $user username |
584 | | - * @param string $password |
585 | | - * @param string $dbName database name on the server |
586 | | - * @param function $failFunction (optional) |
587 | | - * @param integer $flags database behaviour flags (optional, unused) |
| 581 | + * |
| 582 | + * @param $server String: hostname of database server |
| 583 | + * @param $user String: username |
| 584 | + * @param $password String |
| 585 | + * @param $dbName String: database name on the server |
| 586 | + * @param $failFunction Callback (optional) |
| 587 | + * @param $flags Integer: database behaviour flags (optional, unused) |
| 588 | + * @return DatabaseIbm_db2 object |
588 | 589 | */ |
589 | 590 | static function newFromParams( $server, $user, $password, $dbName, $failFunction = false, $flags = 0) |
590 | 591 | { |
— | — | @@ -769,7 +770,7 @@ |
770 | 771 | /** |
771 | 772 | * Escapes strings |
772 | 773 | * Doesn't escape numbers |
773 | | - * @param string s string to escape |
| 774 | + * @param $s String: string to escape |
774 | 775 | * @return escaped string |
775 | 776 | */ |
776 | 777 | public function addQuotes( $s ) { |
— | — | @@ -793,7 +794,7 @@ |
794 | 795 | /** |
795 | 796 | * Verifies that a DB2 column/field type is numeric |
796 | 797 | * @return bool true if numeric |
797 | | - * @param string $type DB2 column type |
| 798 | + * @param $type String: DB2 column type |
798 | 799 | */ |
799 | 800 | public function is_numeric_type( $type ) { |
800 | 801 | switch (strtoupper($type)) { |
— | — | @@ -812,7 +813,7 @@ |
813 | 814 | |
814 | 815 | /** |
815 | 816 | * Alias for addQuotes() |
816 | | - * @param string s string to escape |
| 817 | + * @param $s String: string to escape |
817 | 818 | * @return escaped string |
818 | 819 | */ |
819 | 820 | public function strencode( $s ) { |
— | — | @@ -946,9 +947,9 @@ |
947 | 948 | /** |
948 | 949 | * Construct a LIMIT query with optional offset |
949 | 950 | * This is used for query pages |
950 | | - * $sql string SQL query we will append the limit too |
951 | | - * $limit integer the SQL limit |
952 | | - * $offset integer the SQL offset (default false) |
| 951 | + * @param $sql string SQL query we will append the limit too |
| 952 | + * @param $limit integer the SQL limit |
| 953 | + * @param $offset integer the SQL offset (default false) |
953 | 954 | */ |
954 | 955 | public function limitResult($sql, $limit, $offset=false) { |
955 | 956 | if( !is_numeric($limit) ) { |
— | — | @@ -984,7 +985,7 @@ |
985 | 986 | /** |
986 | 987 | * Generates a timestamp in an insertable format |
987 | 988 | * @return string timestamp value |
988 | | - * @param timestamp $ts |
| 989 | + * @param $ts timestamp |
989 | 990 | */ |
990 | 991 | public function timestamp( $ts=0 ) { |
991 | 992 | // TS_MW cannot be easily distinguished from an integer |
— | — | @@ -993,7 +994,7 @@ |
994 | 995 | |
995 | 996 | /** |
996 | 997 | * Return the next in a sequence, save the value for retrieval via insertId() |
997 | | - * @param string seqName Name of a defined sequence in the database |
| 998 | + * @param $seqName String: name of a defined sequence in the database |
998 | 999 | * @return next value in that sequence |
999 | 1000 | */ |
1000 | 1001 | public function nextSequenceValue( $seqName ) { |
— | — | @@ -1020,9 +1021,9 @@ |
1021 | 1022 | |
1022 | 1023 | /** |
1023 | 1024 | * Updates the mInsertId property with the value of the last insert into a generated column |
1024 | | - * @param string $table Sanitized table name |
1025 | | - * @param mixed $primaryKey String name of the primary key or a bool if this call is a do-nothing |
1026 | | - * @param resource $stmt Prepared statement resource |
| 1025 | + * @param $table String: sanitized table name |
| 1026 | + * @param $primaryKey Mixed: string name of the primary key or a bool if this call is a do-nothing |
| 1027 | + * @param $stmt Resource: prepared statement resource |
1027 | 1028 | * of the SELECT primary_key FROM FINAL TABLE ( INSERT ... ) form |
1028 | 1029 | */ |
1029 | 1030 | private function calcInsertId($table, $primaryKey, $stmt) { |
— | — | @@ -1038,10 +1039,10 @@ |
1039 | 1040 | * $args may be a single associative array, or an array of these with numeric keys, |
1040 | 1041 | * for multi-row insert |
1041 | 1042 | * |
1042 | | - * @param array $table String: Name of the table to insert to. |
1043 | | - * @param array $args Array: Items to insert into the table. |
1044 | | - * @param array $fname String: Name of the function, for profiling |
1045 | | - * @param mixed $options String or Array. Valid options: IGNORE |
| 1043 | + * @param $table String: Name of the table to insert to. |
| 1044 | + * @param $args Array: Items to insert into the table. |
| 1045 | + * @param $fname String: Name of the function, for profiling |
| 1046 | + * @param $options String or Array. Valid options: IGNORE |
1046 | 1047 | * |
1047 | 1048 | * @return bool Success of insert operation. IGNORE always returns true. |
1048 | 1049 | */ |
— | — | @@ -1150,9 +1151,9 @@ |
1151 | 1152 | * Given a table name and a hash of columns with values |
1152 | 1153 | * Removes primary key columns from the hash where the value is NULL |
1153 | 1154 | * |
1154 | | - * @param string $table Name of the table |
1155 | | - * @param array $args Array of hashes of column names with values |
1156 | | - * @return array Tuple containing filtered array of columns, array of primary keys |
| 1155 | + * @param $table String: name of the table |
| 1156 | + * @param $args Array of hashes of column names with values |
| 1157 | + * @return Array: tuple containing filtered array of columns, array of primary keys |
1157 | 1158 | */ |
1158 | 1159 | private function removeNullPrimaryKeys($table, $args) { |
1159 | 1160 | $schema = $this->mSchema; |
— | — | @@ -1178,14 +1179,14 @@ |
1179 | 1180 | /** |
1180 | 1181 | * UPDATE wrapper, takes a condition array and a SET array |
1181 | 1182 | * |
1182 | | - * @param string $table The table to UPDATE |
1183 | | - * @param array $values An array of values to SET |
1184 | | - * @param array $conds An array of conditions (WHERE). Use '*' to update all rows. |
1185 | | - * @param string $fname The Class::Function calling this function |
1186 | | - * (for the log) |
1187 | | - * @param array $options An array of UPDATE options, can be one or |
1188 | | - * more of IGNORE, LOW_PRIORITY |
1189 | | - * @return bool |
| 1183 | + * @param $table String: The table to UPDATE |
| 1184 | + * @param $values An array of values to SET |
| 1185 | + * @param $conds An array of conditions (WHERE). Use '*' to update all rows. |
| 1186 | + * @param $fname String: The Class::Function calling this function |
| 1187 | + * (for the log) |
| 1188 | + * @param $options An array of UPDATE options, can be one or |
| 1189 | + * more of IGNORE, LOW_PRIORITY |
| 1190 | + * @return Boolean |
1190 | 1191 | */ |
1191 | 1192 | public function update( $table, $values, $conds, $fname = 'Database::update', $options = array() ) { |
1192 | 1193 | $table = $this->tableName( $table ); |
— | — | @@ -1216,7 +1217,7 @@ |
1217 | 1218 | |
1218 | 1219 | /** |
1219 | 1220 | * Returns the number of rows affected by the last query or 0 |
1220 | | - * @return int the number of rows affected by the last query |
| 1221 | + * @return Integer: the number of rows affected by the last query |
1221 | 1222 | */ |
1222 | 1223 | public function affectedRows() { |
1223 | 1224 | if ( !is_null( $this->mAffectedRows ) ) { |
— | — | @@ -1231,9 +1232,9 @@ |
1232 | 1233 | /** |
1233 | 1234 | * Simulates REPLACE with a DELETE followed by INSERT |
1234 | 1235 | * @param $table Object |
1235 | | - * @param array $uniqueIndexes array consisting of indexes and arrays of indexes |
1236 | | - * @param array $rows Rows to insert |
1237 | | - * @param string $fname Name of the function for profiling |
| 1236 | + * @param $uniqueIndexes Array consisting of indexes and arrays of indexes |
| 1237 | + * @param $rows Array: rows to insert |
| 1238 | + * @param $fname String: name of the function for profiling |
1238 | 1239 | * @return nothing |
1239 | 1240 | */ |
1240 | 1241 | function replace( $table, $uniqueIndexes, $rows, $fname = 'DatabaseIbm_db2::replace' ) { |
— | — | @@ -1288,8 +1289,8 @@ |
1289 | 1290 | /** |
1290 | 1291 | * Returns the number of rows in the result set |
1291 | 1292 | * Has to be called right after the corresponding select query |
1292 | | - * @param object $res result set |
1293 | | - * @return int number of rows |
| 1293 | + * @param $res Object result set |
| 1294 | + * @return Integer: number of rows |
1294 | 1295 | */ |
1295 | 1296 | public function numRows( $res ) { |
1296 | 1297 | if ( $res instanceof ResultWrapper ) { |
— | — | @@ -1305,8 +1306,8 @@ |
1306 | 1307 | |
1307 | 1308 | /** |
1308 | 1309 | * Moves the row pointer of the result set |
1309 | | - * @param object $res result set |
1310 | | - * @param int $row row number |
| 1310 | + * @param $res Object: result set |
| 1311 | + * @param $row Integer: row number |
1311 | 1312 | * @return success or failure |
1312 | 1313 | */ |
1313 | 1314 | public function dataSeek( $res, $row ) { |
— | — | @@ -1322,8 +1323,8 @@ |
1323 | 1324 | |
1324 | 1325 | /** |
1325 | 1326 | * Frees memory associated with a statement resource |
1326 | | - * @param object $res Statement resource to free |
1327 | | - * @return bool success or failure |
| 1327 | + * @param $res Object: statement resource to free |
| 1328 | + * @return Boolean success or failure |
1328 | 1329 | */ |
1329 | 1330 | public function freeResult( $res ) { |
1330 | 1331 | if ( $res instanceof ResultWrapper ) { |
— | — | @@ -1336,7 +1337,7 @@ |
1337 | 1338 | |
1338 | 1339 | /** |
1339 | 1340 | * Returns the number of columns in a resource |
1340 | | - * @param object $res Statement resource |
| 1341 | + * @param $res Object: statement resource |
1341 | 1342 | * @return Number of fields/columns in resource |
1342 | 1343 | */ |
1343 | 1344 | public function numFields( $res ) { |
— | — | @@ -1348,9 +1349,9 @@ |
1349 | 1350 | |
1350 | 1351 | /** |
1351 | 1352 | * Returns the nth column name |
1352 | | - * @param object $res Statement resource |
1353 | | - * @param int $n Index of field or column |
1354 | | - * @return string name of nth column |
| 1353 | + * @param $res Object: statement resource |
| 1354 | + * @param $n Integer: Index of field or column |
| 1355 | + * @return String name of nth column |
1355 | 1356 | */ |
1356 | 1357 | public function fieldName( $res, $n ) { |
1357 | 1358 | if ( $res instanceof ResultWrapper ) { |
— | — | @@ -1362,15 +1363,15 @@ |
1363 | 1364 | /** |
1364 | 1365 | * SELECT wrapper |
1365 | 1366 | * |
1366 | | - * @param mixed $table Array or string, table name(s) (prefix auto-added) |
1367 | | - * @param mixed $vars Array or string, field name(s) to be retrieved |
1368 | | - * @param mixed $conds Array or string, condition(s) for WHERE |
1369 | | - * @param string $fname Calling function name (use __METHOD__) for logs/profiling |
1370 | | - * @param array $options Associative array of options (e.g. array('GROUP BY' => 'page_title')), |
1371 | | - * see Database::makeSelectOptions code for list of supported stuff |
1372 | | - * @param array $join_conds Associative array of table join conditions (optional) |
1373 | | - * (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') ) |
1374 | | - * @return mixed Database result resource (feed to Database::fetchObject or whatever), or false on failure |
| 1367 | + * @param $table Array or string, table name(s) (prefix auto-added) |
| 1368 | + * @param $vars Array or string, field name(s) to be retrieved |
| 1369 | + * @param $conds Array or string, condition(s) for WHERE |
| 1370 | + * @param $fname String: calling function name (use __METHOD__) for logs/profiling |
| 1371 | + * @param $options Associative array of options (e.g. array('GROUP BY' => 'page_title')), |
| 1372 | + * see Database::makeSelectOptions code for list of supported stuff |
| 1373 | + * @param $join_conds Associative array of table join conditions (optional) |
| 1374 | + * (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') ) |
| 1375 | + * @return Mixed: database result resource (feed to Database::fetchObject or whatever), or false on failure |
1375 | 1376 | */ |
1376 | 1377 | public function select( $table, $vars, $conds='', $fname = 'DatabaseIbm_db2::select', $options = array(), $join_conds = array() ) |
1377 | 1378 | { |
— | — | @@ -1411,9 +1412,9 @@ |
1412 | 1413 | * |
1413 | 1414 | * @private |
1414 | 1415 | * |
1415 | | - * @param array $options an associative array of options to be turned into |
| 1416 | + * @param $options Associative array of options to be turned into |
1416 | 1417 | * an SQL query, valid keys are listed in the function. |
1417 | | - * @return array |
| 1418 | + * @return Array |
1418 | 1419 | */ |
1419 | 1420 | function makeSelectOptions( $options ) { |
1420 | 1421 | $preLimitTail = $postLimitTail = ''; |
— | — | @@ -1447,7 +1448,7 @@ |
1448 | 1449 | * Get search engine class. All subclasses of this |
1449 | 1450 | * need to implement this if they wish to use searching. |
1450 | 1451 | * |
1451 | | - * @return string |
| 1452 | + * @return String |
1452 | 1453 | */ |
1453 | 1454 | public function getSearchEngine() { |
1454 | 1455 | return "SearchIBM_DB2"; |
— | — | @@ -1455,7 +1456,7 @@ |
1456 | 1457 | |
1457 | 1458 | /** |
1458 | 1459 | * Did the last database access fail because of deadlock? |
1459 | | - * @return bool |
| 1460 | + * @return Boolean |
1460 | 1461 | */ |
1461 | 1462 | public function wasDeadlock() { |
1462 | 1463 | // get SQLSTATE |
— | — | @@ -1473,7 +1474,7 @@ |
1474 | 1475 | /** |
1475 | 1476 | * Ping the server and try to reconnect if it there is no connection |
1476 | 1477 | * The connection may be closed and reopened while this happens |
1477 | | - * @return bool whether the connection exists |
| 1478 | + * @return Boolean: whether the connection exists |
1478 | 1479 | */ |
1479 | 1480 | public function ping() { |
1480 | 1481 | // db2_ping() doesn't exist |
— | — | @@ -1533,9 +1534,9 @@ |
1534 | 1535 | |
1535 | 1536 | /** |
1536 | 1537 | * Query whether a given column exists in the mediawiki schema |
1537 | | - * @param string $table name of the table |
1538 | | - * @param string $field name of the column |
1539 | | - * @param string $fname function name for logging and profiling |
| 1538 | + * @param $table String: name of the table |
| 1539 | + * @param $field String: name of the column |
| 1540 | + * @param $fname String: function name for logging and profiling |
1540 | 1541 | */ |
1541 | 1542 | public function fieldExists( $table, $field, $fname = 'DatabaseIbm_db2::fieldExists' ) { |
1542 | 1543 | $table = $this->tableName( $table ); |
— | — | @@ -1558,10 +1559,10 @@ |
1559 | 1560 | /** |
1560 | 1561 | * Returns information about an index |
1561 | 1562 | * If errors are explicitly ignored, returns NULL on failure |
1562 | | - * @param string $table table name |
1563 | | - * @param string $index index name |
1564 | | - * @param string |
1565 | | - * @return object query row in object form |
| 1563 | + * @param $table String: table name |
| 1564 | + * @param $index String: index name |
| 1565 | + * @param $fname String: function name for logging and profiling |
| 1566 | + * @return Object query row in object form |
1566 | 1567 | */ |
1567 | 1568 | public function indexInfo( $table, $index, $fname = 'DatabaseIbm_db2::indexExists' ) { |
1568 | 1569 | $table = $this->tableName( $table ); |
— | — | @@ -1581,8 +1582,8 @@ |
1582 | 1583 | |
1583 | 1584 | /** |
1584 | 1585 | * Returns an information object on a table column |
1585 | | - * @param string $table table name |
1586 | | - * @param string $field column name |
| 1586 | + * @param $table String: table name |
| 1587 | + * @param $field String: column name |
1587 | 1588 | * @return IBM_DB2Field |
1588 | 1589 | */ |
1589 | 1590 | public function fieldInfo( $table, $field ) { |
— | — | @@ -1591,9 +1592,9 @@ |
1592 | 1593 | |
1593 | 1594 | /** |
1594 | 1595 | * db2_field_type() wrapper |
1595 | | - * @param object $res Result of executed statement |
1596 | | - * @param mixed $index number or name of the column |
1597 | | - * @return string column type |
| 1596 | + * @param $res Object: result of executed statement |
| 1597 | + * @param $index Mixed: number or name of the column |
| 1598 | + * @return String column type |
1598 | 1599 | */ |
1599 | 1600 | public function fieldType( $res, $index ) { |
1600 | 1601 | if ( $res instanceof ResultWrapper ) { |
— | — | @@ -1604,10 +1605,10 @@ |
1605 | 1606 | |
1606 | 1607 | /** |
1607 | 1608 | * Verifies that an index was created as unique |
1608 | | - * @param string $table table name |
1609 | | - * @param string $index index name |
1610 | | - * @param string $fnam function name for profiling |
1611 | | - * @return bool |
| 1609 | + * @param $table String: table name |
| 1610 | + * @param $index String: index name |
| 1611 | + * @param $fname function name for profiling |
| 1612 | + * @return Bool |
1612 | 1613 | */ |
1613 | 1614 | public function indexUnique ($table, $index, $fname = 'Database::indexUnique' ) { |
1614 | 1615 | $table = $this->tableName( $table ); |
— | — | @@ -1630,9 +1631,9 @@ |
1631 | 1632 | |
1632 | 1633 | /** |
1633 | 1634 | * Returns the size of a text field, or -1 for "unlimited" |
1634 | | - * @param string $table table name |
1635 | | - * @param string $field column name |
1636 | | - * @return int length or -1 for unlimited |
| 1635 | + * @param $table String: table name |
| 1636 | + * @param $field String: column name |
| 1637 | + * @return Integer: length or -1 for unlimited |
1637 | 1638 | */ |
1638 | 1639 | public function textFieldSize( $table, $field ) { |
1639 | 1640 | $table = $this->tableName( $table ); |
— | — | @@ -1650,12 +1651,12 @@ |
1651 | 1652 | |
1652 | 1653 | /** |
1653 | 1654 | * DELETE where the condition is a join |
1654 | | - * @param string $delTable deleting from this table |
1655 | | - * @param string $joinTable using data from this table |
1656 | | - * @param string $delVar variable in deleteable table |
1657 | | - * @param string $joinVar variable in data table |
1658 | | - * @param array $conds conditionals for join table |
1659 | | - * @param string $fname function name for profiling |
| 1655 | + * @param $delTable String: deleting from this table |
| 1656 | + * @param $joinTable String: using data from this table |
| 1657 | + * @param $delVar String: variable in deleteable table |
| 1658 | + * @param $joinVar String: variable in data table |
| 1659 | + * @param $conds Array: conditionals for join table |
| 1660 | + * @param $fname String: function name for profiling |
1660 | 1661 | */ |
1661 | 1662 | public function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = "DatabaseIbm_db2::deleteJoin" ) { |
1662 | 1663 | if ( !$conds ) { |
— | — | @@ -1675,7 +1676,7 @@ |
1676 | 1677 | |
1677 | 1678 | /** |
1678 | 1679 | * Description is left as an exercise for the reader |
1679 | | - * @param mixed $b data to be encoded |
| 1680 | + * @param $b Mixed: data to be encoded |
1680 | 1681 | * @return IBM_DB2Blob |
1681 | 1682 | */ |
1682 | 1683 | public function encodeBlob($b) { |
— | — | @@ -1684,7 +1685,7 @@ |
1685 | 1686 | |
1686 | 1687 | /** |
1687 | 1688 | * Description is left as an exercise for the reader |
1688 | | - * @param IBM_DB2Blob $b data to be decoded |
| 1689 | + * @param $b IBM_DB2Blob: data to be decoded |
1689 | 1690 | * @return mixed |
1690 | 1691 | */ |
1691 | 1692 | public function decodeBlob($b) { |
— | — | @@ -1693,8 +1694,8 @@ |
1694 | 1695 | |
1695 | 1696 | /** |
1696 | 1697 | * Convert into a list of string being concatenated |
1697 | | - * @param array $stringList strings that need to be joined together by the SQL engine |
1698 | | - * @return string joined by the concatenation operator |
| 1698 | + * @param $stringList Array: strings that need to be joined together by the SQL engine |
| 1699 | + * @return String: joined by the concatenation operator |
1699 | 1700 | */ |
1700 | 1701 | public function buildConcat( $stringList ) { |
1701 | 1702 | // || is equivalent to CONCAT |
— | — | @@ -1704,8 +1705,8 @@ |
1705 | 1706 | |
1706 | 1707 | /** |
1707 | 1708 | * Generates the SQL required to convert a DB2 timestamp into a Unix epoch |
1708 | | - * @param string $column name of timestamp column |
1709 | | - * @return string SQL code |
| 1709 | + * @param $column String: name of timestamp column |
| 1710 | + * @return String: SQL code |
1710 | 1711 | */ |
1711 | 1712 | public function extractUnixEpoch( $column ) { |
1712 | 1713 | // TODO |
— | — | @@ -1724,7 +1725,8 @@ |
1725 | 1726 | * ! = raw SQL bit (a function for instance) |
1726 | 1727 | * & = filename; reads the file and inserts as a blob |
1727 | 1728 | * (we don't use this though...) |
1728 | | - * @param string $sql SQL statement with appropriate markers |
| 1729 | + * @param $sql String: SQL statement with appropriate markers |
| 1730 | + * @param $func String: Name of the function, for profiling |
1729 | 1731 | * @return resource a prepared DB2 SQL statement |
1730 | 1732 | */ |
1731 | 1733 | public function prepare( $sql, $func = 'DB2::prepare' ) { |
— | — | @@ -1734,7 +1736,7 @@ |
1735 | 1737 | |
1736 | 1738 | /** |
1737 | 1739 | * Frees resources associated with a prepared statement |
1738 | | - * @return bool success or failure |
| 1740 | + * @return Boolean success or failure |
1739 | 1741 | */ |
1740 | 1742 | public function freePrepared( $prepared ) { |
1741 | 1743 | return db2_free_stmt($prepared); |
— | — | @@ -1742,9 +1744,9 @@ |
1743 | 1745 | |
1744 | 1746 | /** |
1745 | 1747 | * Execute a prepared query with the various arguments |
1746 | | - * @param string $prepared the prepared sql |
1747 | | - * @param mixed $args Either an array here, or put scalars as varargs |
1748 | | - * @return resource Results object |
| 1748 | + * @param $prepared String: the prepared sql |
| 1749 | + * @param $args Mixed: either an array here, or put scalars as varargs |
| 1750 | + * @return Resource: results object |
1749 | 1751 | */ |
1750 | 1752 | public function execute( $prepared, $args = null ) { |
1751 | 1753 | if( !is_array( $args ) ) { |
— | — | @@ -1778,9 +1780,9 @@ |
1779 | 1781 | /** |
1780 | 1782 | * For faking prepared SQL statements on DBs that don't support |
1781 | 1783 | * it directly. |
1782 | | - * @param resource $preparedQuery String: a 'preparable' SQL statement |
1783 | | - * @param array $args Array of arguments to fill it with |
1784 | | - * @return string executable statement |
| 1784 | + * @param $preparedQuery String: a 'preparable' SQL statement |
| 1785 | + * @param $args Array of arguments to fill it with |
| 1786 | + * @return String: executable statement |
1785 | 1787 | */ |
1786 | 1788 | public function fillPrepared( $preparedQuery, $args ) { |
1787 | 1789 | reset( $args ); |
— | — | @@ -1805,8 +1807,8 @@ |
1806 | 1808 | /** |
1807 | 1809 | * Bitwise negation of a column or value in SQL |
1808 | 1810 | * Same as (~field) in C |
1809 | | - * @param string $field |
1810 | | - * @return string |
| 1811 | + * @param $field String |
| 1812 | + * @return String |
1811 | 1813 | */ |
1812 | 1814 | function bitNot($field) { |
1813 | 1815 | //expecting bit-fields smaller than 4bytes |
— | — | @@ -1816,9 +1818,9 @@ |
1817 | 1819 | /** |
1818 | 1820 | * Bitwise AND of two columns or values in SQL |
1819 | 1821 | * Same as (fieldLeft & fieldRight) in C |
1820 | | - * @param string $fieldLeft |
1821 | | - * @param string $fieldRight |
1822 | | - * @return string |
| 1822 | + * @param $fieldLeft String |
| 1823 | + * @param $fieldRight String |
| 1824 | + * @return String |
1823 | 1825 | */ |
1824 | 1826 | function bitAnd($fieldLeft, $fieldRight) { |
1825 | 1827 | return 'BITAND('.$fieldLeft.', '.$fieldRight.')'; |
— | — | @@ -1827,9 +1829,9 @@ |
1828 | 1830 | /** |
1829 | 1831 | * Bitwise OR of two columns or values in SQL |
1830 | 1832 | * Same as (fieldLeft | fieldRight) in C |
1831 | | - * @param string $fieldLeft |
1832 | | - * @param string $fieldRight |
1833 | | - * @return string |
| 1833 | + * @param $fieldLeft String |
| 1834 | + * @param $fieldRight String |
| 1835 | + * @return String |
1834 | 1836 | */ |
1835 | 1837 | function bitOr($fieldLeft, $fieldRight) { |
1836 | 1838 | return 'BITOR('.$fieldLeft.', '.$fieldRight.')'; |