summaryrefslogtreecommitdiff
path: root/db/btree.h
diff options
context:
space:
mode:
authorDwight <dmerriman@gmail.com>2009-01-26 17:23:45 -0500
committerDwight <dmerriman@gmail.com>2009-01-26 17:23:45 -0500
commitc85b113c662b084330dd8d9ca8d15ba96f09f53c (patch)
treeb789006966cc9d7766eb9ff806eda6edc5b07902 /db/btree.h
parent92e897a62a6baa0ff25749831fbb94ef563eab41 (diff)
downloadmongo-c85b113c662b084330dd8d9ca8d15ba96f09f53c.tar.gz
check that _id is unique
Diffstat (limited to 'db/btree.h')
-rw-r--r--db/btree.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/db/btree.h b/db/btree.h
index 75896f8aac3..bae95f8e167 100644
--- a/db/btree.h
+++ b/db/btree.h
@@ -159,9 +159,10 @@ namespace mongo {
void dump();
static DiskLoc addHead(IndexDetails&); /* start a new index off, empty */
- int insert(DiskLoc thisLoc, DiskLoc recordLoc,
+
+ int bt_insert(DiskLoc thisLoc, DiskLoc recordLoc,
BSONObj& key, const BSONObj &order, bool dupsAllowed,
- IndexDetails& idx, bool toplevel);
+ IndexDetails& idx, bool toplevel = true);
bool unindex(const DiskLoc& thisLoc, IndexDetails& id, BSONObj& key, const DiskLoc& recordLoc);
@@ -190,7 +191,7 @@ namespace mongo {
int _insert(DiskLoc thisLoc, DiskLoc recordLoc,
BSONObj& key, const BSONObj &order, bool dupsAllowed,
DiskLoc lChild, DiskLoc rChild, IndexDetails&);
- bool find(BSONObj& key, DiskLoc recordLoc, const BSONObj &order, int& pos);
+ bool find(BSONObj& key, DiskLoc recordLoc, const BSONObj &order, int& pos, bool assertIfDup);
static void findLargestKey(const DiskLoc& thisLoc, DiskLoc& largestLoc, int& largestKey);
};