DMLStatement
class DMLStatement extends Statement
The class JsonSQLStatement represents a prepared statement and, after the statement is executed, an associated result set.
Properties
protected JsonSQL | $jsonsql | from Statement | |
protected stdClass | $request | from Statement | |
protected array | $result | from Statement | |
protected int | $rowCount | from Statement | |
protected array | $params | from Statement | |
protected Engine | $engine | from Statement | |
private mixed|null | $builtins | ||
private mixed|null | $parser |
Methods
Binds a value to a corresponding named or question mark placeholder in the SQL statement that was used to prepare the statement.
Binds a PHP variable to a corresponding named or question mark placeholder in the SQL statement that was used to prepare the statement.
Checks if a value corresponds to its type and if it is safety in case of string
Fetches the next row from a result set
Returns a single column from the next row of a result set
Returns an array containing all of the result set rows
Executes a prepared select statement.
Executes a prepared select statement with set opertations.
Executes a prepared insert statement.
Executes a prepared update statement.
Executes a prepared delete statement.
Executes a prepared 'truncate' statement.
From the given row, built an array containing all the variables in the scope of the running request.
Evaluates a condition with the values of the given row.
Selects rows that satisfy the where clause of the request.
Returns the next row resulting from the joining of tables in the query.
Checks if a string contains an expression.
Determines if the given value is a builtin value.
Realizes the operation of projection of result set
Returns the value of a field
Performs group by clause on the given result set, if any
Initializes aggregate functions for all columns in the query
Sorts the result set according to the 'order by' clause.
Applies the 'limit' clause on the result set
Details
in Statement at line 138
bool
bindValue(mixed $parameter, mixed $value, int $type = \PDO::PARAM_STR)
Binds a value to a corresponding named or question mark placeholder in the SQL statement that was used to prepare the statement.
in Statement at line 189
bool
bindParam($parameter, $variable, $type = \PDO::PARAM_STR)
Binds a PHP variable to a corresponding named or question mark placeholder in the SQL statement that was used to prepare the statement.
the variable is bound as a reference and will only be evaluated at the time that execute() is called.
in Statement at line 202
bool
execute($parameters = array())
Executes a prepared statement.
in Statement at line 244
int
rowCount()
Returns the number of rows affected by the last SQL statement
in Statement at line 255
int
columnCount()
Returns the number of columns in the result set
in Statement at line 268
protected void
checkValue(string $value, int $type = \PDO::PARAM_STR)
Checks if a value corresponds to its type and if it is safety in case of string
at line 82
int
fetch()
Fetches the next row from a result set
at line 93
mixed
fetchColumn(int $c)
Returns a single column from the next row of a result set
at line 104
array
fetchAll()
Returns an array containing all of the result set rows
at line 114
protected bool
executeSelect()
Executes a prepared select statement.
at line 132
protected bool
executeCompoundSelect()
Executes a prepared select statement with set opertations.
at line 182
protected bool
executeInsert()
Executes a prepared insert statement.
at line 220
protected bool
executeUpdate()
Executes a prepared update statement.
at line 249
protected bool
executeDelete()
Executes a prepared delete statement.
at line 269
protected bool
executeTruncate()
Executes a prepared 'truncate' statement.
at line 285
protected array
makeExpressionVariables(stdClas $row)
From the given row, built an array containing all the variables in the scope of the running request.
at line 311
protected string|bool
evaluate(string $conditions, stdClas $row)
Evaluates a condition with the values of the given row.
at line 333
protected array
select()
Selects rows that satisfy the where clause of the request.
at line 354
protected stdClass|null
joins(int $len)
Returns the next row resulting from the joining of tables in the query.
at line 422
protected bool
isExpression(string $string)
Checks if a string contains an expression.
at line 436
protected bool
isBuiltin(string $value)
Determines if the given value is a builtin value.
at line 447
protected array
project(array $scope)
Realizes the operation of projection of result set
at line 493
private mixed
fieldValue(stdClas $row, mixed $column)
Returns the value of a field
at line 511
protected array
aggregate(array $result)
Performs group by clause on the given result set, if any
at line 580
protected void
resetAggregates(array $aggregates)
Initializes aggregate functions for all columns in the query
at line 597
protected array
sort(array $result)
Sorts the result set according to the 'order by' clause.
at line 629
protected array
limit(array $result)
Applies the 'limit' clause on the result set