diff options
Diffstat (limited to 'db/namespace.h')
-rw-r--r-- | db/namespace.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/namespace.h b/db/namespace.h index 7f7fac876c3..0469e128f5d 100644 --- a/db/namespace.h +++ b/db/namespace.h @@ -93,6 +93,19 @@ public: return s; } + string indexName() { // e.g. "ts_1" + JSObj io = info.obj(); + return io.getStringField("name"); + } + + /* gets not our namespace name (indexNamespace for that), + but the collection we index, its name. + */ + string parentNS() { + JSObj io = info.obj(); + return io.getStringField("ns"); + } + /* delete this index. does NOT celan up the system catalog (system.indexes or system.namespaces) -- only NamespaceIndex. */ |