Jelix 1.6.40

mysqliDbSchema extends mysqlDbSchema
in package

Tags
subpackage

db_driver

Table of Contents

$conn  : jDbConnection
$supportAutoIncrement  : mixed
$tables  : null|array<string|int, jDbTable>
__construct()  : mixed
_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
_createTable()  : jDbTable
create the given table into the database
_createTableQuery()  : mixed
_dropTable()  : mixed
_getTableInstance()  : mixed
_getTables()  : mixed
_renameTable()  : mixed

Properties

$tables

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

key of the array are unprefixed name of tables

Methods

_prepareSqlColumn()

return the SQL string corresponding to the given column.

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

private method, should be used only by a jDbTable object

Parameters
$col : jDbColumn

the column

$isPrimaryKey : mixed = false
$isSinglePrimaryKey : mixed = false
Tags
access

private

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

_createTable()

create the given table into the database

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

the table name

$columns : array<string|int, jDbColumn>
$primaryKey : string|array<string|int, mixed>

the name of the column which contains the primary key

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

the object corresponding to the created table

_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 abstract _getTableInstance(mixed $name) : mixed
Parameters
$name : mixed
Return values
mixed

_getTables()

protected abstract _getTables() : mixed
Return values
mixed

_renameTable()

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

Search results