[ Index ]

PHP Cross Reference of phpBB-3.3.3-deutsch

title

Body

[close]

/phpbb/db/tools/ -> tools.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 1879 lines (50 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

tools:: (28 methods):
  get_dbms_type_map()
  __construct()
  set_return_statements()
  sql_list_tables()
  sql_table_exists()
  sql_create_table()
  perform_schema_changes()
  sql_list_columns()
  sql_column_exists()
  sql_index_exists()
  sql_unique_index_exists()
  _sql_run_sql()
  sql_prepare_column_data()
  get_column_type()
  sql_column_add()
  sql_column_remove()
  sql_index_drop()
  sql_table_drop()
  sql_create_primary_key()
  sql_create_unique_index()
  sql_create_index()
  check_index_name_length()
  get_max_index_name_length()
  sql_list_index()
  strip_table_name_from_index_name()
  sql_column_change()
  get_existing_indexes()
  sqlite_get_recreate_table_queries()


Class: tools  - X-Ref

Database Tools for handling cross-db actions such as altering columns, etc.
Currently not supported is returning SQL for creating tables.

get_dbms_type_map()   X-Ref
Get the column types for every database we support

return: array

__construct(\phpbb\db\driver\driver_interface $db, $return_statements = false)   X-Ref
Constructor. Set DB Object and set {@link $return_statements return_statements}.

param: \phpbb\db\driver\driver_interface    $db                    Database connection
param: bool        $return_statements    True if only statements should be returned and no SQL being executed

set_return_statements($return_statements)   X-Ref
Setter for {@link $return_statements return_statements}.

return: null
param: bool $return_statements True if SQL should not be executed but returned as strings

sql_list_tables()   X-Ref
{@inheritDoc}


sql_table_exists($table_name)   X-Ref
{@inheritDoc}


sql_create_table($table_name, $table_data)   X-Ref
{@inheritDoc}


perform_schema_changes($schema_changes)   X-Ref
{@inheritDoc}


sql_list_columns($table_name)   X-Ref
{@inheritDoc}


sql_column_exists($table_name, $column_name)   X-Ref
{@inheritDoc}


sql_index_exists($table_name, $index_name)   X-Ref
{@inheritDoc}


sql_unique_index_exists($table_name, $index_name)   X-Ref
{@inheritDoc}


_sql_run_sql($statements)   X-Ref
Private method for performing sql statements (either execute them or return them)


sql_prepare_column_data($table_name, $column_name, $column_data)   X-Ref
Function to prepare some column information for better usage


get_column_type($column_map_type)   X-Ref
Get the column's database type from the type map

return: array        column type for this database
param: string $column_map_type

sql_column_add($table_name, $column_name, $column_data, $inline = false)   X-Ref
{@inheritDoc}


sql_column_remove($table_name, $column_name, $inline = false)   X-Ref
{@inheritDoc}


sql_index_drop($table_name, $index_name)   X-Ref
{@inheritDoc}


sql_table_drop($table_name)   X-Ref
{@inheritDoc}


sql_create_primary_key($table_name, $column, $inline = false)   X-Ref
{@inheritDoc}


sql_create_unique_index($table_name, $index_name, $column)   X-Ref
{@inheritDoc}


sql_create_index($table_name, $index_name, $column)   X-Ref
{@inheritDoc}


check_index_name_length($table_name, $index_name, $throw_error = true)   X-Ref
Check whether the index name is too long

return: string    The index name, shortened if too long
param: string $table_name
param: string $index_name
param: bool $throw_error

get_max_index_name_length()   X-Ref
Get maximum index name length. Might vary depending on db type

return: int Maximum index name length

sql_list_index($table_name)   X-Ref
{@inheritDoc}


strip_table_name_from_index_name($table_name, $index_name)   X-Ref
Removes table_name from the index_name if it is at the beginning

return: string
param: $table_name
param: $index_name

sql_column_change($table_name, $column_name, $column_data, $inline = false)   X-Ref
{@inheritDoc}


get_existing_indexes($table_name, $column_name, $unique = false)   X-Ref
Get a list with existing indexes for the column

return: array        Array with Index name => columns
param: string $table_name
param: string $column_name
param: bool $unique Should we get unique indexes or normal ones

sqlite_get_recreate_table_queries($table_name, $remove_column = '')   X-Ref
Returns the Queries which are required to recreate a table including indexes

return: array
param: string $table_name
param: string $remove_column    When we drop a column, we remove the column



Generated: Sun Feb 14 20:08:31 2021 Cross-referenced by PHPXref 0.7.1