mirror of
https://github.com/matrix-construct/construct
synced 2024-11-18 07:50:57 +01:00
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
// 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;
|
|
struct Checkpoint;
|
|
struct SstFileManager;
|
|
}
|
|
|
|
//
|
|
// 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 &);
|
|
}
|