PHP 클래스 Pop\Db\Sql

저자: Nick Sagona, III ([email protected])
파일 보기 프로젝트 열기: nicksagona/PopPHP 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$alias string Alias name for sub-queries
$clause mixed SQL clause object
$db Db Database object
$dbType integer Database type
$quoteIdType integer ID quote type
$sql string SQL statement
$table string Current table

공개 메소드들

메소드 설명
__construct ( Db $db, mixed $table = null, string $alias = null ) : Sql Constructor
__toString ( ) : string Method to return the SQL as a string
adapter ( ) : AbstractAdapter Get the current database object's adapter.
delete ( ) : Update Create a delete statement
factory ( Db $db, mixed $table = null, string $alias = null ) : Sql Static method to instantiate the SQL object and return itself to facilitate chaining methods together.
getAlias ( ) : string Get the alias name.
getDb ( ) : Db Get the current database object.
getDbType ( ) : integer Get the current database type.
getQuoteId ( ) : integer Get the quote ID type
getSql ( ) : string Get the current SQL statement string.
getTable ( ) : string Get the current table.
hasAlias ( ) : boolean Determine if the Sql object has an alias name
hasTable ( ) : boolean Determine if the Sql object has a table set
insert ( array $columns = null ) : Insert Create a insert statement
quote ( string $value ) : string Quote the value with single quotes
quoteId ( string $id ) : string Quote the value with the quoted identifier
render ( boolean $ret = false ) : mixed Render SQL string
select ( mixed $columns = null ) : Select Create a select statement
setAlias ( string $alias = null ) : Sql Set alias name
setDb ( Db $db ) : Sql Set the database object
setQuoteId ( integer $type = Pop\Db\Sql::NO_QUOTE ) : Sql Set the quote ID type
setTable ( mixed $table = null ) : Sql Set current table to operate on.
update ( array $columns = null ) : Update Create a update statement

메소드 상세

__construct() 공개 메소드

Instantiate the SQL object.
public __construct ( Db $db, mixed $table = null, string $alias = null ) : Sql
$db Db
$table mixed
$alias string
리턴 Sql

__toString() 공개 메소드

Method to return the SQL as a string
public __toString ( ) : string
리턴 string

adapter() 공개 메소드

Get the current database object's adapter.
public adapter ( ) : AbstractAdapter
리턴 Pop\Db\Adapter\AbstractAdapter

delete() 공개 메소드

Create a delete statement
public delete ( ) : Update
리턴 Pop\Db\Sql\Update

factory() 공개 정적인 메소드

Static method to instantiate the SQL object and return itself to facilitate chaining methods together.
public static factory ( Db $db, mixed $table = null, string $alias = null ) : Sql
$db Db
$table mixed
$alias string
리턴 Sql

getAlias() 공개 메소드

Get the alias name.
public getAlias ( ) : string
리턴 string

getDb() 공개 메소드

Get the current database object.
public getDb ( ) : Db
리턴 Db

getDbType() 공개 메소드

Get the current database type.
public getDbType ( ) : integer
리턴 integer

getQuoteId() 공개 메소드

Get the quote ID type
public getQuoteId ( ) : integer
리턴 integer

getSql() 공개 메소드

Get the current SQL statement string.
public getSql ( ) : string
리턴 string

getTable() 공개 메소드

Get the current table.
public getTable ( ) : string
리턴 string

hasAlias() 공개 메소드

Determine if the Sql object has an alias name
public hasAlias ( ) : boolean
리턴 boolean

hasTable() 공개 메소드

Determine if the Sql object has a table set
public hasTable ( ) : boolean
리턴 boolean

insert() 공개 메소드

Create a insert statement
public insert ( array $columns = null ) : Insert
$columns array
리턴 Pop\Db\Sql\Insert

quote() 공개 메소드

Quote the value with single quotes
public quote ( string $value ) : string
$value string
리턴 string

quoteId() 공개 메소드

Quote the value with the quoted identifier
public quoteId ( string $id ) : string
$id string
리턴 string

render() 공개 메소드

Render SQL string
public render ( boolean $ret = false ) : mixed
$ret boolean
리턴 mixed

select() 공개 메소드

Create a select statement
public select ( mixed $columns = null ) : Select
$columns mixed
리턴 Pop\Db\Sql\Select

setAlias() 공개 메소드

Set alias name
public setAlias ( string $alias = null ) : Sql
$alias string
리턴 Sql

setDb() 공개 메소드

Set the database object
public setDb ( Db $db ) : Sql
$db Db
리턴 Sql

setQuoteId() 공개 메소드

Set the quote ID type
public setQuoteId ( integer $type = Pop\Db\Sql::NO_QUOTE ) : Sql
$type integer
리턴 Sql

setTable() 공개 메소드

Set current table to operate on.
public setTable ( mixed $table = null ) : Sql
$table mixed
리턴 Sql

update() 공개 메소드

Create a update statement
public update ( array $columns = null ) : Update
$columns array
리턴 Pop\Db\Sql\Update

프로퍼티 상세

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

Alias name for sub-queries
protected string $alias
리턴 string

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

SQL clause object
protected mixed $clause
리턴 mixed

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

Database object
protected Db,Pop\Db $db
리턴 Db

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

Database type
protected int $dbType
리턴 integer

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

ID quote type
protected int $quoteIdType
리턴 integer

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

SQL statement
protected string $sql
리턴 string

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

Current table
protected string $table
리턴 string