StatementsHandler
class StatementsHandler extends AbstractStatements implements IStatements (View source)
Concrete implementation for Firebird database
Properties
| static protected IConnection | $instance | from AbstractStatements | |
| static protected IOptions | $optionsHandler | from AbstractStatements | |
| static protected IReport | $reportHandler | from AbstractStatements | |
| protected Metadata | $metadata | from AbstractStatements | |
| protected mixed|null | $statement | from AbstractStatements |
Methods
Initialize statements with required handlers
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.
This function quotes a string for use in an SQL statement and escapes special characters (such as quotes).
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
__construct(IConnection $instance, IOptions $optionsHandler, IReport $reportHandler)
Initialize statements with required handlers
static IConnection
getInstance()
Get the database connection instance
void
set(string $name, mixed $value)
Set a value using dynamic method call
mixed
get(string $name)
Get a value using dynamic method call
IOptions
getOptionsHandler()
Get the options handler instance
IReport
getReportHandler()
Get the report handler instance
void
setAllMetadata()
Reset all metadata to default values
object
getAllMetadata()
Get all metadata
string
getQueryString()
Get the current query string
void
setQueryString(string $params)
Set the query string
array|null
getQueryParameters()
Get the current query parameters
void
setQueryParameters(array|null $params)
Set the query parameters
int|false
getQueryRows()
Get number of rows fetched
void
setQueryRows(callable|int|false $params)
Set number of rows fetched
int|false
getQueryColumns()
Get number of columns in result
void
setQueryColumns(int|false $params)
Set number of columns in result
int|false
getAffectedRows()
Get number of affected rows
void
setAffectedRows(int|false $params)
Set number of affected rows
mixed
getStatement()
Get current statement object
void
setStatement(mixed $statement)
Set statement object
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.
mixed
quote(mixed ...$params)
This function quotes a string for use in an SQL statement and escapes special characters (such as quotes).
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.