MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
Referência à classe AbstractSchemaManager
Diagrama de heranças da classe AbstractSchemaManager
DB2SchemaManager MsSqlSchemaManager MySqlSchemaManager OracleSchemaManager PostgreSqlSchemaManager SqliteSchemaManager

Membros públicos

 __construct (\Doctrine\DBAL\Connection $conn)
 
 getDatabasePlatform ()
 
 tryMethod ()
 
 listDatabases ()
 
 listSequences ($database=null)
 
 listTableColumns ($table)
 
 listTableIndexes ($table)
 
 tablesExist ($tableNames)
 
 listTableNames ()
 
 listTables ()
 
 listTableDetails ($tableName)
 
 listViews ()
 
 listTableForeignKeys ($table, $database=null)
 
 dropDatabase ($database)
 
 dropTable ($table)
 
 dropIndex ($index, $table)
 
 dropConstraint (Constraint $constraint, $table)
 
 dropForeignKey ($foreignKey, $table)
 
 dropSequence ($name)
 
 dropView ($name)
 
 createDatabase ($database)
 
 createTable (Table $table)
 
 createSequence ($sequence)
 
 createConstraint (Constraint $constraint, $table)
 
 createIndex (Index $index, $table)
 
 createForeignKey (ForeignKeyConstraint $foreignKey, $table)
 
 createView (View $view)
 
 dropAndCreateConstraint (Constraint $constraint, $table)
 
 dropAndCreateIndex (Index $index, $table)
 
 dropAndCreateForeignKey (ForeignKeyConstraint $foreignKey, $table)
 
 dropAndCreateSequence (Sequence $sequence)
 
 dropAndCreateTable (Table $table)
 
 dropAndCreateDatabase ($database)
 
 dropAndCreateView (View $view)
 
 alterTable (TableDiff $tableDiff)
 
 renameTable ($name, $newName)
 
 createSchema ()
 
 createSchemaConfig ()
 

Membros protegidos

 _getPortableDatabasesList ($databases)
 
 _getPortableDatabaseDefinition ($database)
 
 _getPortableFunctionsList ($functions)
 
 _getPortableFunctionDefinition ($function)
 
 _getPortableTriggersList ($triggers)
 
 _getPortableTriggerDefinition ($trigger)
 
 _getPortableSequencesList ($sequences)
 
 _getPortableSequenceDefinition ($sequence)
 
 _getPortableTableColumnList ($tableColumns)
 
 _getPortableTableColumnDefinition ($tableColumn)
 
 _getPortableTableIndexesList ($tableIndexRows, $tableName=null)
 
 _getPortableTablesList ($tables)
 
 _getPortableTableDefinition ($table)
 
 _getPortableUsersList ($users)
 
 _getPortableUserDefinition ($user)
 
 _getPortableViewsList ($views)
 
 _getPortableViewDefinition ($view)
 
 _getPortableTableForeignKeysList ($tableForeignKeys)
 
 _getPortableTableForeignKeyDefinition ($tableForeignKey)
 
 _execSql ($sql)
 

Atributos Protegidos

 $_conn
 
 $_platform
 

Descrição detalhada

Base class for schema managers. Schema managers are used to inspect and/or modify the database schema/structure.

@license http://www.opensource.org/licenses/lgpl-license.php LGPL

Autor
Konsta Vesterinen kvest.nosp@m.eri@.nosp@m.cc.hu.nosp@m.t.fi
Lukas Smith smith.nosp@m.@poo.nosp@m.teewe.nosp@m.et.o.nosp@m.rg (PEAR MDB2 library)
Roman Borschel roman.nosp@m.@cod.nosp@m.e-fac.nosp@m.tory.nosp@m..org
Jonathan H. Wage jonwa.nosp@m.ge@g.nosp@m.mail..nosp@m.com
Benjamin Eberlei konta.nosp@m.kt@b.nosp@m.eberl.nosp@m.ei.d.nosp@m.e
Versão
$Revision$
Desde
2.0

Definido na linha 39 do ficheiro AbstractSchemaManager.php.

Documentação dos Construtores & Destrutor

◆ __construct()

__construct ( \Doctrine\DBAL\Connection $conn)

Constructor. Accepts the Connection instance to manage the schema for

Parâmetros
\Doctrine\DBAL\Connection$conn

Definido na linha 60 do ficheiro AbstractSchemaManager.php.

Documentação das funções

◆ _execSql()

_execSql ( $sql)
protected

Definido na linha 742 do ficheiro AbstractSchemaManager.php.

◆ _getPortableDatabaseDefinition()

_getPortableDatabaseDefinition ( $database)
protected

