PHP Класс Gdn_MySQLStructure, vanilla

Наследование: extends Gdn_DatabaseStructure
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( null $Database = null )
drop ( ) Drops $this->Table() from the database.
dropColumn ( string $Name ) : boolean Drops $Name column from $this->Table().
engine ( $Engine, boolean $CheckAvailability = true )
getRowCountEstimate ( string $tableName ) : integer | null Get the estimated number of rows in a table.
hasEngine ( $Engine ) : boolean
indexSqlDb ( ) : array
renameColumn ( string $OldName, string $NewName, string $TableName = '' ) : boolean Renames a column in $this->Table().
renameTable ( string $OldName, string $NewName, boolean $UsePrefix = false ) : boolean Renames a table in the database.
view ( string $Name, $SQL ) Specifies the name of the view to create or modify.

Защищенные методы

Метод Описание
_create ( ) Creates the table defined with $this->Table() and $this->Column().
_defineColumn ( stdClass $column, string $newColumnName = null )
_indexSql ( $Columns, boolean $KeyType = false ) : array
_indexSqlDb ( ) : array
_modify ( boolean $Explicit = false ) Modifies $this->Table() with the columns specified with $this->Column().
_quoteValue ( $Value ) : string
_supportsFulltext ( ) : boolean
getCharsetFromCollation ( string $collation ) : string Get the character set for a collation.
getTableInfo ( string $tableName ) : array? Get the high-level table information for a given table.

Описание методов

__construct() публичный Метод

public __construct ( null $Database = null )
$Database null

_create() защищенный Метод

Creates the table defined with $this->Table() and $this->Column().
protected _create ( )

_defineColumn() защищенный Метод

protected _defineColumn ( stdClass $column, string $newColumnName = null )
$column stdClass
$newColumnName string For rename action only.

_indexSql() защищенный Метод

protected _indexSql ( $Columns, boolean $KeyType = false ) : array
$Columns
$KeyType boolean
Результат array

_indexSqlDb() защищенный Метод

protected _indexSqlDb ( ) : array
Результат array

_modify() защищенный Метод

Modifies $this->Table() with the columns specified with $this->Column().
protected _modify ( boolean $Explicit = false )
$Explicit boolean If TRUE, this method will remove any columns from the table that were not defined with $this->Column().

_quoteValue() защищенный статический Метод

protected static _quoteValue ( $Value ) : string
$Value
Результат string

_supportsFulltext() защищенный Метод

protected _supportsFulltext ( ) : boolean
Результат boolean

drop() публичный Метод

Drops $this->Table() from the database.
public drop ( )

dropColumn() публичный Метод

Drops $Name column from $this->Table().
public dropColumn ( string $Name ) : boolean
$Name string The name of the column to drop from $this->Table().
Результат boolean

engine() публичный Метод

public engine ( $Engine, boolean $CheckAvailability = true )
$Engine
$CheckAvailability boolean

getCharsetFromCollation() защищенный Метод

Get the character set for a collation.
protected getCharsetFromCollation ( string $collation ) : string
$collation string The name of the collation.
Результат string Returns the name of the character set or an empty string if the collation was not found.

getRowCountEstimate() публичный Метод

Get the estimated number of rows in a table.
public getRowCountEstimate ( string $tableName ) : integer | null
$tableName string The name of the table to look up, without its prefix.
Результат integer | null Returns the estimated number of rows or **null** if the information doesn't exist.

getTableInfo() защищенный Метод

Get the high-level table information for a given table.
protected getTableInfo ( string $tableName ) : array?
$tableName string The name of the table to get the information for.
Результат array?

hasEngine() публичный Метод

public hasEngine ( $Engine ) : boolean
$Engine
Результат boolean

indexSqlDb() публичный Метод

public indexSqlDb ( ) : array
Результат array

renameColumn() публичный Метод

Renames a column in $this->Table().
public renameColumn ( string $OldName, string $NewName, string $TableName = '' ) : boolean
$OldName string The name of the column to be renamed.
$NewName string The new name for the column being renamed.
$TableName string
Результат boolean

renameTable() публичный Метод

Renames a table in the database.
public renameTable ( string $OldName, string $NewName, boolean $UsePrefix = false ) : boolean
$OldName string The name of the table to be renamed.
$NewName string The new name for the table being renamed.
$UsePrefix boolean A boolean value indicating if $this->_DatabasePrefix should be prefixed before $OldName and $NewName.
Результат boolean

view() публичный Метод

Specifies the name of the view to create or modify.
public view ( string $Name, $SQL )
$Name string The name of the view.