Метод |
Описание |
|
__construct ( array $config = '' ) |
架构函数 读取数据库配置信息 |
|
clear ( array $options = [] ) : false | integer |
清空记录 |
|
close ( ) |
关闭数据库 |
|
command ( array $command = [] ) : array |
执行命令 |
|
connect ( $config = '', $linkNum ) |
连接数据库方法 |
|
count ( array $options = [] ) : iterator |
统计记录数 |
|
delete ( array $options = [] ) : false | integer |
删除记录 |
|
error ( ) : string |
数据库错误信息 |
|
execute ( string $code, array $args = [] ) : mixed |
执行语句 |
|
find ( array $options = [] ) : array |
查找某个记录 |
|
free ( ) |
释放查询结果 |
|
getFields ( $collection = '' ) : array |
取得数据表的字段信息 |
|
getTables ( ) |
取得当前数据库的collection信息 |
|
group ( $keys, $initial, $reduce, $options = [] ) |
|
|
insert ( mixed $data, array $options = [], boolean $replace = false ) : false | integer |
插入记录 |
|
insertAll ( array $dataList, array $options = [] ) : boolean |
插入多条记录 |
|
mongo_next_id ( string $pk ) : integer |
生成下一条记录ID 用于自增非MongoId主键 |
|
parseField ( mixed $fields ) : array |
field分析 |
|
parseWhere ( mixed $where ) : array |
where分析 |
|
select ( array $options = [] ) : iterator |
查找记录 |
|
switchCollection ( string $collection, string $db = '', boolean $master = true ) : void |
切换当前操作的Db和Collection |
|
update ( mixed $data, array $options ) : boolean |
更新记录 |
|