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 object | $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
Executes a prepared select statement with set opertations.
Executes a prepared select statement.
Executes a prepared insert statement.
Executes a prepared update statement.
Executes a prepared delete statement.
function executeCreateTable
function executeAlterTable
Executes a prepared 'truncate' statement.
function executeDropTable
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
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
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(mixed $parameter, mixed $variable, int $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(array $parameters = array())
Executes a prepared statement.
in Statement at line 242
int
rowCount()
Returns the number of rows affected by the last SQL statement
in Statement at line 253
int
columnCount()
Returns the number of columns in the result set
in Statement at line 266
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 132
protected bool
executeCompoundSelect()
Executes a prepared select statement with set opertations.
at line 114
protected bool
executeSelect()
Executes a prepared select statement.
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 646
protected bool
executeCreateTable()
function executeCreateTable
at line 658
protected bool
executeAlterTable()
function executeAlterTable
at line 269
protected bool
executeTruncate()
Executes a prepared 'truncate' statement.
at line 670
protected bool
executeDropTable()
function executeDropTable
at line 82
mixed
fetch()
Fetches the next row from a result set
at line 93
mixed
fetchColumn(int $c = 0)
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 285
protected array
makeExpressionVariables(stdClass $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, object $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 object|null
joins(int $len)
Returns the next row resulting from the joining of tables in the query.
at line 423
protected bool
isExpression(string $string)
Checks if a string contains an expression.
at line 437
protected bool
isBuiltin(string $value)
Determines if the given value is a builtin value.
at line 448
protected array
project(array $scope)
Realizes the operation of projection of result set
at line 494
private mixed
fieldValue(stdClass $row, mixed $column)
Returns the value of a field
at line 512
protected array
aggregate(array $result)
Performs group by clause on the given result set, if any
at line 581
protected void
resetAggregates(array $aggregates)
Initializes aggregate functions for all columns in the query
at line 598
protected array
sort(array $result)
Sorts the result set according to the 'order by' clause.
at line 630
protected array
limit(array $result)
Applies the 'limit' clause on the result set