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;
|
2020-06-19 04:03:04 +02:00
|
|
|
struct PinnableSlice;
|
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-12-10 23:04:30 +01:00
|
|
|
struct LogFile;
|
2018-12-24 22:32:22 +01:00
|
|
|
struct Status;
|
2018-01-24 00:30:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Misc utils
|
|
|
|
//
|
|
|
|
namespace ircd::db
|
|
|
|
{
|
2020-06-19 04:03:04 +02:00
|
|
|
// Forward slice suite; consider rocksdb::Slice similar to string_view
|
2018-01-24 00:30:48 +01:00
|
|
|
rocksdb::Slice slice(const string_view &);
|
|
|
|
string_view slice(const rocksdb::Slice &);
|
|
|
|
const char *data(const rocksdb::Slice &);
|
2020-06-19 04:03:04 +02:00
|
|
|
size_t size(const rocksdb::Slice &);
|
|
|
|
|
|
|
|
// Forward PinnableSlice suite; this inherits from Slice, but the forward
|
|
|
|
// interface doesn't know that here.
|
|
|
|
string_view slice(const rocksdb::PinnableSlice &);
|
|
|
|
const char *data(const rocksdb::PinnableSlice &);
|
|
|
|
size_t size(const rocksdb::PinnableSlice &);
|
2018-01-24 00:30:48 +01:00
|
|
|
|
2020-06-19 04:03:04 +02:00
|
|
|
// Iterator suite.
|
2018-01-24 00:30:48 +01:00
|
|
|
bool valid(const rocksdb::Iterator &);
|
|
|
|
string_view key(const rocksdb::Iterator &);
|
|
|
|
string_view val(const rocksdb::Iterator &);
|
|
|
|
}
|