2018-01-24 00:30:48 +01:00
|
|
|
// Matrix Construct
|
|
|
|
//
|
|
|
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
|
|
|
// Copyright (C) 2016-2018 Jason Volk <jason@zemos.net>
|
|
|
|
//
|
|
|
|
// Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
// purpose with or without fee is hereby granted, provided that the above
|
|
|
|
// copyright notice and this permission notice is present in all copies. The
|
|
|
|
// full license for this software is available in the LICENSE file.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#define HAVE_IRCD_DB_DATABASE_ROCKSDB_H
|
|
|
|
|
|
|
|
/// Forward declarations for rocksdb because we do not include it here.
|
|
|
|
///
|
|
|
|
/// These are forward declarations to objects we may carry a pointer to.
|
|
|
|
/// Users of ircd::db should not have to deal directly with these types.
|
|
|
|
///
|
|
|
|
namespace rocksdb
|
|
|
|
{
|
|
|
|
struct DB;
|
|
|
|
struct Cache;
|
|
|
|
struct Options;
|
|
|
|
struct DBOptions;
|
|
|
|
struct ColumnFamilyOptions;
|
|
|
|
struct PlainTableOptions;
|
|
|
|
struct BlockBasedTableOptions;
|
|
|
|
struct Iterator;
|
|
|
|
struct ColumnFamilyHandle;
|
|
|
|
struct WriteBatch;
|
|
|
|
struct Slice;
|
2018-03-23 03:56:08 +01:00
|
|
|
struct Checkpoint;
|
2018-04-21 00:45:57 +02:00
|
|
|
struct SstFileManager;
|
2018-05-24 01:27:44 +02:00
|
|
|
struct PerfContext;
|
2018-05-24 01:57:49 +02:00
|
|
|
struct IOStatsContext;
|
2018-09-21 00:57:15 +02:00
|
|
|
struct LiveFileMetaData;
|
2018-09-25 07:26:44 +02:00
|
|
|
struct SstFileMetaData;
|
2018-09-22 23:24:15 +02:00
|
|
|
struct SstFileWriter;
|
2018-10-21 18:15:44 +02:00
|
|
|
struct TableProperties;
|
2018-01-24 00:30:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Misc utils
|
|
|
|
//
|
|
|
|
namespace ircd::db
|
|
|
|
{
|
|
|
|
rocksdb::Slice slice(const string_view &);
|
|
|
|
string_view slice(const rocksdb::Slice &);
|
|
|
|
size_t size(const rocksdb::Slice &);
|
|
|
|
const char *data(const rocksdb::Slice &);
|
|
|
|
|
|
|
|
bool valid(const rocksdb::Iterator &);
|
|
|
|
string_view key(const rocksdb::Iterator &);
|
|
|
|
string_view val(const rocksdb::Iterator &);
|
|
|
|
}
|