Function Database_Static_ibm->alter_table_field__sql

Definitions

sources/database/ibm.php

  • Get SQL for changing the type of a DB field in a table.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$table_name ID_TEXT No No required parameter N/A N/A The table name
$name ID_TEXT No No required parameter N/A N/A The field name
$db_type ID_TEXT No No required parameter N/A N/A The new field type
$may_be_null boolean No No required parameter N/A N/A If the field may be null
&$is_autoincrement ?boolean Yes No required parameter N/A N/A Whether it is an autoincrement field (null: could not set it, returned by reference)
$new_name ID_TEXT No No required parameter N/A N/A The new field name

Returns

  • List of SQL queries to run
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get SQL for changing the type of a DB field in a table.
 *
 * @param  ID_TEXT $table_name The table name
 * @param  ID_TEXT $name The field name
 * @param  ID_TEXT $db_type The new field type
 * @param  boolean $may_be_null If the field may be null
 * @param  ?boolean $is_autoincrement Whether it is an autoincrement field (null: could not set it, returned by reference)
 * @param  ID_TEXT $new_name The new field name
 * @return array List of SQL queries to run
 */

public function alter_table_field__sql(string $table_name, string $name, string $db_type, bool $may_be_null, ?bool &$is_autoincrement, string $new_name) : array