libmoost
|
#include <cstdlib>
#include <cstring>
#include <stdexcept>
#include <sstream>
#include <limits>
#include <db_cxx.h>
#include <boost/shared_ptr.hpp>
#include "../../compiler/attributes/unused.hpp"
#include "../ikvds.hpp"
Go to the source code of this file.
Classes | |
struct | moost::kvds::ScopedFree< T > |
struct | moost::kvds::ConstDbt |
User defined data that must NEVER be modified! More... | |
struct | moost::kvds::UsermemDbt |
User defined data that may be modified! More... | |
struct | moost::kvds::MallocDbt |
Dbd allocated memory that must be released. More... | |
class | moost::kvds::KvdsBdb< dbtypeT > |
*** This class is NOT thread safe *** More... | |
Namespaces | |
namespace | moost |
Creates a unique temporary directory; removed on scope exit. | |
namespace | moost::kvds |
Defines | |
#define | KVDSDBDX__(rval, cmd) |
Typedefs | |
typedef std::vector< char > | moost::kvds::byte_array_t |
typedef KvdsBdb< DB_HASH > | moost::kvds::KvdsBht |
This is a mock class since dbd isn't supported on Windows (yet) | |
typedef KvdsBdb< DB_BTREE > | moost::kvds::KvdsBbt |
Berkeley DB Hash Table. |
Copyright © 2008-2013 Last.fm Limited
This file is part of libmoost.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Berkeley DB Hash Table API reference http:///www.oracle.com/technology/documentation/berkeley-db/db/index.html
Windows version download http:///www.oracle.com/technology/software/products/berkeley-db/db/index.html
Definition in file kvds_bdb_linux.hpp.
#define KVDSDBDX__ | ( | rval, | |
cmd | |||
) |
try \ { \ rval = cmd; \ } \ catch(DbException const & e) \ { \ rval = e.get_errno(); \ }
Depending on how it was built DBD can either return an error code or throw a DbException object. To ensure we can handle both all calls to the DBD engine are wrapped in this macro. The macro wil always simulate return value semantics.
Definition at line 56 of file kvds_bdb_linux.hpp.