Jelix 1.8.7

sqlite3DbSchema 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.
_createTableFromObject()  : mixed
_createTableQuery()  : mixed
_dropTable()  : mixed
_getAutoIncrementKeyWord()  : mixed
_getTableInstance()  : mixed
_getTables()  : mixed
_renameTable()  : mixed

Properties

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
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(jDbTable|string $table) : mixed
Parameters
$table : jDbTable|string

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) : null|jDbTable
Parameters
$oldName : string

Unprefixed name of the table to rename

$newName : string

The new unprefixed name of the table

Return values
null|jDbTable

_createTable()

create the given table into the database.

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

the table name

$columns : mixed
$primaryKey : mixed

the name of the column which contains the primary key

$attributes : mixed = array()
Return values
jDbTable

the object corresponding to the created table

_createTableFromObject()

protected _createTableFromObject(jDbTable $table, mixed $tmpName, mixed $newColumns, mixed $newPrimaryKey, mixed $newReferences, mixed $newUniqueKeys) : mixed
Parameters
$table : jDbTable
$tmpName : mixed
$newColumns : mixed
$newPrimaryKey : mixed
$newReferences : mixed
$newUniqueKeys : mixed
Return values
mixed

_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

_getAutoIncrementKeyWord()

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

the column

$isPrimaryKey : mixed
$isSinglePrimaryKey : mixed
Return values
mixed

_getTableInstance()

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

_renameTable()

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

Search results