IStatements
interface IStatements (View source)
This interface defines the contract for database statement operations.
Implementing classes should provide concrete implementations for executing and managing database statements.
Methods
Reset query metadata
Returns an object containing the number of queried rows and the number of affected rows.
Returns the query string.
Sets the query string for the Connection instance.
Returns the parameters associated with this instance.
Sets the query parameters for the Connection instance.
Returns the number of rows affected by an operation.
Sets the number of query rows for the Connection instance.
Returns the number of columns in a statement result.
Sets the number of columns in the query result.
Returns the number of rows affected by an operation.
Sets the number of affected rows for the Connection instance.
Returns the statement for the function.
Set the statement for the function.
This function quotes a string for use in an SQL statement and escapes special characters (such as quotes).
This function returns the last ID generated by an auto-increment column, either the last one inserted during the current transaction, or by passing in the optional name parameter.
Binds a parameter to a variable in the SQL statement.
Parses an SQL statement and returns an statement.
This function executes an SQL statement and returns the result set as a statement object.
This function binds the parameters to a prepared query.
This function runs an SQL statement and returns the number of affected rows.
Details
void
setAllMetadata()
Reset query metadata
object
getAllMetadata()
Returns an object containing the number of queried rows and the number of affected rows.
string
getQueryString()
Returns the query string.
void
setQueryString(string $params)
Sets the query string for the Connection instance.
array|null
getQueryParameters()
Returns the parameters associated with this instance.
void
setQueryParameters(array|null $params)
Sets the query parameters for the Connection instance.
int|false
getQueryRows()
Returns the number of rows affected by an operation.
void
setQueryRows(callable|int|false $params)
Sets the number of query rows for the Connection instance.
int|false
getQueryColumns()
Returns the number of columns in a statement result.
void
setQueryColumns(int|false $params)
Sets the number of columns in the query result.
int|false
getAffectedRows()
Returns the number of rows affected by an operation.
void
setAffectedRows(int|false $params)
Sets the number of affected rows for the Connection instance.
mixed
getStatement()
Returns the statement for the function.
void
setStatement(mixed $statement)
Set the statement for the function.
mixed
quote(mixed ...$params)
This function quotes a string for use in an SQL statement and escapes special characters (such as quotes).
string|int|false
lastInsertId(string|null $name = null)
This function returns the last ID generated by an auto-increment column, either the last one inserted during the current transaction, or by passing in the optional name parameter.
void
bindParam(object $params)
Binds a parameter to a variable in the SQL statement.
string
parse(mixed ...$params)
Parses an SQL statement and returns an statement.
mixed
query(mixed ...$params)
This function executes an SQL statement and returns the result set as a statement object.
mixed
prepare(mixed ...$params)
This function binds the parameters to a prepared query.
mixed
exec(mixed ...$params)
This function runs an SQL statement and returns the number of affected rows.