Function __global->_helper_generate_index_fields

Definitions

sources/database_helper.php

  • Generate an index field SQL snippet.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$table_name string No No required parameter N/A N/A The table name
$fields array No No required parameter N/A N/A List of fields for the index
$is_full_text boolean No No required parameter N/A N/A Whether the index is a full-text index

Returns

  • The SQL (null: won't create index)
  • Type: ?string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Generate an index field SQL snippet.
 *
 * @param  string $table_name The table name
 * @param  array $fields List of fields for the index
 * @param  boolean $is_full_text Whether the index is a full-text index
 * @return ?string The SQL (null: won't create index)
 */

function _helper_generate_index_fields(string $table_name, array $fields, bool $is_full_text) : ?string