• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Error

            C++博客 首頁 新隨筆 聯系 聚合 管理
              217 Posts :: 61 Stories :: 32 Comments :: 0 Trackbacks

             

            ///////////////////////////////////////////////////////////////////////////////////////////

            實在是沒看出來這樣有什么優勢,為了記錄是否走過某個path?

            Query::execute(const SQLString& str)這里看到了遞歸操作,難道是為了輔助遞歸?

            總感覺這里越搞越復雜,,,

            ///////////////////////////////////////////////////////////////////////////////////////////

            /// \brief A template for setting a flag on a variable as long as the
            /// object that set it is in scope.  Flag resets when object goes
            /// out of scope.  Works on anything that looks like bool.

            template <class T = bool>
            class AutoFlag
            {
            public:
                /// \brief Constructor: sets ref to true.
                AutoFlag(T& ref) :
                referent_(ref)
                {
                    referent_ = true;
                }

                /// \brief Destructor: sets referent passed to ctor to false.
                ~AutoFlag()
                {
                    referent_ = false;
                }

            private:
                T& referent_;
            };

             

            ///////////////////////////////////////////////////////////////////////////////////////////

            ResNSel
            Query::execute(const SQLString& str)
            {
                if ((def.size() == 1) && !def.processing_) {
                    // .  The
                    // auto-reset flag is required because we'll end up back in this
                    // function once the query string is built, but we need to take
                    // the 'else' path to avoid an infinite loop.
                    AutoFlag<> af(def.processing_);
                    return execute(SQLQueryParms() << str);
                }
                else {
                    // Take str to be the entire query string
                    return execute(str.c_str(), str.length());
                }
            }

            ResNSel
            Query::execute(const char* str)
            {
                return execute(SQLString(str));
            }

            ResNSel
            Query::execute(const char* str, size_t len)
            {
                if (lock()) {
                    success_ = false;
                    if (throw_exceptions()) {
                        throw LockFailed();
                    }
                    else {
                        return ResNSel();
                    }
                }

                success_ = !mysql_real_query(&conn_->mysql_, str, len);

                unlock();
                if (success_) {
                    return ResNSel(conn_);
                }
                else if (throw_exceptions()) {
                    throw BadQuery(error());
                }
                else {
                    return ResNSel();
                }
            }

            posted on 2012-10-08 11:51 Enic 閱讀(117) 評論(0)  編輯 收藏 引用
            久久精品九九亚洲精品| 色综合久久天天综合| 一日本道伊人久久综合影| 久久精品国产亚洲精品| 2021国产精品午夜久久| 久久国产精品成人片免费| 久久996热精品xxxx| 伊人久久综合成人网| 久久青青草原精品影院| 久久久精品国产免大香伊 | 久久久www免费人成精品| 人妻少妇久久中文字幕一区二区 | 久久久久亚洲av成人无码电影 | 热久久国产精品| 久久精品国产亚洲AV不卡| 久久亚洲国产午夜精品理论片| 久久久久久免费视频| 久久免费高清视频| 72种姿势欧美久久久久大黄蕉| 久久99精品国产麻豆不卡| 99精品国产在热久久无毒不卡| 婷婷国产天堂久久综合五月| 亚洲国产精品久久久久| 亚洲精品无码专区久久久| 色婷婷狠狠久久综合五月| 久久国产成人亚洲精品影院| 91精品国产色综合久久| 亚洲国产精品无码久久久蜜芽| 一97日本道伊人久久综合影院| 国产亚洲精久久久久久无码AV| 1000部精品久久久久久久久| 久久精品无码专区免费青青| 亚洲香蕉网久久综合影视| 少妇人妻综合久久中文字幕| 亚洲综合久久夜AV | 亚洲伊人久久综合影院| 无码人妻久久一区二区三区蜜桃 | 日日噜噜夜夜狠狠久久丁香五月| 久久久无码精品亚洲日韩京东传媒| 亚洲精品无码久久久| 久久无码AV一区二区三区|