mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Summary: In addition to implementing OpenWithColumnFamilies, this diff also includes some minor changes: * Changed all column family names from Slice() to std::string. The performance of column family name handling is not critical, and it's more convenient and cleaner to have names as std::strings * Implemented ColumnFamilyOptions(const Options&) and DBOptions(const Options&) * Added ColumnFamilyOptions to VersionSet::ColumnFamilyData. ColumnFamilyOptions are specified on OpenWithColumnFamilies() and CreateColumnFamily() I will keep the diff in the Phabricator for a day or two and will push to the branch then. Feel free to comment even after the diff has been pushed. Test Plan: Added a simple unit test Reviewers: dhruba, haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D15033
32 lines
1.1 KiB
C++
32 lines
1.1 KiB
C++
// Copyright (c) 2013, Facebook, Inc. All rights reserved.
|
|
// This source code is licensed under the BSD-style license found in the
|
|
// LICENSE file in the root directory of this source tree. An additional grant
|
|
// of patent rights can be found in the PATENTS file in the same directory.
|
|
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
|
|
|
#pragma once
|
|
#include "rocksdb/slice.h"
|
|
|
|
namespace rocksdb {
|
|
|
|
// Column family's name is translated to ColumnFamilyHandle at DB open or column
|
|
// family open time. Clients use ColumnFamilyHandle to comunicate with the DB
|
|
//
|
|
// Column family names that start with "." (a dot) are system specific and
|
|
// should not be used by the clients
|
|
|
|
struct ColumnFamilyHandle {
|
|
uint32_t id;
|
|
// default
|
|
ColumnFamilyHandle() : id() {}
|
|
/* implicit */
|
|
ColumnFamilyHandle(uint32_t _id) : id(_id) {}
|
|
};
|
|
|
|
const ColumnFamilyHandle default_column_family = ColumnFamilyHandle();
|
|
extern const std::string default_column_family_name;
|
|
|
|
}
|