Column class abstract
Framework\Database\Definition\Table\Columns\Column
Class Column.
Extends Framework\Database\Definition\Table\DefinitionPart
Defined in libraries/database/src/Definition/Table/Columns/Column.php
Properties #
- $database
- -
- $type
- -
- $length
- -
- $null
- -
- $uniqueKey
- -
- $primaryKey
- -
- $default
- -
- $check
- -
- $comment
- -
- $first
- -
- $after
- -
$database
protected \Framework\Database\Database $database
$type
protected string $type
$length
protected array $length
$null
protected bool $null = false
$uniqueKey
protected bool $uniqueKey = false
$primaryKey
protected bool $primaryKey = false
$default
protected Closure|string|int|float|bool|null $default
$check
protected Closure $check
$comment
protected ?string $comment
$first
protected bool $first = false
$after
protected ?string $after
Methods #
- __construct()
- Column constructor.
- after()
- -
- check()
- -
- comment()
- -
- default()
- -
- first()
- -
- notNull()
- -
- null()
- -
- primaryKey()
- -
- uniqueKey()
- -
- renderAfter()
- -
- renderCheck()
- -
- renderComment()
- -
- renderDefault()
- -
- renderFirst()
- -
- renderLength()
- -
- renderNull()
- -
- renderPrimaryKey()
- -
- renderType()
- -
- renderTypeAttributes()
- -
- renderUniqueKey()
- -
- sql()
- -
__construct()
public function __construct(\Framework\Database\Database $database, string|int|float|bool|null ...$length)
Column constructor.
Parameters
- \Framework\Database\Database $database
- string|int|float|bool|null $length
after()
public function after(string $column): static
Parameters
- string $column
Returns
static
check()
public function check(Closure $expression): static
Parameters
- Closure $expression
Returns
static
comment()
public function comment(string $comment): static
Parameters
- string $comment
Returns
static
default()
public function default(Closure|string|int|float|bool|null $default): static
Parameters
- Closure|string|int|float|bool|null $default
Returns
static
first()
public function first(): static
Returns
static
notNull()
public function notNull(): static
Returns
static
null()
public function null(): static
Returns
static
primaryKey()
public function primaryKey(): static
Returns
static
uniqueKey()
public function uniqueKey(): static
Returns
static
renderAfter()
protected function renderAfter(): ?string
Returns
?string
renderCheck()
protected function renderCheck(): ?string
Returns
?string
renderComment()
protected function renderComment(): ?string
Returns
?string
renderDefault()
protected function renderDefault(): ?string
Returns
?string
renderFirst()
protected function renderFirst(): ?string
Returns
?string
renderLength()
protected function renderLength(): ?string
Returns
?string
renderNull()
protected function renderNull(): ?string
Returns
?string
renderPrimaryKey()
protected function renderPrimaryKey(): ?string
Returns
?string
renderType()
protected function renderType(): string
Returns
string
renderTypeAttributes()
protected function renderTypeAttributes(): ?string
Returns
?string
renderUniqueKey()
protected function renderUniqueKey(): ?string
Returns
?string
sql()
protected function sql(): string
Returns
string
Inherited methods #
-
__call()fromFramework\Database\Definition\Table\DefinitionPart