phpDocumentor

MydbQueryBuilderInterface

Tags
author

Sergei Shilko contact@sshilko.com

license

https://opensource.org/licenses/mit-license.php MIT

see
https://github.com/sshilko/php-sql-mydb

Table of Contents

Constants

SQL_INSERT  = 'INSERT'
SQL_REPLACE  = 'REPLACE'

Methods

buildDeleteWhere()  : string|null
buildInsertMany()  : string
buildUpdateWhere()  : string|null
buildUpdateWhereMany()  : string
buildWhere()  : string
escape()  : string
insertOne()  : string
showColumnsLike()  : string
showKeys()  : string

Constants

Methods

buildDeleteWhere()

public buildDeleteWhere(string $table[, array<string|int, mixed> $fields = [] ][, array<string|int, mixed> $negativeFields = [] ]) : string|null
Parameters
$table : string
$fields : array<string|int, mixed> = []
$negativeFields : array<string|int, mixed> = []
Return values
string|null

buildInsertMany()

public buildInsertMany(array<string|int, mixed> $data, array<string|int, string> $cols, string $table, bool $ignore, string $onDuplicate) : string
Parameters
$data : array<string|int, mixed>
$cols : array<string|int, string>
$table : string
$ignore : bool
$onDuplicate : string
Return values
string

buildUpdateWhere()

public buildUpdateWhere(array<string, float|int|string|MydbExpressionInterface|null> $update, array<string|int, mixed> $whereFields, string $table[, array<string|int, mixed> $whereNotFields = [] ]) : string|null
Parameters
$update : array<string, float|int|string|MydbExpressionInterface|null>
$whereFields : array<string|int, mixed>
$table : string
$whereNotFields : array<string|int, mixed> = []
Tags
throws
QueryBuilderException
Return values
string|null

buildUpdateWhereMany()

public buildUpdateWhereMany(array<string|int, mixed> $columnSetWhere, array<string|int, mixed> $where, string $table) : string
Parameters
$columnSetWhere : array<string|int, mixed>

['col1' => [ ['current1', 'new1'], ['current2', 'new2']]

$where : array<string|int, mixed>

['col2' => 'value2', 'col3' => ['v3', 'v4']]

$table : string

'mytable'

Return values
string

buildWhere()

public buildWhere(array<string|int, mixed> $fields[, array<string|int, mixed> $negativeFields = [] ][, array<string|int, mixed> $likeFields = [] ]) : string
Parameters
$fields : array<string|int, mixed>
$negativeFields : array<string|int, mixed> = []
$likeFields : array<string|int, mixed> = []
Tags
throws
QueryBuilderException
Return values
string

showColumnsLike()

public showColumnsLike(string $table, string $column) : string
Parameters
$table : string
$column : string
Return values
string

        
On this page

Search results