Handling Fields and Binds for Query and SqlExpr
package | salt\sql |
---|
escapeName(string $name) : string
string
a SQL name : database, table, field, alias, etc...
string
SQL 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\Pagination
the Pagination object
array<mixed,mixed[]>
binds for the Pagination : array of bindName => array of ('value' => ..., 'type' => ...)isPrivateBinds() : boolean
boolean
TRUE if privateBinds has been calledprivateBinds(boolean $privateBinds = TRUE
) : \salt\SqlBindField
boolean
(Optional, TRUE) hide binds values in debug queries
\salt\SqlBindField
the current objecttoSQL() : string
string
the memoized SQL textaddBind(mixed $value, integer $type, string $source = \salt\ClauseType::ALL
) : string
mixed
value 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
string
the bind namebuildSQL() : string
string
the SQL textlinkBindsOf(\salt\SqlBindField $other, string $source= \salt\ClauseType::ALL
, string $otherSource= \salt\ClauseType::ALL
)
\salt\SqlBindField
the other SqlBindField to link
string
clause usage of the SqlBindField if we known it
string
restrict link to this source in $other
\salt\SaltException |
if this SqlBindField is already resolved |
---|
removeBinds(string $source)
string
ClauseType 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