From f768689bd0aeddd19a396148ed369c0dcef3768f Mon Sep 17 00:00:00 2001 From: Val Bancer Date: Sat, 25 Aug 2018 19:34:29 +0200 Subject: [PATCH] Improve documentation --- lib/Cake/Model/Datasource/Database/Mysql.php | 13 ++++++++++--- lib/Cake/Model/Datasource/Database/Postgres.php | 7 +++++++ lib/Cake/Model/Datasource/Database/Sqlite.php | 7 +++++++ lib/Cake/Model/Datasource/Database/Sqlserver.php | 7 +++++++ 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Model/Datasource/Database/Mysql.php b/lib/Cake/Model/Datasource/Database/Mysql.php index 7a13c3108..b228f61a2 100644 --- a/lib/Cake/Model/Datasource/Database/Mysql.php +++ b/lib/Cake/Model/Datasource/Database/Mysql.php @@ -141,6 +141,13 @@ class Mysql extends DboSource { */ protected $_charsets = array(); +/** + * Map of the columns contained in a result. + * + * @var array + */ + public $map; + /** * Connects to the database using options in the given configuration array. * @@ -305,7 +312,7 @@ class Mysql extends DboSource { * Query charset by collation * * @param string $name Collation name - * @return string Character set name + * @return string|false Character set name */ public function getCharsetName($name) { if ((bool)version_compare($this->getVersion(), "5", "<")) { @@ -391,7 +398,7 @@ class Mysql extends DboSource { * @param array $fields The fields to update. * @param array $values The values to set. * @param mixed $conditions The conditions to use. - * @return array + * @return bool */ public function update(Model $model, $fields = array(), $values = null, $conditions = null) { if (!$this->_useAlias) { @@ -545,7 +552,7 @@ class Mysql extends DboSource { * * @param array $compare Result of a CakeSchema::compare() * @param string $table The table name. - * @return array Array of alter statements to make. + * @return string|false String of alter statements to make. */ public function alterSchema($compare, $table = null) { if (!is_array($compare)) { diff --git a/lib/Cake/Model/Datasource/Database/Postgres.php b/lib/Cake/Model/Datasource/Database/Postgres.php index 2bf200fee..4f48304a5 100644 --- a/lib/Cake/Model/Datasource/Database/Postgres.php +++ b/lib/Cake/Model/Datasource/Database/Postgres.php @@ -104,6 +104,13 @@ class Postgres extends DboSource { */ protected $_sqlOps = array('like', 'ilike', 'or', 'not', 'in', 'between', '~', '~\*', '\!~', '\!~\*', 'similar to'); +/** + * Map of the columns contained in a result. + * + * @var array + */ + public $map; + /** * Connects to the database using options in the given configuration array. * diff --git a/lib/Cake/Model/Datasource/Database/Sqlite.php b/lib/Cake/Model/Datasource/Database/Sqlite.php index 2cf39c356..221c18f05 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlite.php +++ b/lib/Cake/Model/Datasource/Database/Sqlite.php @@ -102,6 +102,13 @@ class Sqlite extends DboSource { ), ); +/** + * Map of the columns contained in a result. + * + * @var array + */ + public $map; + /** * Connects to the database using config['database'] as a filename. * diff --git a/lib/Cake/Model/Datasource/Database/Sqlserver.php b/lib/Cake/Model/Datasource/Database/Sqlserver.php index c25934409..81b40feda 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlserver.php +++ b/lib/Cake/Model/Datasource/Database/Sqlserver.php @@ -106,6 +106,13 @@ class Sqlserver extends DboSource { 'boolean' => array('name' => 'bit') ); +/** + * Map of the columns contained in a result. + * + * @var array + */ + public $map; + /** * Magic column name used to provide pagination support for SQLServer 2008 * which lacks proper limit/offset support.