本文整理汇总了C++中LedgerDelta::deleteEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ LedgerDelta::deleteEntry方法的具体用法?C++ LedgerDelta::deleteEntry怎么用?C++ LedgerDelta::deleteEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LedgerDelta
的用法示例。
在下文中一共展示了LedgerDelta::deleteEntry方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: flushCachedEntry
void
AccountFrame::storeDelete(LedgerDelta& delta, Database& db,
LedgerKey const& key)
{
flushCachedEntry(key, db);
std::string actIDStrKey = PubKeyUtils::toStrKey(key.account().accountID);
{
auto timer = db.getDeleteTimer("account");
auto prep = db.getPreparedStatement(
"DELETE from accounts where accountid= :v1");
auto& st = prep.statement();
st.exchange(soci::use(actIDStrKey));
st.define_and_bind();
st.execute(true);
}
{
auto timer = db.getDeleteTimer("signer");
auto prep =
db.getPreparedStatement("DELETE from signers where accountid= :v1");
auto& st = prep.statement();
st.exchange(soci::use(actIDStrKey));
st.define_and_bind();
st.execute(true);
}
delta.deleteEntry(key);
}
示例2: use
void
OfferFrame::storeDelete(LedgerDelta& delta, Database& db, LedgerKey const& key)
{
auto timer = db.getDeleteTimer("offer");
db.getSession() << "DELETE FROM offers WHERE offerid=:s",
use(key.offer().offerID);
delta.deleteEntry(key);
}
示例3:
void
OfferFrame::storeDelete(LedgerDelta& delta, Database& db, LedgerKey const& key)
{
auto timer = db.getDeleteTimer("offer");
auto prep = db.getPreparedStatement("DELETE FROM offers WHERE offerid=:s");
auto& st = prep.statement();
st.exchange(use(key.offer().offerID));
st.define_and_bind();
st.execute(true);
delta.deleteEntry(key);
}
示例4: flushCachedEntry
void
TrustFrame::storeDelete(LedgerDelta& delta, Database& db, LedgerKey const& key)
{
flushCachedEntry(key, db);
std::string actIDStrKey, issuerStrKey, assetCode;
getKeyFields(key, actIDStrKey, issuerStrKey, assetCode);
auto timer = db.getDeleteTimer("trust");
db.getSession() << "DELETE FROM trustlines "
"WHERE accountid=:v1 AND issuer=:v2 AND assetcode=:v3",
use(actIDStrKey), use(issuerStrKey), use(assetCode);
delta.deleteEntry(key);
}
示例5: flushCachedEntry
void
AccountFrame::storeDelete(LedgerDelta& delta, Database& db,
LedgerKey const& key)
{
flushCachedEntry(key, db);
std::string actIDStrKey = PubKeyUtils::toStrKey(key.account().accountID);
soci::session& session = db.getSession();
{
auto timer = db.getDeleteTimer("account");
session << "DELETE from accounts where accountid= :v1",
soci::use(actIDStrKey);
}
{
auto timer = db.getDeleteTimer("signer");
session << "DELETE from signers where accountid= :v1",
soci::use(actIDStrKey);
}
delta.deleteEntry(key);
}