Skip to content

Commit

Permalink
Docblocks mysdl
Browse files Browse the repository at this point in the history
  • Loading branch information
elinw committed Jun 25, 2011
1 parent 912c098 commit 910580b
Showing 1 changed file with 28 additions and 19 deletions.
47 changes: 28 additions & 19 deletions libraries/joomla/database/database/mysql.php
Expand Up @@ -19,35 +19,44 @@
* @package Joomla.Platform
* @subpackage Database
* @since 11.1
*
* @see http://dev.mysql.com/doc/
*/
class JDatabaseMySQL extends JDatabase
{
/**
* @var string The name of the database driver.
* The name of the database driver.
*
* @var string
* @since 11.1
*/
public $name = 'mysql';

/**
* @var string The character(s) used to quote SQL statement names such as table names or field names,
* etc. The child classes should define this as necessary. If a single character string the
* same character is used for both sides of the quoted name, else the first character will be
* used for the opening quote and the second for the closing quote.
* The character(s) used to quote SQL statement names such as table names or field names,
* etc. The child classes should define this as necessary. If a single character string the
* same character is used for both sides of the quoted name, else the first character will be
* used for the opening quote and the second for the closing quote.
*
* @var string
* @since 11.1
*/
protected $nameQuote = '`';

/**
* @var string The null or zero representation of a timestamp for the database driver. This should be
* defined in child classes to hold the appropriate value for the engine.
* The null or zero representation of a timestamp for the database driver. This should be
* defined in child classes to hold the appropriate value for the engine.
*
* @var string
* @since 11.1
*/
protected $nullDate = '0000-00-00 00:00:00';

/**
* Constructor.
* List of options used to configure the connection
*
* @param array $options List of options used to configure the connection
* @param array $options Array of database options with keys: host, user, password, database, select.
*
* @return void
*
Expand Down Expand Up @@ -142,7 +151,7 @@ public function escape($text, $extra = false)
/**
* Test to see if the MySQL connector is available.
*
* @return bool True on success, false otherwise.
* @return boolean True on success, false otherwise.
*
* @since 11.1
*/
Expand Down Expand Up @@ -170,10 +179,10 @@ public function connected()
/**
* Drops a table from the database.
*
* @param string $tableName The name of the database table to drop.
* @param bool $ifExists Optionally specify that the table must exist before it is dropped.
* @param string $tableName The name of the database table to drop.
* @param boolean $ifExists Optionally specify that the table must exist before it is dropped.
*
* @return JDatabaseSQLSrv Returns this object to support chaining.
* @return JDatabaseSQLSrv Returns this object to support chaining.
* @since 11.1
*/
function dropTable($tableName, $ifExists = true)
Expand Down Expand Up @@ -206,7 +215,7 @@ public function getAffectedRows()
/**
* Method to get the database collation in use by sampling a text field of a table in the database.
*
* @return mixed The collation in use by the database or boolean false if not supported.
* @return mixed The collation in use by the database (string) or boolean false if not supported.
*
* @since 11.1
*/
Expand Down Expand Up @@ -278,9 +287,9 @@ public function getNumRows($cursor = null)
/**
* Get the current or query, or new JDatabaseQuery object.
*
* @param bool $new False to return the last query set, True to return a new JDatabaseQuery object.
* @param boolean $new False to return the last query set, True to return a new JDatabaseQuery object.
*
* @return mixed The current value of the internal SQL variable or a new JDatabaseQuery object.
* @return mixed The current value of the internal SQL variable or a new JDatabaseQuery object.
*
* @since 11.1
* @throws DatabaseException
Expand Down Expand Up @@ -520,7 +529,7 @@ public function query()
*
* @param string $database The name of the database to select for use.
*
* @return bool True if the database was successfully selected.
* @return boolean True if the database was successfully selected.
*
* @since 11.1
* @throws DatabaseException
Expand Down Expand Up @@ -551,7 +560,7 @@ public function select($database)
/**
* Set the connection to use UTF-8 character encoding.
*
* @return bool True on success.
* @return boolean True on success.
*
* @since 11.1
*/
Expand Down Expand Up @@ -707,7 +716,7 @@ public function explain()
}
$buffer .= '</tbody></table>';

// Restore the original query to it's state before we ran the explain.
// Restore the original query to its state before we ran the explain.
$this->sql = $backup;

// Free up system resources and return.
Expand Down Expand Up @@ -760,4 +769,4 @@ public function queryBatch($abortOnError=true, $transactionSafe = false)
}
return $error ? false : true;
}
}
}

0 comments on commit 910580b

Please sign in to comment.