Constants

bindRefStr

bindRefStr = 's_'

Properties

$table

$table : 

Type

$join

$join : 

Type

$field

$field : 

Type

$where

$where : 

Type

$data

$data : 

Type

$parsedTable

$parsedTable : 

Type

$parsedWhere

$parsedWhere : 

Type

$parsedField

$parsedField : 

Type

$bindData

$bindData : 

Type

$cSql

$cSql : 

Type

$cBind

$cBind : 

Type

Methods

__construct()

__construct(  $absQuery = null) 

Parameters

$absQuery

field()

field(mixed  ...$fields) : $this

字段设置

Parameters

mixed $fields variadic

Returns

$this

table()

table(string  $table, null|string  $alias = null) : $this

数据表设置

Parameters

string $table
null|string $alias

Returns

$this

join()

join(string  $table, string  $alias, string  $condition, string  $type = 'INNER') : $this

链表信息

Parameters

string $table
string $alias
string $condition
string $type

Returns

$this

leftJoin()

leftJoin(string  $table, string  $alias, string  $condition) : \sR\db\Builder

表左链接

Parameters

string $table
string $alias
string $condition

Returns

\sR\db\Builder

rightJoin()

rightJoin(string  $table, string  $alias, string  $condition) : \sR\db\Builder

表右链接

Parameters

string $table
string $alias
string $condition

Returns

\sR\db\Builder

bind()

bind(  $key, null  $value = null) : $this

数据绑定

Parameters

$key
null $value

Returns

$this

data()

data(string  $key, null  $value = null) : $this

设置 insert/update 的数据

Parameters

string $key
null $value

Returns

$this

all()

all() : array|null

Returns

array|null

row()

row() : array|mixed|null

Returns

array|mixed|null

one()

one() : mixed

Returns

mixed

insert()

insert() : boolean|integer

插入数据

Returns

boolean|integer

update()

update() : boolean|integer

更新数据

Returns

boolean|integer

delete()

delete() : boolean|integer

删除数据

Returns

boolean|integer

count()

count(null|string  $name = null) : mixed

count 统计

Parameters

null|string $name

Returns

mixed

sql()

sql() : array

获取SQL信息

Returns

array

where()

where(string|array  $wh, string  $relation = 'AND', boolean  $isRaw = false) : $this

Parameters

string|array $wh
string $relation
boolean $isRaw

Returns

$this

orWhere()

orWhere(string|array  $wh, boolean  $isRaw = false) : \sR\db\Builder

Parameters

string|array $wh
boolean $isRaw

Returns

\sR\db\Builder

getTable()

getTable() : string

table 表名解析

Returns

string

getWhere()

getWhere() : string

Returns

string

getField()

getField() : string

Returns

string

_dataToBind()

_dataToBind(array  $data) : array

Parameters

array $data

Returns

array