Storage Engine API
key.cpp File Reference
#include "mongo/db/storage/mmap_v1/btree/key.h"
#include <cmath>
#include "mongo/base/data_type_endian.h"
#include "mongo/base/data_view.h"
#include "mongo/bson/simple_bsonobj_comparator.h"
#include "mongo/bson/util/builder.h"
#include "mongo/util/log.h"
#include "mongo/util/startup_test.h"

Classes

struct  mongo::CmpUnitTest
 

Namespaces

 mongo
 Copyright (C) 2014 MongoDB Inc.
 

Macros

#define MONGO_LOG_DEFAULT_COMPONENT   ::mongo::logger::LogComponent::kStorage
 Copyright (C) 2011 10gen Inc. More...
 

Enumerations

enum  mongo::CanonicalsEtc {
  mongo::cminkey = 1, mongo::cnull = 2, mongo::cdouble = 4, mongo::cstring = 6,
  mongo::cbindata = 7, mongo::coid = 8, mongo::cfalse = 10, mongo::ctrue = 11,
  mongo::cdate = 12, mongo::cmaxkey = 14, mongo::cCANONTYPEMASK = 0xf, mongo::cY = 0x10,
  mongo::cint = cY | cdouble, mongo::cX = 0x20, mongo::clong = cX | cdouble, mongo::cHASMORE = 0x40,
  mongo::cNOTUSED = 0x80
}
 

Functions

int mongo::oldCompare (const BSONObj &l, const BSONObj &r, const Ordering &o)
 
int mongo::oldCompareElementValues (const BSONElement &l, const BSONElement &r)
 
int mongo::oldElemCompare (const BSONElement &l, const BSONElement &r)
 
int mongo::binDataCodeToLength (int codeByte)
 
static int mongo::compare (const unsigned char *&l, const unsigned char *&r)
 
unsigned mongo::sizeOfElement (const unsigned char *p)
 

Variables

const Ordering mongo::nullOrdering = Ordering::make(BSONObj())
 
const unsigned mongo::BinDataLenMask = 0xf0
 
const unsigned mongo::BinDataTypeMask
 
const int mongo::BinDataLenMax = 32
 
const int mongo::BinDataLengthToCode []
 
const int mongo::BinDataCodeToLength [] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 32}
 
static unsigned mongo::sizes []
 
mongo::CmpUnitTest mongo::cunittest
 

Macro Definition Documentation

◆ MONGO_LOG_DEFAULT_COMPONENT

#define MONGO_LOG_DEFAULT_COMPONENT   ::mongo::logger::LogComponent::kStorage

Copyright (C) 2011 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/.

As a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library under certain conditions as described in each individual source file and distribute linked combinations including the program with the OpenSSL library. You must comply with the GNU Affero General Public License in all respects for all of the code used other than as permitted herein. If you modify file(s) with this exception, you may extend this exception to your version of the file(s), but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. If you delete this exception statement from all source files in the program, then also delete it in the license file.