Permalink
Browse files

MDL-30972 Documentation : clarified phpdocs for main public APIs in D…

…ML layer and touched up on some drivers
  • Loading branch information...
1 parent baa5cd8 commit 6df260107cd4ba42ed531c45914aacacf3b1e004 @nebgor nebgor committed Jan 19, 2012
@@ -20,26 +20,35 @@
* Database column information.
*
* @package core
- * @subpackage dml
+ * @category dml
* @copyright 2008 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
- * Detail database field information.
- * Based on ADOFieldObject.
+ * Detailed database field information.
+ *
+ * It is based on the adodb library's ADOFieldObject object.
+ * 'column' does mean 'the field' here.
+ *
+ * @package core
+ * @category database
+ * @copyright 2008 Petr Skoda (http://skodak.org)
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class database_column_info {
/**
- * Name of column - lowercase
+ * Name of column - lowercase.
+ * @var string
*/
public $name;
/**
- * Driver dependent native data type
- * Not standardised - used to find meta_type
+ * Driver dependent native data type.
+ * Not standardised, its used to find meta_type.
+ * @var string
*/
public $type;
@@ -51,13 +60,15 @@ class database_column_info {
* float - digits left from floating point
* boolean - 1
* enums - null
+ * @var int
*/
public $max_length;
/**
* Scale
* float - decimal points
* other - null
+ * @var int
*/
public $scale;
@@ -67,54 +78,63 @@ class database_column_info {
*
* For performance reasons this field is optional!
* You can use DDL sql_generator::getCheckConstraintsFromDB() if needed.
+ * @var string
*/
public $enums;
/**
* True if not null, false otherwise
+ * @var bool
*/
public $not_null;
/**
* True if column is primary key.
* (usually 'id').
+ * @var bool
*/
public $primary_key;
/**
* True if filed autoincrementing
* (usually 'id' only)
+ * @var bool
*/
public $auto_increment;
/**
* True if binary
+ * @var bool
*/
public $binary;
/**
* True if integer unsigned, false if signed.
* Null for other types
+ * @var integer
*/
public $unsigned;
/**
- * True if default value defined
+ * True if the default value is defined.
+ * @var bool
*/
public $has_default;
/**
- * Default value if defined
+ * The default value (if defined).
+ * @var string
*/
public $default_value;
/**
- * True if field values unique, false if not
+ * True if field values are unique, false if not.
+ * @var bool
*/
public $unique;
/**
- * Standardised one character column type, uppercase
+ * Standardised one character column type, uppercased and enumerated as follows:
* R - counter (integer primary key)
* I - integers
* N - numbers (floats)
@@ -124,12 +144,13 @@ class database_column_info {
* L - boolean (1 bit)
* T - timestamp - unsupported
* D - date - unsupported
+ * @var string
*/
public $meta_type;
/**
* Constructor
- * @param $data mixed object or array with properties
+ * @param mixed $data object or array with properties
*/
public function __construct($data) {
foreach ($data as $key=>$value) {
Oops, something went wrong.

0 comments on commit 6df2601

Please sign in to comment.