◆ _getPortableDatabasesList()

_getPortableDatabasesList ( $databases)
protected

Methods for filtering return values of list*() methods to convert the native DBMS data definition to a portable Doctrine definition

Definido na linha 544 do ficheiro AbstractSchemaManager.php.

◆ _getPortableFunctionDefinition()

_getPortableFunctionDefinition ( $function)
protected

Reimplementado em OracleSchemaManager.

Definido na linha 571 do ficheiro AbstractSchemaManager.php.

◆ _getPortableFunctionsList()

_getPortableFunctionsList ( $functions)
protected

Definido na linha 560 do ficheiro AbstractSchemaManager.php.

◆ _getPortableSequenceDefinition()

_getPortableSequenceDefinition ( $sequence)
protected
Parâmetros
array$sequence
Retorna
Sequence

Reimplementado em MySqlSchemaManager, OracleSchemaManager e PostgreSqlSchemaManager.

Definido na linha 607 do ficheiro AbstractSchemaManager.php.

◆ _getPortableSequencesList()

_getPortableSequencesList ( $sequences)
protected

Definido na linha 592 do ficheiro AbstractSchemaManager.php.

◆ _getPortableTableColumnDefinition()

_getPortableTableColumnDefinition ( $tableColumn)
abstractprotected

Get Table Column Definition

Parâmetros
array$tableColumn
Retorna
Column

Reimplementado em DB2SchemaManager, MsSqlSchemaManager, MySqlSchemaManager, OracleSchemaManager, PostgreSqlSchemaManager e SqliteSchemaManager.

◆ _getPortableTableColumnList()

_getPortableTableColumnList ( $tableColumns)
protected

Independent of the database the keys of the column list result are lowercased.

The name of the created column instance however is kept in its case.

Parâmetros
array$tableColumns
Retorna
array

Definido na linha 620 do ficheiro AbstractSchemaManager.php.

◆ _getPortableTableDefinition()

_getPortableTableDefinition ( $table)
protected

◆ _getPortableTableForeignKeyDefinition()

_getPortableTableForeignKeyDefinition ( $tableForeignKey)
protected

◆ _getPortableTableForeignKeysList()

_getPortableTableForeignKeysList ( $tableForeignKeys)
protected

Reimplementado em OracleSchemaManager.

Definido na linha 726 do ficheiro AbstractSchemaManager.php.

◆ _getPortableTableIndexesList()

_getPortableTableIndexesList ( $tableIndexRows,
$tableName = null )
protected

Aggregate and group the index results according to the required data result.

Parâmetros
array$tableIndexRows
string$tableName
Retorna
array

Reimplementado em DB2SchemaManager, MySqlSchemaManager, OracleSchemaManager, PostgreSqlSchemaManager, SqliteSchemaManager e MsSqlSchemaManager.

Definido na linha 647 do ficheiro AbstractSchemaManager.php.

◆ _getPortableTablesList()

_getPortableTablesList ( $tables)
protected

Reimplementado em DB2SchemaManager.

Definido na linha 677 do ficheiro AbstractSchemaManager.php.

◆ _getPortableTriggerDefinition()

_getPortableTriggerDefinition ( $trigger)
protected

Reimplementado em PostgreSqlSchemaManager.

Definido na linha 587 do ficheiro AbstractSchemaManager.php.

◆ _getPortableTriggersList()

_getPortableTriggersList ( $triggers)
protected

Definido na linha 576 do ficheiro AbstractSchemaManager.php.

◆ _getPortableUserDefinition()

_getPortableUserDefinition ( $user)
protected

Reimplementado em MySqlSchemaManager, OracleSchemaManager e PostgreSqlSchemaManager.

Definido na linha 704 do ficheiro AbstractSchemaManager.php.

◆ _getPortableUsersList()

_getPortableUsersList ( $users)
protected

Definido na linha 693 do ficheiro AbstractSchemaManager.php.

◆ _getPortableViewDefinition()

_getPortableViewDefinition ( $view)
protected

◆ _getPortableViewsList()

_getPortableViewsList ( $views)
protected

Definido na linha 709 do ficheiro AbstractSchemaManager.php.

◆ alterTable()

alterTable ( TableDiff $tableDiff)

Alter an existing tables schema

Parâmetros
TableDiff$tableDiff

Definido na linha 516 do ficheiro AbstractSchemaManager.php.

◆ createConstraint()

createConstraint ( Constraint $constraint,
$table )

Create a constraint on a table

Parâmetros
Constraint$constraint
string | Table$table

Definido na linha 387 do ficheiro AbstractSchemaManager.php.

◆ createDatabase()

createDatabase ( $database)

