Overview

Namespaces

  • Alchemy
    • core
      • query
      • schema
    • dialect
    • engine
    • orm
    • tests
    • util
      • promise
  • PHP

Classes

  • Column
  • Foreign
  • ForeignKey
  • Index
  • Table
  • TableElement
  • Overview
  • Namespace
  • Class
  • Tree

Class Column

Abstract base class for representing a column in SQL

Alchemy\core\Element implements Alchemy\core\IElement
Extended by Alchemy\core\schema\TableElement
Extended by Alchemy\core\schema\Column implements Alchemy\util\promise\IPromisable

Direct known subclasses

Alchemy\core\schema\Foreign
Namespace: Alchemy\core\schema
Located at alchemy/core/schema/Column.php
Methods summary
public static Alchemy\core\schema\Column
# find( string $column, Alchemy\core\schema\Table $self = null )

Retrieve the column for a reference like 'Table.Column', or 'self.Column' if a $self table is provided.

Retrieve the column for a reference like 'Table.Column', or 'self.Column' if a $self table is provided.

Parameters

$column
string
$column column reference
$self
Alchemy\core\schema\Table
$self table to use for relative references (optional)

Returns

Alchemy\core\schema\Column
public static array(method_name
# list_promisable_methods( )

Returns an array mapping promisable methods to return types. A promisable method is one that is dependent only on immutable inputs and is guaranteed to return an instance of a certain type.

Returns an array mapping promisable methods to return types. A promisable method is one that is dependent only on immutable inputs and is guaranteed to return an instance of a certain type.

Returns

array(method_name
=> class_name, ...)

Implementation of

Alchemy\util\promise\IPromisable::list_promisable_methods()
public string
# decode( mixed $value )

Decode a value from the RDBMS into a PHP value

Decode a value from the RDBMS into a PHP value

Parameters

$value
mixed
$value

Returns

string
public Scalar
# encode( mixed $value )

Encode a PHP value into something usable for the RDBMS.

Encode a PHP value into something usable for the RDBMS.

Parameters

$value
mixed
$value

Returns

Scalar
public Alchemy\core\schema\ForeignKey
# getForeignKey( )

Get the ForeignKey constraint, if applicable, on this Column.

Get the ForeignKey constraint, if applicable, on this Column.

Returns

Alchemy\core\schema\ForeignKey
public Alchemy\core\schema\Index
# getIndex( )

Get the Index, if applicable, on this Column.

Get the Index, if applicable, on this Column.

Returns

Alchemy\core\schema\Index
public
# getArg( mixed $arg )
public Alchemy\core\query\ColumnRef
# getRef( Alchemy\core\query\TableRef $table = null )

Return a reference to this column

Return a reference to this column

Parameters

$table
Alchemy\core\query\TableRef
$table TableRef to build on, else create a new one

Returns

Alchemy\core\query\ColumnRef
public boolean
# isNullable( )

Return true if this column can be null

Return true if this column can be null

Returns

boolean
public boolean
# isPrimaryKeyPart( )

Return true if this column is part of the primary key

Return true if this column is part of the primary key

Returns

boolean
Methods inherited from Alchemy\core\schema\TableElement
__construct(), copy(), getName(), getTable()
Methods inherited from Alchemy\core\Element
__callStatic(), __clone(), addTag(), addTags(), define(), define_alias(), getDescription(), getID(), getTag(), getType(), get_definition(), listTags(), normalize_arg()
Properties inherited from Alchemy\core\schema\TableElement
$args, $name, $table
Properties inherited from Alchemy\core\Element
$id, $tags, $type
API documentation generated by ApiGen 2.8.0