v1.0.0
English

BaseBuilder.php

system/Database/BaseBuilder.php
1 class 134 methods

class BaseBuilder

Class BaseBuilder Provides the core Query Builder methods. Database-specific Builders might need to override certain methods to make them work.
__construct ($tableName, ConnectionInterface $db, ?array $options = null) public
db () public
testMode (bool $mode = true) public
getTable () public
getBinds () public
ignore (bool $ignore = true) public
select ($select = '*', ?bool $escape = null) public
selectMax (string $select = '', string $alias = '') public
selectMin (string $select = '', string $alias = '') public
selectAvg (string $select = '', string $alias = '') public
selectSum (string $select = '', string $alias = '') public
selectCount (string $select = '', string $alias = '') public
selectSubquery (BaseBuilder $subquery, string $as) public
maxMinAvgSum (string $select = '', string $alias = '', string $type = 'MAX') protected
createAliasFromTable (string $item) protected
distinct (bool $val = true) public
from ($from, bool $overwrite = false) public
fromSubquery (BaseBuilder $from, string $alias) public
join (string $table, $cond, string $type = '', ?bool $escape = null) public
where ($key, $value = null, ?bool $escape = null) public
orWhere ($key, $value = null, ?bool $escape = null) public
whereHaving (string $qbKey, $key, $value = null, string $type = 'AND ', ?bool $escape = null) protected
whereIn (?string $key = null, $values = null, ?bool $escape = null) public
orWhereIn (?string $key = null, $values = null, ?bool $escape = null) public
whereNotIn (?string $key = null, $values = null, ?bool $escape = null) public
orWhereNotIn (?string $key = null, $values = null, ?bool $escape = null) public
havingIn (?string $key = null, $values = null, ?bool $escape = null) public
orHavingIn (?string $key = null, $values = null, ?bool $escape = null) public
havingNotIn (?string $key = null, $values = null, ?bool $escape = null) public
orHavingNotIn (?string $key = null, $values = null, ?bool $escape = null) public
_whereIn (?string $key = null, $values = null, bool $not = false, string $type = 'AND ', ?bool $escape = null, string $clause = 'QBWhere') protected
like ($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false) public
notLike ($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false) public
orLike ($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false) public
orNotLike ($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false) public
havingLike ($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false) public
notHavingLike ($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false) public
orHavingLike ($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false) public
orNotHavingLike ($field, string $match = '', string $side = 'both', ?bool $escape = null, bool $insensitiveSearch = false) public
_like ($field, string $match = '', string $type = 'AND ', string $side = 'both', string $not = '', ?bool $escape = null, bool $insensitiveSearch = false, string $clause = 'QBWhere') protected
_like_statement (?string $prefix, string $column, ?string $not, string $bind, bool $insensitiveSearch = false) protected
union ($union) public
unionAll ($union) public
addUnionStatement ($union, bool $all = false) protected
groupStart () public
orGroupStart () public
notGroupStart () public
orNotGroupStart () public
groupEnd () public
havingGroupStart () public
orHavingGroupStart () public
notHavingGroupStart () public
orNotHavingGroupStart () public
havingGroupEnd () public
groupStartPrepare (string $not = '', string $type = 'AND ', string $clause = 'QBWhere') protected
groupEndPrepare (string $clause = 'QBWhere') protected
groupGetType (string $type) protected
groupBy ($by, ?bool $escape = null) public
having ($key, $value = null, ?bool $escape = null) public
orHaving ($key, $value = null, ?bool $escape = null) public
orderBy (string $orderBy, string $direction = '', ?bool $escape = null) public
limit (?int $value = null, ?int $offset = 0) public
offset (int $offset) public
_limit (string $sql, bool $offsetIgnore = false) protected
set ($key, $value = '', ?bool $escape = null) public
getSetData (bool $clean = false) public
getCompiledSelect (bool $reset = true) public
compileFinalQuery (string $sql) protected
get (?int $limit = null, int $offset = 0, bool $reset = true) public
countAll (bool $reset = true) public
countAllResults (bool $reset = true) public
getCompiledQBWhere () public
getWhere ($where = null, ?int $limit = null, ?int $offset = 0, bool $reset = true) public
batchExecute (string $renderMethod, int $batchSize = 100) protected
setData ($set, ?bool $escape = null, string $alias = '') public
getCompiledUpsert () public
upsert ($set = null, ?bool $escape = null) public
upsertBatch ($set = null, ?bool $escape = null, int $batchSize = 100) public
_upsertBatch (string $table, array $keys, array $values) protected
setAlias (string $alias) private
updateFields ($set, bool $addToDefault = false, ?array $ignore = null) public
onConstraint ($set) public
setQueryAsData ($query, ?string $alias = null, $columns = null) public
fieldsFromQuery (string $sql) protected
formatValues (array $values) protected
insertBatch ($set = null, ?bool $escape = null, int $batchSize = 100) public
_insertBatch (string $table, array $keys, array $values) protected
setInsertBatch ($key, string $value = '', ?bool $escape = null) public
getCompiledInsert (bool $reset = true) public
insert ($set = null, ?bool $escape = null) public
removeAlias (string $from) protected
validateInsert () protected
_insert (string $table, array $keys, array $unescapedKeys) protected
replace (?array $set = null) public
_replace (string $table, array $keys, array $values) protected
_fromTables () protected
getCompiledUpdate (bool $reset = true) public
update ($set = null, $where = null, ?int $limit = null) public
_update (string $table, array $values) protected
validateUpdate () protected
updateBatch ($set = null, $constraints = null, int $batchSize = 100) public
_updateBatch (string $table, array $keys, array $values) protected
setUpdateBatch ($key, string $index = '', ?bool $escape = null) public
emptyTable () public
truncate () public
_truncate (string $table) protected
getCompiledDelete (bool $reset = true) public
delete ($where = '', ?int $limit = null, bool $resetData = true) public
deleteBatch ($set = null, $constraints = null, int $batchSize = 100) public
_deleteBatch (string $table, array $keys, array $values) protected
increment (string $column, int $value = 1) public
decrement (string $column, int $value = 1) public
_delete (string $table) protected
trackAliases ($table) protected
compileSelect ($selectOverride = false) protected
compileIgnore (string $statement) protected
compileWhereHaving (string $qbKey) protected
compileGroupBy () protected
compileOrderBy () protected
unionInjection (string $sql) protected
objectToArray ($object) protected
batchObjectToArray ($object) protected
isLiteral (string $str) protected
resetQuery () public
resetRun (array $qbResetItems) protected
resetSelect () protected
resetWrite () protected
hasOperator (string $str) protected
getOperator (string $str, bool $list = false) protected
getOperatorFromWhereKey (string $whereKey) private
setBind (string $key, $value = null, bool $escape = true) protected
cleanClone () protected
isSubquery ($value) protected
buildSubquery ($builder, bool $wrapped = false, string $alias = '') protected
phpDG v1.0.0 BaseBuilder.php 662 files 498 classes 763 fn
Generated