MediaWiki REL1_35
Wikimedia\Rdbms\SchemaBuilder Interface Reference

Interface SchemaBuilder that gets a definition and produces SQL based on RDBMS. More...

Inheritance diagram for Wikimedia\Rdbms\SchemaBuilder:

Public Member Functions

 addTable (array $schema)
 An example of $schema value: [ 'name' => 'actor', 'columns' => [ [ 'actor_id', 'bigint', [ 'Unsigned' => true, 'Notnull' => true ] ], [ 'actor_user', 'integer', [ 'Unsigned' => true ] ], [ 'actor_name', 'string', [ 'Length' => 255, 'Notnull' => true ] ], ], 'indexes' => [ [ 'actor_user', [ 'actor_user' ], 'unique' => true ], [ 'actor_name', [ 'actor_name' ], 'unique' => true ] ], 'pk' => [ 'actor_id' ] ],.
 
 getSql ()
 

Detailed Description

Interface SchemaBuilder that gets a definition and produces SQL based on RDBMS.

@experimental @unstable

Definition at line 11 of file SchemaBuilder.php.

Member Function Documentation

◆ addTable()

Wikimedia\Rdbms\SchemaBuilder::addTable ( array  $schema)

An example of $schema value: [ 'name' => 'actor', 'columns' => [ [ 'actor_id', 'bigint', [ 'Unsigned' => true, 'Notnull' => true ] ], [ 'actor_user', 'integer', [ 'Unsigned' => true ] ], [ 'actor_name', 'string', [ 'Length' => 255, 'Notnull' => true ] ], ], 'indexes' => [ [ 'actor_user', [ 'actor_user' ], 'unique' => true ], [ 'actor_name', [ 'actor_name' ], 'unique' => true ] ], 'pk' => [ 'actor_id' ] ],.

Parameters
array$schema
Returns
void

Implemented in Wikimedia\Rdbms\DoctrineSchemaBuilder.

◆ getSql()

Wikimedia\Rdbms\SchemaBuilder::getSql ( )
Returns
string[] SQLs to run

Implemented in Wikimedia\Rdbms\DoctrineSchemaBuilder.


The documentation for this interface was generated from the following file: