Skip to content

Commit

Permalink
database/database/ doc blocks work
Browse files Browse the repository at this point in the history
  • Loading branch information
elinw committed Jun 27, 2011
1 parent a98a829 commit 50b3ed2
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 62 deletions.
2 changes: 2 additions & 0 deletions libraries/joomla/database/database/mysqli.php
Expand Up @@ -19,6 +19,8 @@
* @package Joomla.Platform
* @subpackage Database
* @since 11.1
*
* @see http://php.net/manual/en/book.mysqli.php
*/
class JDatabaseMySQLi extends JDatabase
{
Expand Down
64 changes: 42 additions & 22 deletions libraries/joomla/database/database/sqlazure.php
Expand Up @@ -20,35 +20,43 @@
* @package Joomla.Platform
* @subpackage Database
* @since 11.1
*
* @see http://msdn.microsoft.com/en-us/library/ee336279.aspx
*/
class JDatabaseSQLAzure extends JDatabase
{
/**
* @var string The name of the database driver.
* The name of the database driver.
*
* @var string
* @since 11.1
*/
public $name = 'sqlzure';

/**
* @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 = '1900-01-01 00:00:00';

/**
* Test to see if the SQLSRV connector is available.
*
* @return bool True on success, false otherwise.
* @return boolean True on success, false otherwise.
*
* @since 11.1
*/
Expand Down Expand Up @@ -141,6 +149,8 @@ public function __destruct()
}

/**
* Get table constraints
*
* @param string $tableName The name of the database table.
*
* @return Any constraints available for the table
Expand All @@ -160,7 +170,9 @@ protected function _getTableConstraints($tableName)
}

/**
* @param array $constraints A string
* Rename constraints
*
* @param array $constraints Array of strings
* @param string $prefix A string
* @param string $backup A string
*
Expand All @@ -182,8 +194,8 @@ protected function _renameConstraints($constraints = array(), $prefix = null, $b
* The escaping for MSSQL isn't handled in the driver though that would be nice. Because of this we need
* to handle the escaping ourselves.
*
* @param string The string to be escaped.
* @param bool Optional parameter to provide extra escaping.
* @param string $text The string to be escaped.
* @param boolean $extra Optional parameter to provide extra escaping.
*
* @return string The escaped string.
*
Expand All @@ -208,7 +220,7 @@ public function escape($text, $extra = false)
/**
* Determines if the connection to the server is active.
*
* @return bool True if connected to the database engine.
* @return boolean True if connected to the database engine.
*
* @since 11.1
*/
Expand All @@ -225,6 +237,7 @@ public function connected()
* @param bool $ifExists Optionally specify that the table must exist before it is dropped.
*
* @return JDatabaseSQLSrv Returns this object to support chaining.
*
* @since 11.1
*/
function dropTable($tableName, $ifExists = true)
Expand Down Expand Up @@ -294,6 +307,7 @@ public function getExporter()
* @return JDatabaseImporterSQLAzure An importer object.
*
* @since 11.1
*
* @throws DatabaseException
*/
public function getImporter()
Expand Down Expand Up @@ -324,11 +338,11 @@ public function getNumRows($cursor = null)
}

/**
* Get the current or query, or new JDatabaseQuery object.
* 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 @@ -356,6 +370,7 @@ public function getQuery($new = false)
* @return array An array of fields by table.
*
* @since 11.1
*
* @throws DatabaseException
*/
public function getTableColumns( $tables, $typeOnly = true )
Expand Down Expand Up @@ -416,7 +431,7 @@ public function getTableCreate($tables)
*
* @param string $table The name of the table.
*
* @return array An arry of the column specification for the table.
* @return array An arry of the column specification for the table.
*
* @since 11.1
* @throws DatabaseException
Expand Down Expand Up @@ -489,6 +504,7 @@ public function insertid()
* @return mixed A database cursor resource on success, boolean false on failure.
*
* @since 11.1
*
* @throws DatabaseException
*/
public function query()
Expand Down Expand Up @@ -570,9 +586,9 @@ public function query()
/**
* Select a database for use.
*
* @param string $database The name of the database to select for use.
* @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 @@ -603,7 +619,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 All @@ -618,6 +634,7 @@ public function setUTF()
* @return void
*
* @since 11.1
*
* @throws DatabaseException
*/
public function transactionCommit()
Expand All @@ -632,6 +649,7 @@ public function transactionCommit()
* @return void
*
* @since 11.1
*
* @throws DatabaseException
*/
public function transactionRollback()
Expand All @@ -646,6 +664,7 @@ public function transactionRollback()
* @return void
*
* @since 11.1
*
* @throws DatabaseException
*/
public function transactionStart()
Expand Down Expand Up @@ -717,6 +736,7 @@ protected function freeResult($cursor = null)
* @return string The explain output.
*
* @since 11.1
*
* @deprecated 11.2
* @see http://msdn.microsoft.com/en-us/library/aa259203%28SQL.80%29.aspx
*/
Expand Down Expand Up @@ -827,10 +847,10 @@ public function queryBatch($abortOnError=true, $transactionSafe = false)
/**
* Method to check and see if a field exists in a table.
*
* @param string $table The table in which to verify the field.
* @param string $field The field to verify.
* @param string $table The table in which to verify the field.
* @param string $field The field to verify.
*
* @return bool True if the field exists in the table.
* @return boolean True if the field exists in the table.
*
* @since 11.1
*/
Expand Down
14 changes: 8 additions & 6 deletions libraries/joomla/database/database/sqlazurequery.php
Expand Up @@ -21,17 +21,19 @@
class JDatabaseQuerySQLAzure extends JDatabaseQuery
{
/**
* @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 $name_quotes = '';

/**
* @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 $null_date = '1900-01-01 00:00:00';
Expand Down

0 comments on commit 50b3ed2

Please sign in to comment.