rex_sql_foreign_key
in package
Class to represent sql foreign keys.
Tags
Table of Contents
Constants
Methods
- __construct() : mixed
- equals() : bool
- getColumns() : array<string, string>
- getName() : string
- getOnDelete() : self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL
- getOnUpdate() : self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL
- getTable() : string
- isModified() : bool
- setColumns() : $this
- setModified() : $this
- setName() : $this
- setOnDelete() : $this
- setOnUpdate() : $this
- setTable() : $this
Constants
CASCADE
public
mixed
CASCADE
= 'CASCADE'
NO_ACTION
public
mixed
NO_ACTION
= 'NO ACTION'
RESTRICT
public
mixed
RESTRICT
= 'RESTRICT'
SET_NULL
public
mixed
SET_NULL
= 'SET NULL'
Methods
__construct()
public
__construct(string $name, string $table, array<string, string> $columns[, self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL $onUpdate = self::RESTRICT ][, self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL $onDelete = self::RESTRICT ]) : mixed
Parameters
- $name : string
- $table : string
- $columns : array<string, string>
-
Mapping of locale column to column in foreign table
- $onUpdate : self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL = self::RESTRICT
- $onDelete : self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL = self::RESTRICT
equals()
public
equals(self $index) : bool
Parameters
- $index : self
Return values
boolgetColumns()
public
getColumns() : array<string, string>
Return values
array<string, string>getName()
public
getName() : string
Return values
stringgetOnDelete()
public
getOnDelete() : self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL
Return values
self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULLgetOnUpdate()
public
getOnUpdate() : self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL
Return values
self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULLgetTable()
public
getTable() : string
Return values
stringisModified()
public
isModified() : bool
Return values
boolsetColumns()
public
setColumns(array<string, string> $columns) : $this
Parameters
- $columns : array<string, string>
-
Mapping of locale column to column in foreign table
Return values
$thissetModified()
public
setModified(bool $modified) : $this
Parameters
- $modified : bool
Return values
$thissetName()
public
setName(string $name) : $this
Parameters
- $name : string
Return values
$thissetOnDelete()
public
setOnDelete(self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL $onDelete) : $this
Parameters
- $onDelete : self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL
Return values
$thissetOnUpdate()
public
setOnUpdate(self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL $onUpdate) : $this
Parameters
- $onUpdate : self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL
Return values
$thissetTable()
public
setTable(string $table) : $this
Parameters
- $table : string