Creates a new database.

Parâmetros
string$databaseThe name of the database to create.

Reimplementado em PostgreSqlSchemaManager, SqliteSchemaManager e OracleSchemaManager.

Definido na linha 353 do ficheiro AbstractSchemaManager.php.

◆ createForeignKey()

createForeignKey ( ForeignKeyConstraint $foreignKey,
$table )

Create a new foreign key

Parâmetros
ForeignKeyConstraint$foreignKeyForeignKey instance
string | Table$tablename of the table on which the foreign key is to be created

Definido na linha 409 do ficheiro AbstractSchemaManager.php.

◆ createIndex()

createIndex ( Index $index,
$table )

Create a new index on a table

Parâmetros
Index$index
string$tablename of the table on which the index is to be created

Definido na linha 398 do ficheiro AbstractSchemaManager.php.

◆ createSchema()

createSchema ( )

Create a schema instance for the current database.

Retorna
Schema

Definido na linha 754 do ficheiro AbstractSchemaManager.php.

◆ createSchemaConfig()

createSchemaConfig ( )

Create the configuration for this schema.

Retorna
SchemaConfig

Definido na linha 770 do ficheiro AbstractSchemaManager.php.

◆ createSequence()

createSequence ( $sequence)

Create a new sequence

Parâmetros
Sequence$sequence
Excepções
Doctrine

DBAL\ConnectionException if something fails at database level

Definido na linha 376 do ficheiro AbstractSchemaManager.php.

◆ createTable()

createTable ( Table $table)

Create a new table.

Parâmetros
Table$table
int$createFlags

Definido na linha 364 do ficheiro AbstractSchemaManager.php.

◆ createView()

createView ( View $view)

Create a new view

Parâmetros
View$view

Definido na linha 419 do ficheiro AbstractSchemaManager.php.

◆ dropAndCreateConstraint()

dropAndCreateConstraint ( Constraint $constraint,
$table )

Drop and create a constraint

Parâmetros
Constraint$constraint
string$table
Veja também
dropConstraint()
createConstraint()

Definido na linha 434 do ficheiro AbstractSchemaManager.php.

◆ dropAndCreateDatabase()

dropAndCreateDatabase ( $database)

Drop and creates a new database.

Parâmetros
string$databaseThe name of the database to create.

Definido na linha 492 do ficheiro AbstractSchemaManager.php.

◆ dropAndCreateForeignKey()

dropAndCreateForeignKey ( ForeignKeyConstraint $foreignKey,
$table )

Drop and create a new foreign key

Parâmetros
ForeignKeyConstraint$foreignKeyassociative array that defines properties of the foreign key to be created.
string | Table$tablename of the table on which the foreign key is to be created

Definido na linha 458 do ficheiro AbstractSchemaManager.php.

◆ dropAndCreateIndex()

dropAndCreateIndex ( Index $index,
$table )

Drop and create a new index on a table

Parâmetros
string | Table$tablename of the table on which the index is to be created
Index$index

Definido na linha 446 do ficheiro AbstractSchemaManager.php.

◆ dropAndCreateSequence()

dropAndCreateSequence ( Sequence $sequence)

Drop and create a new sequence

Parâmetros
Sequence$sequence
Excepções
Doctrine

DBAL\ConnectionException if something fails at database level

Definido na linha 470 do ficheiro AbstractSchemaManager.php.

◆ dropAndCreateTable()

dropAndCreateTable ( Table $table)

Drop and create a new table.

Parâmetros
Table$table

Definido na linha 481 do ficheiro AbstractSchemaManager.php.

◆ dropAndCreateView()

dropAndCreateView ( View $view)

Drop and create a new view

Parâmetros
View$view

Definido na linha 503 do ficheiro AbstractSchemaManager.php.

◆ dropConstraint()

dropConstraint ( Constraint $constraint,
$table )

Drop the constraint from the given table

Parâmetros
Constraint$constraint
string$tableThe name of the table

Definido na linha 308 do ficheiro AbstractSchemaManager.php.

◆ dropDatabase()

dropDatabase ( $database)

Drops a database.

NOTE: You can not drop the database this SchemaManager is currently connected to.

Parâmetros
string$databaseThe name of the database to drop

Reimplementado em PostgreSqlSchemaManager e SqliteSchemaManager.

Definido na linha 272 do ficheiro AbstractSchemaManager.php.

◆ dropForeignKey()

dropForeignKey ( $foreignKey,
$table )

Drops a foreign key from a table.

Parâmetros
ForeignKeyConstraint | string$tableThe name of the table with the foreign key.
Table | string$nameThe name of the foreign key.
Retorna
boolean $result

