MongoDB\Model\IndexInfo::isUnique()
定义
返回值
一个布尔值,表示索引是否是唯一索引。
示例
$info = new IndexInfo([ 'unique' => true, ]); var_dump($info->isUnique());
输出结果将类似于
bool(true)
另请参阅
listIndexes 命令参考,请参阅 MongoDB 手册
唯一索引,请参阅 MongoDB 手册
一个布尔值,表示索引是否是唯一索引。
$info = new IndexInfo([ 'unique' => true, ]); var_dump($info->isUnique());
输出结果将类似于
bool(true)
listIndexes 命令参考,请参阅 MongoDB 手册
唯一索引,请参阅 MongoDB 手册