diff options
author | Dwight <dmerriman@gmail.com> | 2009-01-26 17:23:45 -0500 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2009-01-26 17:23:45 -0500 |
commit | c85b113c662b084330dd8d9ca8d15ba96f09f53c (patch) | |
tree | b789006966cc9d7766eb9ff806eda6edc5b07902 /db/btree.h | |
parent | 92e897a62a6baa0ff25749831fbb94ef563eab41 (diff) | |
download | mongo-c85b113c662b084330dd8d9ca8d15ba96f09f53c.tar.gz |
check that _id is unique
Diffstat (limited to 'db/btree.h')
-rw-r--r-- | db/btree.h | 7 |
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); }; |