mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-27 23:25:53 +00:00
remove books table from postgres
This commit is contained in:
@@ -841,15 +841,6 @@ create table if not exists account_transactions5 partition of account_transactio
|
||||
create table if not exists account_transactions6 partition of account_transactions for values from (50000000) to (60000000);
|
||||
create table if not exists account_transactions7 partition of account_transactions for values from (60000000) to (70000000);
|
||||
|
||||
-- Table that maps a book to a list of offers in that book. Deletes from the ledger table
|
||||
-- cascade here based on ledger_seq.
|
||||
CREATE TABLE IF NOT EXISTS books (
|
||||
ledger_seq bigint NOT NULL,
|
||||
book bytea NOT NULL,
|
||||
offer_key bytea NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX book_idx ON books using btree(ledger_seq, book, offer_key);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS keys (
|
||||
ledger_seq bigint NOT NULL,
|
||||
|
||||
@@ -643,9 +643,6 @@ PostgresBackend::doFinishWrites() const
|
||||
std::string keysStr = keysBuffer_.str();
|
||||
if (keysStr.size())
|
||||
writeConnection_.bulkInsert("keys", keysStr);
|
||||
std::string booksStr = booksBuffer_.str();
|
||||
if (booksStr.size())
|
||||
writeConnection_.bulkInsert("books", booksStr);
|
||||
}
|
||||
auto res = writeConnection_("COMMIT");
|
||||
if (!res || res.status() != PGRES_COMMAND_OK)
|
||||
@@ -658,8 +655,6 @@ PostgresBackend::doFinishWrites() const
|
||||
transactionsBuffer_.clear();
|
||||
objectsBuffer_.str("");
|
||||
objectsBuffer_.clear();
|
||||
booksBuffer_.str("");
|
||||
booksBuffer_.clear();
|
||||
keysBuffer_.str("");
|
||||
keysBuffer_.clear();
|
||||
accountTxBuffer_.str("");
|
||||
|
||||
@@ -9,7 +9,6 @@ class PostgresBackend : public BackendInterface
|
||||
private:
|
||||
mutable size_t numRowsInObjectsBuffer_ = 0;
|
||||
mutable std::stringstream objectsBuffer_;
|
||||
mutable std::stringstream booksBuffer_;
|
||||
mutable std::stringstream keysBuffer_;
|
||||
mutable std::stringstream transactionsBuffer_;
|
||||
mutable std::stringstream accountTxBuffer_;
|
||||
|
||||
Reference in New Issue
Block a user