mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 03:26:01 +00:00
Correct missing semicolons on sql statements
This commit is contained in:
@@ -122,7 +122,7 @@ public:
|
|||||||
// Check values in db
|
// Check values in db
|
||||||
std::vector<std::string> stringResult (20 * stringData.size ());
|
std::vector<std::string> stringResult (20 * stringData.size ());
|
||||||
std::vector<int> intResult (20 * intData.size ());
|
std::vector<int> intResult (20 * intData.size ());
|
||||||
s << "SELECT StringData, IntData FROM SociTestTable",
|
s << "SELECT StringData, IntData FROM SociTestTable;",
|
||||||
soci::into (stringResult), soci::into (intResult);
|
soci::into (stringResult), soci::into (intResult);
|
||||||
expect (stringResult.size () == stringData.size () &&
|
expect (stringResult.size () == stringData.size () &&
|
||||||
intResult.size () == intData.size ());
|
intResult.size () == intData.size ());
|
||||||
@@ -205,7 +205,7 @@ public:
|
|||||||
std::uint32_t uig = 0;
|
std::uint32_t uig = 0;
|
||||||
std::int64_t big = 0;
|
std::int64_t big = 0;
|
||||||
std::uint64_t ubig = 0;
|
std::uint64_t ubig = 0;
|
||||||
s << "SELECT I, UI, BI, UBI from STT", soci::into (ig),
|
s << "SELECT I, UI, BI, UBI from STT;", soci::into (ig),
|
||||||
soci::into (uig), soci::into (big), soci::into (ubig);
|
soci::into (uig), soci::into (big), soci::into (ubig);
|
||||||
expect (ig == id[0] && uig == uid[0] && big == bid[0] &&
|
expect (ig == id[0] && uig == uid[0] && big == bid[0] &&
|
||||||
ubig == ubid[0]);
|
ubig == ubid[0]);
|
||||||
@@ -220,7 +220,7 @@ public:
|
|||||||
boost::optional<std::uint32_t> uig;
|
boost::optional<std::uint32_t> uig;
|
||||||
boost::optional<std::int64_t> big;
|
boost::optional<std::int64_t> big;
|
||||||
boost::optional<std::uint64_t> ubig;
|
boost::optional<std::uint64_t> ubig;
|
||||||
s << "SELECT I, UI, BI, UBI from STT", soci::into (ig),
|
s << "SELECT I, UI, BI, UBI from STT;", soci::into (ig),
|
||||||
soci::into (uig), soci::into (big), soci::into (ubig);
|
soci::into (uig), soci::into (big), soci::into (ubig);
|
||||||
expect (*ig == id[0] && *uig == uid[0] && *big == bid[0] &&
|
expect (*ig == id[0] && *uig == uid[0] && *big == bid[0] &&
|
||||||
*ubig == ubid[0]);
|
*ubig == ubid[0]);
|
||||||
|
|||||||
@@ -366,10 +366,10 @@ public:
|
|||||||
auto db = getApp().getWalletDB ().checkoutDb ();
|
auto db = getApp().getWalletDB ().checkoutDb ();
|
||||||
|
|
||||||
*db << str (
|
*db << str (
|
||||||
boost::format ("DELETE FROM SeedNodes WHERE PublicKey=%s") %
|
boost::format ("DELETE FROM SeedNodes WHERE PublicKey=%s;") %
|
||||||
sqlEscape (naNodePublic.humanNodePublic ()));
|
sqlEscape (naNodePublic.humanNodePublic ()));
|
||||||
*db << str (
|
*db << str (
|
||||||
boost::format ("DELETE FROM TrustedNodes WHERE PublicKey=%s") %
|
boost::format ("DELETE FROM TrustedNodes WHERE PublicKey=%s;") %
|
||||||
sqlEscape (naNodePublic.humanNodePublic ()));
|
sqlEscape (naNodePublic.humanNodePublic ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -390,7 +390,7 @@ public:
|
|||||||
{
|
{
|
||||||
auto db = getApp().getWalletDB ().checkoutDb ();
|
auto db = getApp().getWalletDB ().checkoutDb ();
|
||||||
|
|
||||||
*db << str (boost::format ("DELETE FROM SeedDomains WHERE Domain=%s") % sqlEscape (strDomain));
|
*db << str (boost::format ("DELETE FROM SeedDomains WHERE Domain=%s;") % sqlEscape (strDomain));
|
||||||
}
|
}
|
||||||
|
|
||||||
// YYY Only dirty on successful delete.
|
// YYY Only dirty on successful delete.
|
||||||
@@ -404,8 +404,8 @@ public:
|
|||||||
{
|
{
|
||||||
auto db = getApp().getWalletDB ().checkoutDb ();
|
auto db = getApp().getWalletDB ().checkoutDb ();
|
||||||
|
|
||||||
*db << "DELETE FROM SeedDomains";
|
*db << "DELETE FROM SeedDomains;";
|
||||||
*db << "DELETE FROM SeedNodes";
|
*db << "DELETE FROM SeedNodes;";
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchDirty ();
|
fetchDirty ();
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
"SELECT "
|
"SELECT "
|
||||||
" address, "
|
" address, "
|
||||||
" valence "
|
" valence "
|
||||||
"FROM PeerFinder_BootstrapCache "
|
"FROM PeerFinder_BootstrapCache;"
|
||||||
, soci::into (s)
|
, soci::into (s)
|
||||||
, soci::into (valence)
|
, soci::into (valence)
|
||||||
);
|
);
|
||||||
@@ -103,7 +103,7 @@ public:
|
|||||||
{
|
{
|
||||||
soci::transaction tr (m_session);
|
soci::transaction tr (m_session);
|
||||||
m_session <<
|
m_session <<
|
||||||
"DELETE FROM PeerFinder_BootstrapCache";
|
"DELETE FROM PeerFinder_BootstrapCache;";
|
||||||
|
|
||||||
if (!v.empty ())
|
if (!v.empty ())
|
||||||
{
|
{
|
||||||
@@ -145,7 +145,7 @@ public:
|
|||||||
"SELECT "
|
"SELECT "
|
||||||
" version "
|
" version "
|
||||||
"FROM SchemaVersion WHERE "
|
"FROM SchemaVersion WHERE "
|
||||||
" name = 'PeerFinder'"
|
" name = 'PeerFinder';"
|
||||||
, soci::into (vO)
|
, soci::into (vO)
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ public:
|
|||||||
|
|
||||||
std::size_t count;
|
std::size_t count;
|
||||||
m_session <<
|
m_session <<
|
||||||
"SELECT COUNT(*) FROM PeerFinder_BootstrapCache "
|
"SELECT COUNT(*) FROM PeerFinder_BootstrapCache;"
|
||||||
, soci::into (count)
|
, soci::into (count)
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -203,7 +203,7 @@ public:
|
|||||||
"SELECT "
|
"SELECT "
|
||||||
" address, "
|
" address, "
|
||||||
" valence "
|
" valence "
|
||||||
"FROM PeerFinder_BootstrapCache "
|
"FROM PeerFinder_BootstrapCache;"
|
||||||
, soci::into (s)
|
, soci::into (s)
|
||||||
, soci::into (valence)
|
, soci::into (valence)
|
||||||
);
|
);
|
||||||
@@ -254,14 +254,14 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_session <<
|
m_session <<
|
||||||
"DROP TABLE IF EXISTS PeerFinder_BootstrapCache";
|
"DROP TABLE IF EXISTS PeerFinder_BootstrapCache;";
|
||||||
|
|
||||||
m_session <<
|
m_session <<
|
||||||
"DROP INDEX IF EXISTS PeerFinder_BootstrapCache_Index";
|
"DROP INDEX IF EXISTS PeerFinder_BootstrapCache_Index;";
|
||||||
|
|
||||||
m_session <<
|
m_session <<
|
||||||
"ALTER TABLE PeerFinder_BootstrapCache_Next "
|
"ALTER TABLE PeerFinder_BootstrapCache_Next "
|
||||||
" RENAME TO PeerFinder_BootstrapCache";
|
" RENAME TO PeerFinder_BootstrapCache;";
|
||||||
|
|
||||||
m_session <<
|
m_session <<
|
||||||
"CREATE INDEX IF NOT EXISTS "
|
"CREATE INDEX IF NOT EXISTS "
|
||||||
@@ -280,16 +280,16 @@ public:
|
|||||||
//
|
//
|
||||||
|
|
||||||
m_session <<
|
m_session <<
|
||||||
"DROP TABLE IF EXISTS LegacyEndpoints";
|
"DROP TABLE IF EXISTS LegacyEndpoints;";
|
||||||
|
|
||||||
m_session <<
|
m_session <<
|
||||||
"DROP TABLE IF EXISTS PeerFinderLegacyEndpoints";
|
"DROP TABLE IF EXISTS PeerFinderLegacyEndpoints;";
|
||||||
|
|
||||||
m_session <<
|
m_session <<
|
||||||
"DROP TABLE IF EXISTS PeerFinder_LegacyEndpoints";
|
"DROP TABLE IF EXISTS PeerFinder_LegacyEndpoints;";
|
||||||
|
|
||||||
m_session <<
|
m_session <<
|
||||||
"DROP TABLE IF EXISTS PeerFinder_LegacyEndpoints_Index";
|
"DROP TABLE IF EXISTS PeerFinder_LegacyEndpoints_Index;";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -300,7 +300,7 @@ public:
|
|||||||
" ,version "
|
" ,version "
|
||||||
") VALUES ( "
|
") VALUES ( "
|
||||||
" 'PeerFinder', :version "
|
" 'PeerFinder', :version "
|
||||||
")"
|
");"
|
||||||
, soci::use (version);
|
, soci::use (version);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -311,7 +311,7 @@ private:
|
|||||||
void init ()
|
void init ()
|
||||||
{
|
{
|
||||||
soci::transaction tr (m_session);
|
soci::transaction tr (m_session);
|
||||||
m_session << "PRAGMA encoding=\"UTF-8\"";
|
m_session << "PRAGMA encoding=\"UTF-8\";";
|
||||||
|
|
||||||
m_session <<
|
m_session <<
|
||||||
"CREATE TABLE IF NOT EXISTS SchemaVersion ( "
|
"CREATE TABLE IF NOT EXISTS SchemaVersion ( "
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ Json::Value doTxHistory (RPC::Context& context)
|
|||||||
std::string sql =
|
std::string sql =
|
||||||
boost::str (boost::format (
|
boost::str (boost::format (
|
||||||
"SELECT LedgerSeq, Status, RawTxn "
|
"SELECT LedgerSeq, Status, RawTxn "
|
||||||
"FROM Transactions ORDER BY LedgerSeq desc LIMIT %u,20")
|
"FROM Transactions ORDER BY LedgerSeq desc LIMIT %u,20;")
|
||||||
% startIndex);
|
% startIndex);
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user