IQuery
Interface for all Query classes. It ensures that any query builder implementation provides a build method and can be executed.
Methods
setTable($table, $alias)
Sets the primary table for the query.
Example:
$query->setTable('users', 'u');
setConnection(IConnection $connection)
Sets the database connection to be used for executing the query.
build(bool $parameterized)
Builds the SQL statement string.
execute(IConnection $connection)
Executes the query and returns the result set or statement.
Example:
$result = $query->execute();
setParam(string $paramName, $value)
Sets a named parameter value for parameterized queries.
getParams()
Returns the array of all set parameters.