fieldSetDefault

  1. drupal
    1. drupal7
Versionen
drupal7 public DatabaseSchema_sqlite::fieldSetDefault(&$ret, $table, $field, $default)

Set the default value for a field.

This implementation can't use ALTER TABLE directly, because SQLite only supports a limited subset of that command.

Übergabeparameter

$ret Array to which query results will be added.

$table The table to be altered.

$field The field to be altered.

$default Default value to be set. NULL for 'default NULL'.

Verwandte Themen

Code

includes/database/sqlite/schema.inc, line 533

<?php
public function fieldSetDefault(&$ret, $table, $field, $default) {
  $new_schema = $this->introspectSchema($table);
  $new_schema['fields'][$field]['default'] = $default;
  $this->alterTable($ret, $table, $new_schema);
}
?>

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