PHP 클래스 SQLBuilder\Universal\Syntax\Column

또한 보기: http://www.postgresql.org/docs/9.3/interactive/datatype.html MySQL Data Types:
또한 보기: http://dev.mysql.com/doc/refman/5.6/en/data-types.html MySQL Reference reference_definition: REFERENCES tbl_name (index_col_name,...) [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE] [ON DELETE reference_option] [ON UPDATE reference_option] reference_option: RESTRICT | CASCADE | SET NULL | NO ACTION
상속: implements SQLBuilder\ToSqlInterface
파일 보기 프로젝트 열기: c9s/sqlbuilder 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$enum is only used when isa = enum
$isa
$name column name
$notNull Null is set to true by default. (I know MySQL set this as default if you don't specify the not null constraint)
$onUpdate right now this is only for timestamp column
$primary primary
$set is only used when isa = set
$type
$unsigned unsigned

보호된 프로퍼티들

프로퍼티 타입 설명
$attributeTypes array
$attributes array The default attributes for a column.

공개 메소드들

메소드 설명
__call ( $method, $args )
__construct ( $name = NULL, $type = NULL, array $extraAttributes = [] )
__get ( $name )
__get_state ( )
__isset ( $name )
__set ( $name, $value )
__set_state ( array $stash )
autoIncrement ( )
bigint ( $length = NULL )
binary ( $length = NULL )
bit ( $length = 1 )
blob ( )
bool ( )
boolean ( )
buildAutoIncrementClause ( BaseDriver $driver )
buildDefaultClause ( BaseDriver $driver )
buildDefinitionSql ( BaseDriver $driver, SQLBuilder\ArgumentArray $args )
buildDefinitionSqlForModify ( BaseDriver $driver, SQLBuilder\ArgumentArray $args )
buildEnumClause ( BaseDriver $driver )
buildNullClause ( BaseDriver $driver ) ***** Clause builder *****
buildPgSQLDefinitionSql ( BaseDriver $driver, SQLBuilder\ArgumentArray $args )
buildPrimaryKeyClause ( BaseDriver $driver )
buildSetClause ( BaseDriver $driver )
buildTimeZoneClause ( BaseDriver $driver )
buildTypeClause ( BaseDriver $driver )
buildTypeName ( BaseDriver $driver )
buildUniqueClause ( BaseDriver $driver )
buildUnsignedClause ( BaseDriver $driver )
char ( $length )
date ( ) ********************************************** DateTime related types ***********************************************
datetime ( )
decimal ( $length = NULL, $decimals = NULL )
double ( $length = NULL, $decimals = NULL ) PgSQL supports double, real.
enum ( $a )
float ( $length = NULL, $decimals = NULL )
getAttribute ( string $name ) Which should be something like getAttribute($name)
getName ( )
getType ( )
int ( $length = NULL )
integer ( $length = NULL )
isa ( $isa )
longblob ( )
longtext ( )
mediumInt ( $length = NULL )
mediumblob ( )
mediumtext ( )
name ( $name )
notNull ( )
null ( )
nullDefined ( )
numeric ( $length = NULL, $decimals = NULL )
point ( ) POINT type
primary ( $primary = true )
real ( $length = NULL, $decimals = NULL )
serial ( ) serial type
set ( $a )
setAttribute ( $name, $value )
setAttributeStash ( array $attributes )
setAttributes ( array $attributes )
smallInt ( $length = NULL )
text ( )
time ( $timezone = true )
timestamp ( $timezone = true ) mysql timestamp automatic initialization
timezone ( $bool = true )
tinyInt ( $length = NULL )
tinyblob ( )
toSql ( BaseDriver $driver, SQLBuilder\ArgumentArray $args )
type ( $type )
unsigned ( $unsigned = true )
varchar ( $length )
year ( )

보호된 메소드들

메소드 설명
setLengthInfo ( $length, $decimals = NULL ) ******************************************************************* PROTECTED METHODS (internal use) *********************************************************************

메소드 상세

__call() 공개 메소드

public __call ( $method, $args )

__construct() 공개 메소드

public __construct ( $name = NULL, $type = NULL, array $extraAttributes = [] )
$extraAttributes array

__get() 공개 메소드

public __get ( $name )

__get_state() 공개 메소드

public __get_state ( )

__isset() 공개 메소드

public __isset ( $name )

__set() 공개 메소드

public __set ( $name, $value )

__set_state() 공개 정적인 메소드

public static __set_state ( array $stash )
$stash array

autoIncrement() 공개 메소드

public autoIncrement ( )

bigint() 공개 메소드

public bigint ( $length = NULL )

binary() 공개 메소드

public binary ( $length = NULL )

bit() 공개 메소드

public bit ( $length = 1 )

blob() 공개 메소드

public blob ( )

bool() 공개 메소드

public bool ( )

boolean() 공개 메소드

public boolean ( )

buildAutoIncrementClause() 공개 메소드

public buildAutoIncrementClause ( BaseDriver $driver )
$driver SQLBuilder\Driver\BaseDriver

buildDefaultClause() 공개 메소드

public buildDefaultClause ( BaseDriver $driver )
$driver SQLBuilder\Driver\BaseDriver

buildDefinitionSql() 공개 메소드

public buildDefinitionSql ( BaseDriver $driver, SQLBuilder\ArgumentArray $args )
$driver SQLBuilder\Driver\BaseDriver
$args SQLBuilder\ArgumentArray

buildDefinitionSqlForModify() 공개 메소드

public buildDefinitionSqlForModify ( BaseDriver $driver, SQLBuilder\ArgumentArray $args )
$driver SQLBuilder\Driver\BaseDriver
$args SQLBuilder\ArgumentArray

buildEnumClause() 공개 메소드

public buildEnumClause ( BaseDriver $driver )
$driver SQLBuilder\Driver\BaseDriver

buildNullClause() 공개 메소드

***** Clause builder *****
public buildNullClause ( BaseDriver $driver )
$driver SQLBuilder\Driver\BaseDriver

buildPgSQLDefinitionSql() 공개 메소드

public buildPgSQLDefinitionSql ( BaseDriver $driver, SQLBuilder\ArgumentArray $args )
$driver SQLBuilder\Driver\BaseDriver
$args SQLBuilder\ArgumentArray

buildPrimaryKeyClause() 공개 메소드

public buildPrimaryKeyClause ( BaseDriver $driver )
$driver SQLBuilder\Driver\BaseDriver

buildSetClause() 공개 메소드

public buildSetClause ( BaseDriver $driver )
$driver SQLBuilder\Driver\BaseDriver

buildTimeZoneClause() 공개 메소드

public buildTimeZoneClause ( BaseDriver $driver )
$driver SQLBuilder\Driver\BaseDriver

buildTypeClause() 공개 메소드

public buildTypeClause ( BaseDriver $driver )
$driver SQLBuilder\Driver\BaseDriver

buildTypeName() 공개 메소드

public buildTypeName ( BaseDriver $driver )
$driver SQLBuilder\Driver\BaseDriver

buildUniqueClause() 공개 메소드

public buildUniqueClause ( BaseDriver $driver )
$driver SQLBuilder\Driver\BaseDriver

buildUnsignedClause() 공개 메소드

public buildUnsignedClause ( BaseDriver $driver )
$driver SQLBuilder\Driver\BaseDriver

char() 공개 메소드

public char ( $length )

date() 공개 메소드

********************************************** DateTime related types ***********************************************
public date ( )

datetime() 공개 메소드

public datetime ( )

decimal() 공개 메소드

public decimal ( $length = NULL, $decimals = NULL )

double() 공개 메소드

XXX: support for 'Infinity' '-Infinity' 'NaN'. MySQL supports float, real, double: float(3), float, real, real(10) MySQL permits a nonstandard syntax: FLOAT(M,D) or REAL(M,D) or DOUBLE PRECISION(M,D). Here, “(M,D)” means than values can be stored with up to M digits in total, of which D digits may be after the decimal point. For example, a column defined as FLOAT(7,4) will look like -999.9999 when displayed. MySQL performs rounding when storing values, so if you insert 999.00009 into a FLOAT(7,4) column, the approximate result is 999.0001.
public double ( $length = NULL, $decimals = NULL )

enum() 공개 메소드

public enum ( $a )

float() 공개 메소드

public float ( $length = NULL, $decimals = NULL )

getAttribute() 공개 메소드

Which should be something like getAttribute($name)
public getAttribute ( string $name )
$name string attribute name

getName() 공개 메소드

public getName ( )

getType() 공개 메소드

public getType ( )

int() 공개 메소드

public int ( $length = NULL )

integer() 공개 메소드

public integer ( $length = NULL )

isa() 공개 메소드

public isa ( $isa )

longblob() 공개 메소드

public longblob ( )

longtext() 공개 메소드

public longtext ( )

mediumInt() 공개 메소드

public mediumInt ( $length = NULL )

mediumblob() 공개 메소드

public mediumblob ( )

mediumtext() 공개 메소드

public mediumtext ( )

name() 공개 메소드

public name ( $name )

notNull() 공개 메소드

public notNull ( )

null() 공개 메소드

public null ( )

nullDefined() 공개 메소드

public nullDefined ( )

numeric() 공개 메소드

public numeric ( $length = NULL, $decimals = NULL )

point() 공개 메소드

POINT type
public point ( )

primary() 공개 메소드

public primary ( $primary = true )

real() 공개 메소드

public real ( $length = NULL, $decimals = NULL )

serial() 공개 메소드

for postgresql-only
public serial ( )

set() 공개 메소드

public set ( $a )

setAttribute() 공개 메소드

public setAttribute ( $name, $value )

setAttributeStash() 공개 메소드

public setAttributeStash ( array $attributes )
$attributes array

setAttributes() 공개 메소드

public setAttributes ( array $attributes )
$attributes array

setLengthInfo() 보호된 메소드

******************************************************************* PROTECTED METHODS (internal use) *********************************************************************
protected setLengthInfo ( $length, $decimals = NULL )

smallInt() 공개 메소드

public smallInt ( $length = NULL )

text() 공개 메소드

public text ( )

time() 공개 메소드

public time ( $timezone = true )

timestamp() 공개 메소드

mysql timestamp automatic initialization
또한 보기: http://dev.mysql.com/doc/refman/5.7/en/timestamp-initialization.html
public timestamp ( $timezone = true )

timezone() 공개 메소드

public timezone ( $bool = true )

tinyInt() 공개 메소드

public tinyInt ( $length = NULL )

tinyblob() 공개 메소드

public tinyblob ( )

toSql() 공개 메소드

public toSql ( BaseDriver $driver, SQLBuilder\ArgumentArray $args )
$driver SQLBuilder\Driver\BaseDriver
$args SQLBuilder\ArgumentArray

type() 공개 메소드

public type ( $type )

unsigned() 공개 메소드

public unsigned ( $unsigned = true )

varchar() 공개 메소드

public varchar ( $length )

year() 공개 메소드

public year ( )

프로퍼티 상세

$attributeTypes 보호되어 있는 프로퍼티

protected array $attributeTypes
리턴 array

$attributes 보호되어 있는 프로퍼티

The default attributes for a column.
protected array $attributes
리턴 array

$enum 공개적으로 프로퍼티

is only used when isa = enum
public $enum

$isa 공개적으로 프로퍼티

public $isa

$name 공개적으로 프로퍼티

column name
public $name

$notNull 공개적으로 프로퍼티

Null is set to true by default. (I know MySQL set this as default if you don't specify the not null constraint)
public $notNull

$onUpdate 공개적으로 프로퍼티

right now this is only for timestamp column
public $onUpdate

$primary 공개적으로 프로퍼티

primary
public $primary

$set 공개적으로 프로퍼티

is only used when isa = set
public $set

$type 공개적으로 프로퍼티

public $type

$unsigned 공개적으로 프로퍼티

unsigned
public $unsigned