20 #include <ripple/app/main/Application.h>
21 #include <ripple/app/misc/Transaction.h>
22 #include <ripple/core/DatabaseCon.h>
23 #include <ripple/core/SociDB.h>
24 #include <ripple/net/RPCErr.h>
25 #include <ripple/protocol/ErrorCodes.h>
26 #include <ripple/protocol/jss.h>
27 #include <ripple/resource/Fees.h>
28 #include <ripple/rpc/Context.h>
29 #include <ripple/rpc/Role.h>
30 #include <boost/format.hpp>
44 unsigned int startIndex = context.
params[jss::start].
asUInt ();
52 obj[jss::index] = startIndex;
55 boost::str (boost::format (
56 "SELECT LedgerSeq, Status, RawTxn "
57 "FROM Transactions ORDER BY LedgerSeq desc LIMIT %u,20;")
63 boost::optional<std::uint64_t> ledgerSeq;
64 boost::optional<std::string> status;
65 soci::blob sociRawTxnBlob (*db);
69 soci::statement st = (db->prepare << sql,
70 soci::into (ledgerSeq),
72 soci::into (sociRawTxnBlob, rti));
77 if (soci::i_ok == rti)
78 convert(sociRawTxnBlob, rawTxn);
83 ledgerSeq, status, rawTxn, context.
app))