정의
MongoDB\Model\IndexInfo::isUnique()Return whether the index is a unique index. This correlates with the
uniqueoption forMongoDB\Collection::createIndex().function isUnique(): boolean
Return Values
인덱스가 고유 인덱스인지 여부를 나타내는 부울입니다.
예시
$info = new IndexInfo([ 'unique' => true, ]); var_dump($info->isUnique());
이 경우 출력은 다음과 유사합니다:
bool(true)
다음도 참조하세요.
MongoDB 매뉴얼의 listIndexes 명령 참조
MongoDB 매뉴얼의 고유 인덱스