Handling Fields and Binds for Query and SqlExpr
| package | salt\sql |
|---|
escapeName(string $name) : string
stringa SQL name : database, table, field, alias, etc...
stringSQL escaped text with backquote.getBinds(string $source = \salt\ClauseType::ALL) : array<mixed,mixed[]>
string(Optional) ClauseType or specific text for restrict returned binds to specified source
array<mixed,mixed[]>list of binds : array of array('value' => ..., 'type' => ...)getPaginationBinds(\salt\Pagination $pagination) : array<mixed,mixed[]>
\salt\Paginationthe Pagination object
array<mixed,mixed[]>binds for the Pagination : array of bindName => array of ('value' => ..., 'type' => ...)isPrivateBinds() : boolean
booleanTRUE if privateBinds has been calledprivateBinds(boolean $privateBinds = TRUE) : \salt\SqlBindField
boolean(Optional, TRUE) hide binds values in debug queries
\salt\SqlBindFieldthe current objecttoSQL() : string
stringthe memoized SQL textaddBind(mixed $value, integer $type, string $source = \salt\ClauseType::ALL) : string
mixedvalue of bind
integer(FieldType) type of the field
string(Optional) ClauseType or other text : clause where the bind will be used, if we know it
stringthe bind namebuildSQL() : string
stringthe SQL textlinkBindsOf(\salt\SqlBindField $other, string $source= \salt\ClauseType::ALL, string $otherSource= \salt\ClauseType::ALL)
\salt\SqlBindFieldthe other SqlBindField to link
stringclause usage of the SqlBindField if we known it
stringrestrict link to this source in $other
\salt\SaltException |
if this SqlBindField is already resolved |
|---|
removeBinds(string $source)
stringClauseType of specific text
checkNotResolved()
\salt\SaltException |
if called after toSQL() |
|---|
$_salt_bindNumber : integer
0$_salt_bindPaginationNumber : integer
0$_salt_binds : array<mixed,mixed>
array()| content | array of bindName => array( 'value' => mixed // value of bind 'type' => int FieldType // type of field 'private' => boolean // if value is private data (like passwords) ) |
|---|
$_salt_others : array<mixed,\salt\SqlBindField[][]>
array()| content | array of (ClauseType (source) => array of ClauseType(dest) => array of SqlBindField) |
|---|
$_salt_privateBinds : boolean
FALSE$_salt_sources : array<mixed,string[]>
array()| content | array of (ClauseType => array of bindName) |
|---|
$_salt_text : string
NULL