Метод |
Описание |
|
__get ( string $db ) : resource | false |
魔术方法 自动获取相应db实例 |
|
_and ( ) |
增加 and条件操作符 |
|
_or ( ) |
增加or条件操作符 |
|
chunk ( integer $num = 100, callable $func ) |
组块结果集 |
|
columns ( string | array $columns = '*' ) |
选择列 |
|
conditionFactory ( string $column, array | integer | string $value, string $operator = '=' ) |
where 语句组装工厂 |
|
getCacheVer ( string $table ) : mixed |
根据表名获取cache版本号 |
|
getOne ( boolean $useMaster = false ) : array | boolean |
获取一条数据 |
|
getOneValue ( string $column, boolean $useMaster = false ) : boolean | mixed |
获取一列 |
|
getPk ( string $table, string $tablePrefix = null ) : string |
获取表主键 |
|
groupBy ( string $column ) |
分组 |
|
having ( string $column, string $operator = '=', string $value ) |
having语句 |
|
join ( string | array $table, string $on, mixed $tablePrefix = null ) |
join内联结 |
|
lBrackets ( ) |
where条件增加左括号 |
|
leftJoin ( string | array $table, string $on, mixed $tablePrefix = null ) |
leftJoin左联结 |
|
limit ( integer $offset, integer $limit = 10 ) |
LIMIT |
|
orderBy ( string $column, string $order = 'ASC' ) |
排序 |
|
paginate ( integer $limit, boolean $useMaster = false ) : array |
分页获取数据 |
|
paramsAutoReset ( boolean $autoReset = true ) |
orm参数是否自动重置, 默认在执行语句后会重置orm参数 |
|
plunk ( string $column, null $key = null, integer $limit = null, boolean $useMaster = false ) : array |
获取数据列值列表 |
|
rBrackets ( ) |
where条件增加右括号 |
|
rightJoin ( string | array $table, string $on, mixed $tablePrefix = null ) |
rightJoin右联结 |
|
setCacheVer ( string $table ) |
设置cache版本号 |
|
table ( string | array $table = '', mixed $tablePrefix = null ) |
定义操作的表 |
|
union ( string | array $sql, boolean $all = false ) |
union联结 |
|
where ( string | array $column, string | integer $value = '' ) |
where条件组装 相等 |
|
whereBetween ( string $column, string | integer | array $value, string | integer | null $value2 = null ) |
where条件组装 BETWEEN |
|
whereGt ( string $column, string | integer $value ) |
where条件组装 大于 |
|
whereGte ( string $column, string | integer $value ) |
where条件组装 大于等于 |
|
whereIn ( string $column, array $value ) |
where条件组装 in |
|
whereLike ( string $column, boolean $leftBlur = false, string | integer $value, boolean $rightBlur = false ) |
where条件组装 LIKE |
|
whereLt ( string $column, string | integer $value ) |
where条件组装 小于 |
|
whereLte ( string $column, string | integer $value ) |
where条件组装 小于等于 |
|
whereNot ( string $column, string | integer $value ) |
where条件组装 不等 |
|
whereNotBetween ( string $column, string | integer | array $value, string | integer | null $value2 = null ) |
where条件组装 NOT BETWEEN |
|
whereNotIn ( string $column, array $value ) |
where条件组装 not in |
|
whereNotLike ( string $column, boolean $leftBlur = false, string | integer $value, boolean $rightBlur = false ) |
where条件组装 LIKE |
|
whereNotNull ( string $column ) |
where条件组装 IS NOT NULL |
|
whereNull ( string $column ) |
where条件组装 IS NULL |
|
whereRegExp ( string $column, string | integer $value ) |
where条件组装 REGEXP |
|