Definido na linha 320 do ficheiro AbstractSchemaManager.php.

◆ dropIndex()

dropIndex ( $index,
$table )

Drop the index from the given table

Parâmetros
Index | string$indexThe name of the index
string | Table$tableThe name of the table

Definido na linha 293 do ficheiro AbstractSchemaManager.php.

◆ dropSequence()

dropSequence ( $name)

Drops a sequence with a given name.

Parâmetros
string$nameThe name of the sequence to drop.

Definido na linha 330 do ficheiro AbstractSchemaManager.php.

◆ dropTable()

dropTable ( $table)

Drop the given table

Parâmetros
string$tableThe name of the table to drop

Reimplementado em OracleSchemaManager.

Definido na linha 282 do ficheiro AbstractSchemaManager.php.

◆ dropView()

dropView ( $name)

Drop a view

Parâmetros
string$nameThe name of the view
Retorna
boolean $result

Definido na linha 341 do ficheiro AbstractSchemaManager.php.

◆ getDatabasePlatform()

getDatabasePlatform ( )

Return associated platform.

Retorna
\Doctrine\DBAL\Platform\AbstractPlatform

Definido na linha 71 do ficheiro AbstractSchemaManager.php.

◆ listDatabases()

listDatabases ( )

List the available databases for this connection

Retorna
array $databases

Definido na linha 107 do ficheiro AbstractSchemaManager.php.

◆ listSequences()

listSequences ( $database = null)

List the available sequences for this connection

Retorna
Sequence[]

Definido na linha 121 do ficheiro AbstractSchemaManager.php.

◆ listTableColumns()

listTableColumns ( $table)

List the columns for a given table.

In contrast to other libraries and to the old version of Doctrine, this column definition does try to contain the 'primary' field for the reason that it is not portable accross different RDBMS. Use {

Veja também
listTableIndexes($tableName)} to retrieve the primary key of a table. We're a RDBMS specifies more details these are held in the platformDetails array.
Parâmetros
string$tableThe name of the table.
Retorna
Column[]

Definido na linha 146 do ficheiro AbstractSchemaManager.php.

◆ listTableDetails()

listTableDetails ( $tableName)
Parâmetros
string$tableName
Retorna
Table

Definido na linha 220 do ficheiro AbstractSchemaManager.php.

◆ listTableForeignKeys()

listTableForeignKeys ( $table,
$database = null )

List the foreign keys for the given table

Parâmetros
string$tableThe name of the table
Retorna
ForeignKeyConstraint[]

Definido na linha 252 do ficheiro AbstractSchemaManager.php.

◆ listTableIndexes()

listTableIndexes ( $table)

List the indexes for a given table returning an array of Index instances.

Keys of the portable indexes list are all lower-cased.

Parâmetros
string$tableThe name of the table
Retorna
Index[] $tableIndexes

Definido na linha 163 do ficheiro AbstractSchemaManager.php.

◆ listTableNames()

listTableNames ( )

Return a list of all tables in the current database

Retorna
array

Reimplementado em DB2SchemaManager.

Definido na linha 190 do ficheiro AbstractSchemaManager.php.

◆ listTables()

listTables ( )

List the tables for this connection

Retorna
Table[]

Definido na linha 204 do ficheiro AbstractSchemaManager.php.

◆ listViews()

listViews ( )

List the views this connection has

Retorna
View[]

Definido na linha 237 do ficheiro AbstractSchemaManager.php.

◆ renameTable()

renameTable ( $name,
$newName )

Rename a given table to another name

Parâmetros
string$nameThe current name of the table
string$newNameThe new name of the table

Definido na linha 532 do ficheiro AbstractSchemaManager.php.

◆ tablesExist()

tablesExist ( $tableNames)

Return true if all the given tables exist.

Parâmetros
array$tableNames
Retorna
bool

Definido na linha 178 do ficheiro AbstractSchemaManager.php.

◆ tryMethod()

tryMethod ( )

Try any method on the schema manager. Normally a method throws an exception when your DBMS doesn't support it or if an error occurs. This method allows you to try and method on your SchemaManager instance and will return false if it does not work or is not supported.

$result = $sm->tryMethod('dropView', 'view_name');

Retorna
mixed

Definido na linha 88 do ficheiro AbstractSchemaManager.php.

Documentação dos campos e atributos

◆ $_conn

$_conn
protected

Definido na linha 46 do ficheiro AbstractSchemaManager.php.

◆ $_platform

$_platform
protected

Definido na linha 53 do ficheiro AbstractSchemaManager.php.


A documentação para esta classe foi gerada a partir do seguinte ficheiro: