diff options
Diffstat (limited to 'db/namespace.h')
-rw-r--r-- | db/namespace.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/db/namespace.h b/db/namespace.h index d70ae6db3af..0469e128f5d 100644 --- a/db/namespace.h +++ b/db/namespace.h @@ -1,5 +1,21 @@ // namespace.h +/** +* Copyright (C) 2008 10gen Inc. +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License, version 3, +* as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + #pragma once #include "../util/hashtab.h" @@ -77,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. */ |