Function __global->_check_sizes

Definitions

sources/database_helper.php

  • Check a set of fields aren't going to exceed key limits.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: bool

Parameters

Name Type Default Set Range Description
$table_name ID_TEXT required parameter N/A N/A The table name
$primary_key boolean required parameter N/A N/A Whether this will be in a primary key
$fields array required parameter N/A N/A The fields (a map between field name and field type [field type must start '*' if it is to be counted])
$id_name ID_TEXT required parameter N/A N/A The name of what we are checking (only used to generate clear error messages)
$skip_size_check boolean False N/A N/A Whether to skip the size check for the table (only do this for addon modules that don't need to support anything other than MySQL)
$skip_null_check boolean False N/A N/A Whether to skip the check for NULL string fields
$save_bytes ?boolean False N/A N/A Whether to use lower-byte table storage, with trade-offs of not being able to support all unicode characters; use this if key length is an issue (null: autodetect)
$return_on_error boolean False N/A N/A Whether to return on errors

Return

  • Whether the size limit is not exceeded
  • Type: boolean
  • Set: N/A
  • Range: N/A