用途:指定接下来要操作的主键ID
依赖类:\x\Elasticsearch
方法名:id()
参数:
int|string $id
_id
值。
返回值:this
使用示例:
$Elasticsearch = new \x\Elasticsearch();
$Elasticsearch->table('shop')->id(1)
提示:在组件中,当设置了id
条件后,后续就算是设置了where
、limit
等条件都会被强行跳过。