Jelix 1.8.13

ociDbSchema extends jDbSchema
in package

Tags
subpackage

db_driver

Table of Contents

$conn  : jDbConnection
$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()  : null|jDbTable
_createTable()  : jDbTable
create the given table into the database.
_createTableQuery()  : mixed
_dropTable()  : mixed
_getAutoIncrementKeyWord()  : mixed
_getTableInstance()  : mixed
_getTables()  : mixed
_renameTable()  : mixed

Properties

$tables

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

key of the array are unprefixed name of tables

Tags

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
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

Tags
Return values
jDbTable

the object corresponding to the created table

dropTable()

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

the table object or the unprefixed table name

Tags
Return values
mixed

getTable()

load informations of the given.

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

the unprefixed table name

Tags
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
Tags
Return values
mixed

renameTable()

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

Unprefixed name of the table to rename

$newName : string

The new unprefixed name of the table

Tags
Return values
null|jDbTable

_createTable()

create the given table into the database.

protected _createTable(mixed $name, mixed $columns, mixed $primaryKeys[, mixed $attributes = array() ]) : jDbTable
Parameters
$name : mixed

the table name

$columns : mixed
$primaryKeys : mixed
$attributes : mixed = array()
Tags
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()
Tags
Return values
mixed

_dropTable()

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

_getAutoIncrementKeyWord()

protected _getAutoIncrementKeyWord(jDbColumn $col, mixed $isPrimaryKey, mixed $isSinglePrimaryKey) : mixed
Parameters
$col : jDbColumn

the column

$isPrimaryKey : mixed
$isSinglePrimaryKey : mixed
Tags
Return values
mixed

_getTableInstance()

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

_getTables()

protected _getTables() : mixed
Tags
Return values
mixed

_renameTable()

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

Search results