jDbTable

package

jelix

Methods

__construct

__construct(string $name, \jDbSchema $schema) 

Arguments

$name

string

the table name

$schema

\jDbSchema

_addColumn

_addColumn(\jDbColumn $new) 
abstract

Arguments

$new

\jDbColumn

_alterColumn

_alterColumn(\jDbColumn $old, \jDbColumn $new) 
abstract

Arguments

$old

\jDbColumn

$new

\jDbColumn

_createConstraint

_createConstraint(\jDbConstraint $constraint) 
abstract

Arguments

$constraint

\jDbConstraint

_createIndex

_createIndex(\jDbIndex $index) 
abstract

Arguments

$index

\jDbIndex

_dropColumn

_dropColumn(\jDbColumn $col) 

Arguments

$col

\jDbColumn

_dropConstraint

_dropConstraint(\jDbConstraint $constraint) 
abstract

Arguments

$constraint

\jDbConstraint

_dropIndex

_dropIndex(\jDbIndex $index) 
abstract

Arguments

$index

\jDbIndex

_loadColumns

_loadColumns() 
abstract

_loadIndexesAndKeys

_loadIndexesAndKeys() 
abstract

_loadReferences

_loadReferences() 
abstract

_loadTableDefinition

_loadTableDefinition() 

_replaceConstraint

_replaceConstraint(\jDbConstraint $oldConstraint, \jDbConstraint $newConstraint) 

Arguments

$oldConstraint

\jDbConstraint

$newConstraint

\jDbConstraint

addColumn

addColumn(\jDbColumn $column) 

Arguments

$column

\jDbColumn

addIndex

addIndex(\jDbIndex $index) 

Arguments

$index

\jDbIndex

addReference

addReference(\jDbReference $reference) 

Arguments

$reference

\jDbReference

addUniqueKey

addUniqueKey(\jDbUniqueKey $key) 

Arguments

alterColumn

alterColumn(\jDbColumn $column,  $oldName = '') 

Arguments

$column

\jDbColumn

$oldName

alterIndex

alterIndex(\jDbIndex $index) 

Arguments

$index

\jDbIndex

alterReference

alterReference(\jDbReference $reference) 

Arguments

$reference

\jDbReference

alterUniqueKey

alterUniqueKey(\jDbUniqueKey $key) 

Arguments

dropColumn

dropColumn( $name) 

Arguments

$name

dropIndex

dropIndex( $indexName) 

Arguments

$indexName

dropPrimaryKey

dropPrimaryKey() 

dropReference

dropReference( $refName) 

Arguments

$refName

dropUniqueKey

dropUniqueKey( $indexName) 

Arguments

$indexName

getColumn

getColumn( $name,  $forChange = false) 

Arguments

$name

$forChange

getColumns

getColumns() : array<mixed,\jDbColumn>

Response

array<mixed,\jDbColumn>

getIndex

getIndex( $name) : \jDbIndex|null

Arguments

$name

Response

\jDbIndex|null

getIndexes

getIndexes() : array<mixed,\jDbIndex>

Response

array<mixed,\jDbIndex>

getName

getName() 

getPrimaryKey

getPrimaryKey() : \jDbPrimaryKey|false

Response

\jDbPrimaryKey|false

false if there is no primary key

getReference

getReference( $refName) : \jDbReference|null

Arguments

$refName

Response

\jDbReference|null

getReferences

getReferences() : array<mixed,\jDbReference>

Response

array<mixed,\jDbReference>

getUniqueKey

getUniqueKey( $name) : \jDbUniqueKey|null

Arguments

$name

Response

\jDbUniqueKey|null

getUniqueKeys

getUniqueKeys() : array<mixed,\jDbUniqueKey>

Response

array<mixed,\jDbUniqueKey>

setPrimaryKey

setPrimaryKey(\jDbPrimaryKey $key) 

Arguments

Properties

the name of the table

name : string
var

the name of the table

Type(s)

string

the schema which holds the table

schema : \jDbSchema
var

the schema which holds the table

Type(s)

\jDbSchema

null means "columns are not loaded"

columns : \jDbColumn[].
var

null means "columns are not loaded"

Type(s)

\jDbColumn[].

the primary key. null means "primary key is not loaded". false means : no primary key

primaryKey : \jDbPrimaryKey
var

the primary key. null means "primary key is not loaded". false means : no primary key

Type(s)

\jDbPrimaryKey

list unique keys. null means "unique key are not loaded"

uniqueKeys : array<mixed,\jDbUniqueKey>
var

list unique keys. null means "unique key are not loaded"

Type(s)

array<mixed,\jDbUniqueKey>

list of indexes. null means "indexes are not loaded"

indexes : array<mixed,\jDbIndex>
var

list of indexes. null means "indexes are not loaded"

Type(s)

array<mixed,\jDbIndex>

list of references. null means "references are not loaded"

references : array<mixed,\jDbReference>
var

list of references. null means "references are not loaded"

Type(s)

array<mixed,\jDbReference>