「SequoiaDB巨杉数据库」getIndex()

语法

db.collectionspace.collection.getIndex(<name>)

获取当前集合中指定的索引信息。

参数描述

Note:

  • 索引名必须在集合中存在。
  • 索引名不能是空串,含点(.)或者美元符号($),且长度不超过127B。

返回值

返回指定索引的引用,类型为object。

错误

错误码

示例

  • 返回集合 employee 下名为 ageIndex 索引的引用,假设 ageIndex 已存在。

    db.sample.employee.getIndex( "ageIndex" )

    点击巨杉数据库文档中心了解更多信息

猜你喜欢

转载自blog.csdn.net/weixin_45890253/article/details/112937964