diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-03-21 20:49:01 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-03-21 20:49:01 +0000 |
commit | ff5194c862c796e47e06e0cb45451d6d2710eeaf (patch) | |
tree | 76e795ab8f63ad619411fa380235812759ca42c5 /includes/database/schema.inc | |
parent | edfdffb532b73c5d5e1dfed9517150059675cfa6 (diff) | |
download | brdo-ff5194c862c796e47e06e0cb45451d6d2710eeaf.tar.gz brdo-ff5194c862c796e47e06e0cb45451d6d2710eeaf.tar.bz2 |
- Patch #711682 by aspilicious, sun: fixed style issues.
Diffstat (limited to 'includes/database/schema.inc')
-rw-r--r-- | includes/database/schema.inc | 44 |
1 files changed, 30 insertions, 14 deletions
diff --git a/includes/database/schema.inc b/includes/database/schema.inc index c2a157d00..096124532 100644 --- a/includes/database/schema.inc +++ b/includes/database/schema.inc @@ -24,7 +24,6 @@ * the module defines. * * The following keys are defined: - * * - 'description': A string in non-markup plain text describing this table * and its purpose. References to other tables should be enclosed in * curly-brackets. For example, the node_revisions table @@ -33,7 +32,6 @@ * - 'fields': An associative array ('fieldname' => specification) * that describes the table's database columns. The specification * is also an array. The following specification parameters are defined: - * * - 'description': A string in non-markup plain text describing this field * and its purpose. References to other tables should be enclosed in * curly-brackets. For example, the node table vid field @@ -52,7 +50,6 @@ * datatypes will be used (e.g. on MySQL, TINYINT vs. INT vs. BIGINT). * 'normal', the default, selects the base type (e.g. on MySQL, * INT, VARCHAR, BLOB, etc.). - * * Not all sizes are available for all data types. See * DatabaseSchema::getFieldTypeMap() for possible combinations. * - 'not null': If true, no NULL values will be allowed in this @@ -71,10 +68,8 @@ * the precision (total number of significant digits) and scale * (decimal digits right of the decimal point). Both values are * mandatory. Ignored for other field types. - * * All parameters apart from 'type' are optional except that type * 'numeric' columns must specify 'precision' and 'scale'. - * * - 'primary key': An array of one or more key column specifiers (see below) * that form the primary key. * - 'unique keys': An associative array of unique keys ('keyname' => @@ -183,6 +178,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The name of the table to explode. * @param $operator * The operator to apply on the 'table' part of the condition. + * * @return QueryConditionInterface * A DatabaseCondition object. */ @@ -209,6 +205,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * * @param $table * The name of the table in drupal (no prefixing). + * * @return * TRUE if the given table exists, otherwise FALSE. */ @@ -229,6 +226,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * @param $table_expression * An SQL expression, for example "simpletest%" (without the quotes). * BEWARE: this is not prefixed, the caller should take care of that. + * * @return * Array, both the keys and the values are the matching tables. */ @@ -250,6 +248,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The name of the table in drupal (no prefixing). * @param $name * The name of the column. + * * @return * TRUE if the given column exists, otherwise FALSE. */ @@ -266,15 +265,15 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { } /** - * Returns a mapping of Drupal schema field names to DB-native field types. - * - * Because different field types do not map 1:1 between databases, Drupal has - * its own normalized field type names. This function returns a driver-specific - * mapping table from Drupal names to the native names for each database. - * - * @return array - * An array of Schema API field types to driver-specific field types. - */ + * Returns a mapping of Drupal schema field names to DB-native field types. + * + * Because different field types do not map 1:1 between databases, Drupal has + * its own normalized field type names. This function returns a driver-specific + * mapping table from Drupal names to the native names for each database. + * + * @return array + * An array of Schema API field types to driver-specific field types. + */ abstract public function getFieldTypeMap(); /** @@ -284,6 +283,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The table to be renamed. * @param $new_name * The new name for the table. + * * @throws DatabaseSchemaObjectDoesNotExistException * If the specified table doesn't exist. * @throws DatabaseSchemaObjectExistsException @@ -296,6 +296,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * * @param $table * The table to be dropped. + * * @return * TRUE if the table was successfully dropped, FALSE if there was no table * by that name to begin with. @@ -322,6 +323,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * adding a type 'serial' field, you MUST specify at least one key * or index including it in this array. See db_change_field() for more * explanation why. + * * @throws DatabaseSchemaObjectDoesNotExistException * If the specified table doesn't exist. * @throws DatabaseSchemaObjectExistsException @@ -336,6 +338,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The table to be altered. * @param $field * The field to be dropped. + * * @return * TRUE if the field was successfully dropped, FALSE if there was no field * by that name to begin with. @@ -351,6 +354,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The field to be altered. * @param $default * Default value to be set. NULL for 'default NULL'. + * * @throws DatabaseSchemaObjectDoesNotExistException * If the specified table or field doesn't exist. */ @@ -363,6 +367,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The table to be altered. * @param $field * The field to be altered. + * * @throws DatabaseSchemaObjectDoesNotExistException * If the specified table or field doesn't exist. */ @@ -375,6 +380,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The name of the table in drupal (no prefixing). * @param $name * The name of the index in drupal (no prefixing). + * * @return * TRUE if the given index exists, otherwise FALSE. */ @@ -387,6 +393,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The table to be altered. * @param $fields * Fields for the primary key. + * * @throws DatabaseSchemaObjectDoesNotExistException * If the specified table doesn't exist. * @throws DatabaseSchemaObjectExistsException @@ -399,6 +406,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * * @param $table * The table to be altered. + * * @return * TRUE if the primary key was successfully dropped, FALSE if there was no * primary key on this table to begin with. @@ -414,6 +422,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The name of the key. * @param $fields * An array of field names. + * * @throws DatabaseSchemaObjectDoesNotExistException * If the specified table doesn't exist. * @throws DatabaseSchemaObjectExistsException @@ -428,6 +437,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The table to be altered. * @param $name * The name of the key. + * * @return * TRUE if the key was successfully dropped, FALSE if there was no key by * that name to begin with. @@ -443,6 +453,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The name of the index. * @param $fields * An array of field names. + * * @throws DatabaseSchemaObjectDoesNotExistException * If the specified table doesn't exist. * @throws DatabaseSchemaObjectExistsException @@ -457,6 +468,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The table to be altered. * @param $name * The name of the index. + * * @return * TRUE if the index was successfully dropped, FALSE if there was no index * by that name to begin with. @@ -522,6 +534,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * Optional keys and indexes specification to be created on the * table along with changing the field. The format is the same as a * table specification but without the 'fields' element. + * * @throws DatabaseSchemaObjectDoesNotExistException * If the specified table or source field doesn't exist. * @throws DatabaseSchemaObjectExistsException @@ -536,6 +549,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The name of the table to create. * @param $table * A Schema API table definition array. + * * @throws DatabaseSchemaObjectExistsException * If the specified table already exists. */ @@ -557,6 +571,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * * @param $fields * An array of key/index column specifiers. + * * @return * An array of field names. */ @@ -580,6 +595,7 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { * The comment string to prepare. * @param $length * Optional upper limit on the returned string length. + * * @return * The prepared comment. */ |