fork of https://github.com/oxigraph/rocksdb and https://github.com/facebook/rocksdb for nextgraph and oxigraph
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.8 KiB
64 lines
1.8 KiB
7 years ago
|
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
|
||
|
// This source code is licensed under both the GPLv2 (found in the
|
||
|
// COPYING file in the root directory) and Apache 2.0 License
|
||
|
// (found in the LICENSE.Apache file in the root directory).
|
||
|
|
||
|
#ifndef ROCKSDB_LITE
|
||
|
|
||
7 years ago
|
#include "utilities/transactions/write_prepared_txn.h"
|
||
7 years ago
|
|
||
|
#include <map>
|
||
|
|
||
|
#include "db/column_family.h"
|
||
|
#include "db/db_impl.h"
|
||
|
#include "rocksdb/db.h"
|
||
|
#include "rocksdb/status.h"
|
||
|
#include "rocksdb/utilities/transaction_db.h"
|
||
7 years ago
|
#include "utilities/transactions/pessimistic_transaction_db.h"
|
||
7 years ago
|
#include "utilities/transactions/pessimistic_transaction.h"
|
||
7 years ago
|
|
||
|
namespace rocksdb {
|
||
|
|
||
|
struct WriteOptions;
|
||
|
|
||
7 years ago
|
WritePreparedTxn::WritePreparedTxn(
|
||
7 years ago
|
TransactionDB* txn_db, const WriteOptions& write_options,
|
||
|
const TransactionOptions& txn_options)
|
||
7 years ago
|
: PessimisticTransaction(txn_db, write_options, txn_options) {
|
||
|
PessimisticTransaction::Initialize(txn_options);
|
||
7 years ago
|
}
|
||
|
|
||
7 years ago
|
Status WritePreparedTxn::CommitBatch(WriteBatch* /* unused */) {
|
||
7 years ago
|
// TODO(myabandeh) Implement this
|
||
|
throw std::runtime_error("CommitBatch not Implemented");
|
||
|
return Status::OK();
|
||
|
}
|
||
|
|
||
7 years ago
|
Status WritePreparedTxn::PrepareInternal() {
|
||
7 years ago
|
// TODO(myabandeh) Implement this
|
||
|
throw std::runtime_error("Prepare not Implemented");
|
||
|
return Status::OK();
|
||
|
}
|
||
|
|
||
7 years ago
|
Status WritePreparedTxn::CommitWithoutPrepareInternal() {
|
||
7 years ago
|
// TODO(myabandeh) Implement this
|
||
|
throw std::runtime_error("Commit not Implemented");
|
||
|
return Status::OK();
|
||
|
}
|
||
|
|
||
7 years ago
|
Status WritePreparedTxn::CommitInternal() {
|
||
|
// TODO(myabandeh) Implement this
|
||
|
throw std::runtime_error("Commit not Implemented");
|
||
|
return Status::OK();
|
||
|
}
|
||
|
|
||
|
Status WritePreparedTxn::Rollback() {
|
||
7 years ago
|
// TODO(myabandeh) Implement this
|
||
|
throw std::runtime_error("Rollback not Implemented");
|
||
|
return Status::OK();
|
||
|
}
|
||
|
|
||
|
} // namespace rocksdb
|
||
|
|
||
|
#endif // ROCKSDB_LITE
|