Jelix 1.6.37

mysqlDbSchema extends jDbSchema
in package

Tags
subpackage

db_driver

Table of Contents

$conn  : jDbConnection
$supportAutoIncrement  : mixed
$tables  : null|array<string|int, jDbTable>
__construct()  : mixed
_createTable()  : mysqlDbTable
create the given table into the database
_prepareSqlColumn()  : string
return the SQL string corresponding to the given column.
createTable()  : jDbTable
create the given table if it does not exist
dropTable()  : mixed
getConn()  : jDbConnection
getTable()  : jDbTable
load informations of the given
getTables()  : array<string|int, jDbTable>
normalizeColumn()  : mixed
fill correctly some properties of the column, depending of its type and other properties
renameTable()  : jDbTable|null
_createTableQuery()  : mixed
_dropTable()  : mixed
_getTableInstance()  : mixed
_getTables()  : mixed
_renameTable()  : mixed

Properties

$supportAutoIncrement

protected mixed $supportAutoIncrement = rue

$tables

protected null|array<string|int, jDbTable> $tables = ull

key of the array are unprefixed name of tables

Methods

_createTable()

create the given table into the database

public _createTable(string $name, array<string|int, jDbColumn$columns, mixed $primaryKeys[, mixed $attributes = array() ]) : mysqlDbTable
Parameters
$name : string
$columns : array<string|int, jDbColumn>
$primaryKeys : mixed
$attributes : mixed = array()
Return values
mysqlDbTable

_prepareSqlColumn()

return the SQL string corresponding to the given column.

public _prepareSqlColumn(mixed $col[, mixed $isPrimaryKey = false ][, mixed $isSinglePrimaryKey = false ]) : string

private method, should be used only by a jDbTable object

Parameters
$col : mixed

the column

$isPrimaryKey : mixed = false
$isSinglePrimaryKey : mixed = false
Return values
string

the sql string

createTable()

create the given table if it does not exist

public createTable(string $name, array<string|int, jDbColumn$columns, string|array<string|int, string> $primaryKey[, array<string|int, mixed> $attributes = array() ]) : jDbTable
Parameters
$name : string

the unprefixed table name

$columns : array<string|int, jDbColumn>

list of columns

$primaryKey : string|array<string|int, string>

the name of the column which contains the primary key

$attributes : array<string|int, mixed> = array()

some table attributes specific to the database

Return values
jDbTable

the object corresponding to the created table

dropTable()

public dropTable(string|jDbTable $table) : mixed
Parameters
$table : string|jDbTable

the table object or the unprefixed table name

Return values
mixed

getTable()

load informations of the given

public getTable(string $name) : jDbTable
Parameters
$name : string

the unprefixed table name

Return values
jDbTable

ready to make change

normalizeColumn()

fill correctly some properties of the column, depending of its type and other properties

public normalizeColumn(jDbColumn $col) : mixed
Parameters
$col : jDbColumn
Return values
mixed

renameTable()

public renameTable(string $oldName, string $newName) : jDbTable|null
Parameters
$oldName : string

Unprefixed name of the table to rename

$newName : string

The new unprefixed name of the table

Return values
jDbTable|null

_createTableQuery()

protected _createTableQuery(mixed $name, mixed $columns, mixed $primaryKey[, mixed $attributes = array() ]) : mixed
Parameters
$name : mixed
$columns : mixed
$primaryKey : mixed
$attributes : mixed = array()
Return values
mixed

_dropTable()

protected _dropTable(mixed $name) : mixed
Parameters
$name : mixed
Return values
mixed

_getTableInstance()

protected _getTableInstance(mixed $name) : mixed
Parameters
$name : mixed
Return values
mixed

_getTables()

protected _getTables() : mixed
Return values
mixed

_renameTable()

protected _renameTable(mixed $oldName, mixed $newName) : mixed
Parameters
$oldName : mixed
$newName : mixed
Return values
mixed

Search results