PHP Class Gdn_MySQLStructure, vanilla

Inheritance: extends Gdn_DatabaseStructure
Afficher le fichier Open project: vanilla/vanilla

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
_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.

Method Details

__construct() public méthode

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

_create() protected méthode

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

_defineColumn() protected méthode

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

_indexSql() protected méthode

protected _indexSql ( $Columns, boolean $KeyType = false ) : array
$Columns
$KeyType boolean
Résultat array

_indexSqlDb() protected méthode

protected _indexSqlDb ( ) : array
Résultat array

_modify() protected méthode

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 méthode

protected static _quoteValue ( $Value ) : string
$Value
Résultat string

_supportsFulltext() protected méthode

protected _supportsFulltext ( ) : boolean
Résultat boolean

drop() public méthode

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

dropColumn() public méthode

Drops $Name column from $this->Table().
public dropColumn ( string $Name ) : boolean
$Name string The name of the column to drop from $this->Table().
Résultat boolean

engine() public méthode

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

getCharsetFromCollation() protected méthode

Get the character set for a collation.
protected getCharsetFromCollation ( string $collation ) : string
$collation string The name of the collation.
Résultat string Returns the name of the character set or an empty string if the collation was not found.

getRowCountEstimate() public méthode

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.
Résultat integer | null Returns the estimated number of rows or **null** if the information doesn't exist.

getTableInfo() protected méthode

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.
Résultat array?

hasEngine() public méthode

public hasEngine ( $Engine ) : boolean
$Engine
Résultat boolean

indexSqlDb() public méthode

public indexSqlDb ( ) : array
Résultat array

renameColumn() public méthode

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
Résultat boolean

renameTable() public méthode

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.
Résultat boolean

view() public méthode

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