Documentation

IQueryBuilder

Interface for building SQL queries.

Table of Contents

Methods

CreateBatchInsert()  : string
Creates an SQL batch INSERT query.
CreateBegin()  : string
Creates an SQL BEGIN transaction query.
CreateCommit()  : string
Creates an SQL COMMIT transaction query.
CreateDelete()  : string
Creates an SQL DELETE query.
CreateInsert()  : string
Creates an SQL INSERT query.
CreateInsertOrUpdate()  : string
Creates an SQL INSERT OR UPDATE query.
CreateReplace()  : string
Creates an SQL REPLACE query.
CreateRollback()  : string
Creates an SQL ROLLBACK transaction query.
CreateShowField()  : string
Creates an SQL SHOW FIELD query.
CreateShowTables()  : string
Creates an SQL SHOW TABLES query.
CreateUpdate()  : string
Creates an SQL UPDATE query.

Methods

CreateBatchInsert()

Creates an SQL batch INSERT query.

public CreateBatchInsert(string $table, array<string|int, mixed>|object $data) : string
Parameters
$table : string

The name of the table to insert data into.

$data : array<string|int, mixed>|object

The data to insert into the table.

Return values
string

The generated batch INSERT query.

CreateBegin()

Creates an SQL BEGIN transaction query.

public CreateBegin() : string
Return values
string

The generated BEGIN transaction query.

CreateCommit()

Creates an SQL COMMIT transaction query.

public CreateCommit() : string
Return values
string

The generated COMMIT transaction query.

CreateDelete()

Creates an SQL DELETE query.

public CreateDelete(string $table, string $condition) : string
Parameters
$table : string

The name of the table to delete from.

$condition : string

The condition for the delete operation.

Return values
string

The generated DELETE query.

CreateInsert()

Creates an SQL INSERT query.

public CreateInsert(string $table, array<string|int, mixed>|object $data[, string $returning = '' ]) : string
Parameters
$table : string

The name of the table to insert data into.

$data : array<string|int, mixed>|object

The data to insert into the table.

$returning : string = ''

(optional) The returning clause for the query. Default is an empty string.

Return values
string

The generated INSERT query.

CreateInsertOrUpdate()

Creates an SQL INSERT OR UPDATE query.

public CreateInsertOrUpdate(string $table, array<string|int, mixed>|object $data[, array<string|int, mixed> $exceptFields = [] ][, string $returning = '' ]) : string
Parameters
$table : string

The name of the table.

$data : array<string|int, mixed>|object

The data to insert or update.

$exceptFields : array<string|int, mixed> = []

(optional) Fields to be excluded from the update operation. Default is an empty array.

$returning : string = ''

(optional) The returning clause for the query. Default is an empty string.

Return values
string

The generated INSERT OR UPDATE query.

CreateReplace()

Creates an SQL REPLACE query.

public CreateReplace(string $table, array<string|int, mixed>|object $data[, string $returning = '' ]) : string
Parameters
$table : string

The name of the table to replace data in.

$data : array<string|int, mixed>|object

The data to replace in the table.

$returning : string = ''

(optional) The returning clause for the query. Default is an empty string.

Return values
string

The generated REPLACE query.

CreateRollback()

Creates an SQL ROLLBACK transaction query.

public CreateRollback() : string
Return values
string

The generated ROLLBACK transaction query.

CreateShowField()

Creates an SQL SHOW FIELD query.

public CreateShowField(string $table) : string
Parameters
$table : string

The name of the table.

Return values
string

The generated SHOW FIELD query.

CreateShowTables()

Creates an SQL SHOW TABLES query.

public CreateShowTables() : string
Return values
string

The generated SHOW TABLES query.

CreateUpdate()

Creates an SQL UPDATE query.

public CreateUpdate(string $table, string $condition, array<string|int, mixed>|object $data) : string
Parameters
$table : string

The name of the table to update.

$condition : string

The condition for the update operation.

$data : array<string|int, mixed>|object

The data to update.

Return values
string

The generated UPDATE query.


        
On this page

Search results