当前位置: 首页>>代码示例>>C++>>正文


C++ LedgerDelta::deleteEntry方法代码示例

本文整理汇总了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);
}
开发者ID:soitun,项目名称:stellar-core,代码行数:27,代码来源:AccountFrame.cpp

示例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);
}
开发者ID:themusicgod1,项目名称:stellar-core,代码行数:10,代码来源:OfferFrame.cpp

示例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);
}
开发者ID:tctx,项目名称:network,代码行数:11,代码来源:OfferFrame.cpp

示例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);
}
开发者ID:nimpte,项目名称:stellar-core,代码行数:15,代码来源:TrustFrame.cpp

示例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);
}
开发者ID:themusicgod1,项目名称:stellar-core,代码行数:20,代码来源:AccountFrame.cpp


注:本文中的LedgerDelta::deleteEntry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。