您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ updateObjects函数代码示例

51自学网 2021-06-03 09:14:00
  C++
这篇教程C++ updateObjects函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中updateObjects函数的典型用法代码示例。如果您正苦于以下问题:C++ updateObjects函数的具体用法?C++ updateObjects怎么用?C++ updateObjects使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了updateObjects函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: updateObjects

void gProjectCore::updateAllHost(const QString &host,const QString &dbName){    updateObjects(host,dbName,GDB_P);    updateObjects(host,dbName,GDB_F);    updateObjects(host,dbName,GDB_T);    updateObjects(host,dbName,GDB_V);}
开发者ID:nastvood,项目名称:gammasqlgit,代码行数:7,


示例2: applyOperation_inlock

    /** @param fromRepl false if from ApplyOpsCmd        @return true if was and update should have happened and the document DNE.  see replset initial sync code.     */    bool applyOperation_inlock(const BSONObj& op, bool fromRepl, bool convertUpdateToUpsert) {        LOG(6) << "applying op: " << op << endl;        bool failedUpdate = false;        OpCounters * opCounters = fromRepl ? &replOpCounters : &globalOpCounters;        const char *names[] = { "o", "ns", "op", "b" };        BSONElement fields[4];        op.getFields(4, names, fields);        BSONObj o;        if( fields[0].isABSONObj() )            o = fields[0].embeddedObject();                    const char *ns = fields[1].valuestrsafe();        Lock::assertWriteLocked(ns);        NamespaceDetails *nsd = nsdetails(ns);        // operation type -- see logOp() comments for types        const char *opType = fields[2].valuestrsafe();        if ( *opType == 'i' ) {            opCounters->gotInsert();            const char *p = strchr(ns, '.');            if ( p && strcmp(p, ".system.indexes") == 0 ) {                // updates aren't allowed for indexes -- so we will do a regular insert. if index already                // exists, that is ok.                theDataFileMgr.insert(ns, (void*) o.objdata(), o.objsize());            }            else {                // do upserts for inserts as we might get replayed more than once                OpDebug debug;                BSONElement _id;                if( !o.getObjectID(_id) ) {                    /* No _id.  This will be very slow. */                    Timer t;                    updateObjects(ns, o, o, true, false, false, debug, false,                                  QueryPlanSelectionPolicy::idElseNatural() );                    if( t.millis() >= 2 ) {                        RARELY OCCASIONALLY log() << "warning, repl doing slow updates (no _id field) for " << ns << endl;                    }                }                else {                    // probably don't need this since all replicated colls have _id indexes now                    // but keep it just in case                    RARELY if ( nsd && !nsd->isCapped() ) { ensureHaveIdIndex(ns); }                    /* todo : it may be better to do an insert here, and then catch the dup key exception and do update                              then.  very few upserts will not be inserts...                              */                    BSONObjBuilder b;                    b.append(_id);                    updateObjects(ns, o, b.done(), true, false, false , debug, false,                                  QueryPlanSelectionPolicy::idElseNatural() );                }            }        }
开发者ID:muchenshou,项目名称:mongo,代码行数:63,


示例3: testTheDb

    void testTheDb() {        stringstream ss;        setClient("sys.unittest.pdfile");        /* this is not validly formatted, if you query this namespace bad things will happen */        theDataFileMgr.insert("sys.unittest.pdfile", (void *) "hello worldx", 13);        theDataFileMgr.insert("sys.unittest.pdfile", (void *) "hello worldx", 13);        BSONObj j1((const char *) &js1);        deleteObjects("sys.unittest.delete", j1, false);        theDataFileMgr.insert("sys.unittest.delete", &js1, sizeof(js1));        deleteObjects("sys.unittest.delete", j1, false);        updateObjects("sys.unittest.delete", j1, j1, true,ss);        updateObjects("sys.unittest.delete", j1, j1, false,ss);        auto_ptr<Cursor> c = theDataFileMgr.findAll("sys.unittest.pdfile");        while ( c->ok() ) {            c->_current();            c->advance();        }        out() << endl;        database = 0;    }
开发者ID:zhuk,项目名称:mongo,代码行数:25,


示例4: applyOperation_inlock

/** @param fromRepl false if from ApplyOpsCmd    @return true if was and update should have happened and the document DNE.  see replset initial sync code. */bool applyOperation_inlock(const BSONObj& op , bool fromRepl ) {    assertInWriteLock();    LOG(6) << "applying op: " << op << endl;    bool failedUpdate = false;    OpCounters * opCounters = fromRepl ? &replOpCounters : &globalOpCounters;    const char *names[] = { "o", "ns", "op", "b" };    BSONElement fields[4];    op.getFields(4, names, fields);    BSONObj o;    if( fields[0].isABSONObj() )        o = fields[0].embeddedObject();    const char *ns = fields[1].valuestrsafe();    NamespaceDetails *nsd = nsdetails(ns);    // operation type -- see logOp() comments for types    const char *opType = fields[2].valuestrsafe();    if ( *opType == 'i' ) {        opCounters->gotInsert();        const char *p = strchr(ns, '.');        if ( p && strcmp(p, ".system.indexes") == 0 ) {            // updates aren't allowed for indexes -- so we will do a regular insert. if index already            // exists, that is ok.            theDataFileMgr.insert(ns, (void*) o.objdata(), o.objsize());        }        else {            // do upserts for inserts as we might get replayed more than once            OpDebug debug;            BSONElement _id;            if( !o.getObjectID(_id) ) {                /* No _id.  This will be very slow. */                Timer t;                updateObjects(ns, o, o, true, false, false, debug );                if( t.millis() >= 2 ) {                    RARELY OCCASIONALLY log() << "warning, repl doing slow updates (no _id field) for " << ns << endl;                }            }            else {                /* erh 10/16/2009 - this is probably not relevant any more since its auto-created, but not worth removing */                RARELY if (nsd && !nsd->capped) {                    ensureHaveIdIndex(ns);    // otherwise updates will be slow                }                /* todo : it may be better to do an insert here, and then catch the dup key exception and do update                          then.  very few upserts will not be inserts...                          */                BSONObjBuilder b;                b.append(_id);                updateObjects(ns, o, b.done(), true, false, false , debug );            }        }    }
开发者ID:nosh,项目名称:mongo,代码行数:60,


示例5: CVector3

bool CScenePlay::SequenceMain(CCommand &command){	CVector3 pos = Player->getCamera()->getEye();	TimeupLogo->Position = CVector3(pos.x * 1.5f, pos.y, pos.z * 1.5f);	TimeupLogo->qRotation = Player->getFrontRotation();		// ゲ
C++ updatePID函数代码示例
C++ updateObject函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。