Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
DBHelpers.hpp File Reference
#include "util/Assert.hpp"
#include <boost/container/flat_set.hpp>
#include <xrpl/basics/Blob.h>
#include <xrpl/basics/Log.h>
#include <xrpl/basics/StringUtilities.h>
#include <xrpl/basics/base_uint.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STAccount.h>
#include <xrpl/protocol/STLedgerEntry.h>
#include <xrpl/protocol/Serializer.h>
#include <xrpl/protocol/TxMeta.h>
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>
Include dependency graph for DBHelpers.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AccountTransactionsData
 Struct used to keep track of what to write to account_transactions/account_tx tables. More...
 
struct  NFTTransactionsData
 Represents a link from a tx to an NFT that was targeted/modified/created by it. More...
 
struct  NFTsData
 Represents an NFT state at a particular ledger. More...
 
struct  MPTHolderData
 Represents an MPT and holder pair. More...
 

Functions

template<typename T >
bool isOffer (T const &object)
 Check whether the supplied object is an offer.
 
template<typename T >
bool isOfferHex (T const &object)
 Check whether the supplied hex represents an offer object.
 
template<typename T >
bool isDirNode (T const &object)
 Check whether the supplied object is a dir node.
 
template<typename T , typename R >
bool isBookDir (T const &key, R const &object)
 Check whether the supplied object is a book dir.
 
template<typename T >
ripple::uint256 getBook (T const &offer)
 Get the book out of an offer object.
 
template<typename T >
ripple::uint256 getBookBase (T const &key)
 Get the book base.
 
std::string uint256ToString (ripple::uint256 const &input)
 Stringify a ripple::uint256.
 

Variables

static constexpr std::uint32_t kRIPPLE_EPOCH_START = 946684800
 The ripple epoch start timestamp. Midnight on 1st January 2000.
 

Function Documentation

◆ getBook()

template<typename T >
ripple::uint256 getBook ( T const & offer)
inline

Get the book out of an offer object.

Parameters
offerThe offer to get the book for
Returns
Book as ripple::uint256

◆ getBookBase()

template<typename T >
ripple::uint256 getBookBase ( T const & key)
inline

Get the book base.

Parameters
keyThe key to get the book base out of
Returns
Book base as ripple::uint256

◆ isBookDir()

template<typename T , typename R >
bool isBookDir ( T const & key,
R const & object )
inline

Check whether the supplied object is a book dir.

Parameters
keyThe key into the object
objectThe object to check
Returns
true if the object is a book dir; false otherwise

◆ isDirNode()

template<typename T >
bool isDirNode ( T const & object)
inline

Check whether the supplied object is a dir node.

Parameters
objectThe object to check
Returns
true if the object is a dir node; false otherwise

◆ isOffer()

template<typename T >
bool isOffer ( T const & object)
inline

Check whether the supplied object is an offer.

Parameters
objectThe object to check
Returns
true if the object is an offer; false otherwise

◆ isOfferHex()

template<typename T >
bool isOfferHex ( T const & object)
inline

Check whether the supplied hex represents an offer object.

Parameters
objectThe object to check
Returns
true if the object is an offer; false otherwise

◆ uint256ToString()

std::string uint256ToString ( ripple::uint256 const & input)
inline

Stringify a ripple::uint256.

Parameters
inputThe input value
Returns
The input value as a string