_db_process_field

  1. drupal
    1. drupal6 database.mysql-common.inc
    2. drupal6
Versionen
drupal6 _db_process_field($field)

Set database-engine specific properties for a field.

Übergabeparameter

$field A field description array, as specified in the schema documentation.

Verwandte Themen

▾ 5 functions call _db_process_field()

db_add_field in includes/database.pgsql.inc
Add a new field to a table.
db_add_field in includes/database.mysql-common.inc
Add a new field to a table.
db_change_field in includes/database.mysql-common.inc
db_create_table_sql in includes/database.pgsql.inc
Generate SQL to create a new table from a Drupal schema definition.
db_create_table_sql in includes/database.mysql-common.inc
Generate SQL to create a new table from a Drupal schema definition.

Code

includes/database.pgsql.inc, line 564

<?php
function _db_process_field($field) {
  if (!isset($field['size'])) {
    $field['size'] = 'normal';
  }
  // Set the correct database-engine specific datatype.
  if (!isset($field['pgsql_type'])) {
    $map = db_type_map();
    $field['pgsql_type'] = $map[$field['type'] . ':' . $field['size']];
  }
  if ($field['type'] == 'serial') {
    unset($field['not null']);
  }
  return $field;
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen