private QueryBuilder $queryBuilder
public __construct(Adapter $adapter, string $name, ?string $alias): void
| Parameter | Type | Description |
|---|
$adapter | Adapter | |
$name | string | |
$alias | string | |
public __toString(): string
public toString(): string
public exists(mixed $criteria): bool
| Parameter | Type | Description |
|---|
$criteria | mixed | |
public select(mixed $columns = '*'): self
| Parameter | Type | Description |
|---|
$columns | mixed | |
public distinct(string $columns): self
| Parameter | Type | Description |
|---|
$columns | string | |
public from(string $table, ?string $alias): self
| Parameter | Type | Description |
|---|
$table | string | |
$alias | string | |
public limit(int $limit): self
| Parameter | Type | Description |
|---|
$limit | int | |
public offset(int $offset): self
| Parameter | Type | Description |
|---|
$offset | int | |
public order(string $columns, int $direction = 'SORT_ASC'): self
| Parameter | Type | Description |
|---|
$columns | string | |
$direction | int | |
public group(string $columns): self
| Parameter | Type | Description |
|---|
$columns | string | |
public having(array $having): self
| Parameter | Type | Description |
|---|
$having | array | |
Join a table to the current query using the provided join criteria.
public join(string $table, string $on, ?string $alias, string $type = 'INNER'): self
| Parameter | Type | Description |
|---|
$table | string | |
$on | string | The join criteria. This is mostly just a standard query selection criteria. |
$alias | string | an alias to use for the joined table |
$type | string | the join type such as INNER, OUTER, LEFT, RIGHT, etc |
Join a table to the current query using the provided join criteria.
public leftJoin(string $table, string $on, ?string $alias): self
| Parameter | Type | Description |
|---|
$table | string | |
$on | string | The join criteria. This is mostly just a standard query selection criteria. |
$alias | string | an alias to use for the joined table |
Join a table to the current query using the provided join criteria.
public rightJoin(string $table, string $on, ?string $alias): self
| Parameter | Type | Description |
|---|
$table | string | |
$on | string | The join criteria. This is mostly just a standard query selection criteria. |
$alias | string | an alias to use for the joined table |
Join a table to the current query using the provided join criteria.
public innerJoin(string $table, string $on, ?string $alias): self
| Parameter | Type | Description |
|---|
$table | string | |
$on | string | The join criteria. This is mostly just a standard query selection criteria. |
$alias | string | an alias to use for the joined table |
Join a table to the current query using the provided join criteria.
public outerJoin(string $table, string $on, ?string $alias): self
| Parameter | Type | Description |
|---|
$table | string | |
$on | string | The join criteria. This is mostly just a standard query selection criteria. |
$alias | string | an alias to use for the joined table |
Join a table to the current query using the provided join criteria.
public fullJoin(string $table, string $on, ?string $alias): self
| Parameter | Type | Description |
|---|
$table | string | |
$on | string | The join criteria. This is mostly just a standard query selection criteria. |
$alias | string | an alias to use for the joined table |
Join a table to the current query using the provided join criteria.
public crossJoin(string $table, string $on, ?string $alias): self
| Parameter | Type | Description |
|---|
$table | string | |
$on | string | The join criteria. This is mostly just a standard query selection criteria. |
$alias | string | an alias to use for the joined table |
Combine the result sets of two or more SELECT statements into a single result set.
public union(Table $table): self
This method adds a UNION clause to the current query builder instance, combining it with the query builder from the provided table.
| Parameter | Type | Description |
|---|
$table | Table | the table instance containing the query to union with |
Combine the result of two or more SELECT statements using the UNION ALL operator.
public unionAll(Table $table): self
| Parameter | Type | Description |
|---|
$table | Table | the table to union with |
Intersects the current table query with another table's query.
public intersect(Table $table): self
This method modifies the current table's query builder to include an INTERSECT clause with the query builder of the provided table.
| Parameter | Type | Description |
|---|
$table | Table | the table instance to intersect with |
Adds an EXCEPT clause to the query using another table's query builder.
public except(Table $table): self
This method modifies the underlying query builder to include an EXCEPT clause, effectively filtering results to include rows from the current table that are not present in the results of the provided table's query.
| Parameter | Type | Description |
|---|
$table | Table | the table instance whose query will be used for the exclusion |
Prepares a SELECT statement with the specified column names and criteria names.
public prepareSelect(array $columns, array $criteriaNames): Statement
| Parameter | Type | Description |
|---|
$columns | array | the names of the columns to be selected |
$criteriaNames | array | the names of the columns to be used as criteria for the selection |
public insert(mixed $values, null $returning, null $conflictTarget, null $conflictUpdate, ?Table $table): mixed
| Parameter | Type | Description |
|---|
$values | mixed | |
$returning | null | |
$conflictTarget | null | |
$conflictUpdate | null | |
$table | Table | |
Prepares an SQL INSERT statement with the given column names.
public prepareInsert(array $columnNames): Statement
This method takes an array of column names and creates an associative array where each column name is a key and the value is set to null. It then uses the query builder to generate an INSERT query with these values and prepares the query using the adapter.
| Parameter | Type | Description |
|---|
$columnNames | array | an array of column names to be included in the INSERT statement |
public insertModel(Struct $model, null $conflictTarget, mixed $conflictUpdate): Struct
| Parameter | Type | Description |
|---|
$model | Struct | |
$conflictTarget | null | |
$conflictUpdate | mixed | |
Updates records in the database table.
public update(mixed $values, string $where, mixed $returning): mixed
| Parameter | Type | Description |
|---|
$values | mixed | The values to update in the table. This can be an associative array of column-value pairs. |
$where | string | The conditions to identify the records to update. This can be an associative array of column-value pairs or a string condition. |
$returning | mixed | Optional. Specifies the columns to return after the update. This can be a string or an array of column names. |
Prepares an update statement with the specified column names and criteria names.
public prepareUpdate(array $columnNames, array $criteriaNames): Statement
| Parameter | Type | Description |
|---|
$columnNames | array | the names of the columns to be updated |
$criteriaNames | array | the names of the columns to be used as criteria for the update |
Updates the given model in the database based on the specified criteria.
public updateModel(Struct $model, string $where): Struct
| Parameter | Type | Description |
|---|
$model | Struct | the model instance to be updated |
$where | string | The criteria for selecting the record(s) to be updated. Can be an array of keys or a single key. |
public delete(string $where): int
| Parameter | Type | Description |
|---|
$where | string | |
Prepares a DELETE statement with the specified criteria names.
public prepareDelete(array $criteriaNames): Statement
| Parameter | Type | Description |
|---|
$criteriaNames | array | the names of the columns to be used as criteria for the deletion |
public truncate(bool $cascade): bool
| Parameter | Type | Description |
|---|
$cascade | bool | |
public find(mixed $where, mixed $columns): Result
| Parameter | Type | Description |
|---|
$where | mixed | |
$columns | mixed | |
public where(string $where): self
| Parameter | Type | Description |
|---|
$where | string | |
public findOne(string $where, mixed $columns, false $): void
| Parameter | Type | Description |
|---|
$where | string | |
$columns | mixed | |
$ | false | |
Finds a single model instance based on the specified conditions.
public findOneModel(string $model, string $where): Struct
| Parameter | Type | Description |
|---|
$model | string | the fully qualified class name of the model to instantiate |
$where | string | the conditions to use for finding the record |
public findOneRow(string $where, null $columns): Row
| Parameter | Type | Description |
|---|
$where | string | |
$columns | null | |
public fetchAll(?string $keyColumn, false $): void
| Parameter | Type | Description |
|---|
$keyColumn | string | |
$ | false | |
public fetchAllColumn(string $columnName, mixed $fetchArgument, bool $clobberDupNamedCols, false $): void
| Parameter | Type | Description |
|---|
$columnName | string | |
$fetchArgument | mixed | |
$clobberDupNamedCols | bool | |
$ | false | |
public describe(false $): void
| Parameter | Type | Description |
|---|
$ | false | |
public create(mixed $columns): bool
| Parameter | Type | Description |
|---|
$columns | mixed | |
public getPrimaryKey(false $): void
| Parameter | Type | Description |
|---|
$ | false | |
Generated by Hazaar API Doc Generator on Sun, 01 Mar 2026 09:22:25 +0000