コード例 #1
0
        // Begin a transaction
        internal static void sqlite3BeginTransaction(Parse pParse, Parser.TK type)
        {
            Debug.Assert(pParse != null);
            var db = pParse.db;

            Debug.Assert(db != null);
            if (sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, "BEGIN", null, null) != 0)
            {
                return;
            }
            var v = sqlite3GetVdbe(pParse);

            if (v == null)
            {
                return;
            }
            if (type != Parser.TK.DEFERRED)
            {
                for (var i = 0; i < db.nDb; i++)
                {
                    sqlite3VdbeAddOp2(v, OP_Transaction, i, type == Parser.TK.EXCLUSIVE ? 2 : 1);
                    sqlite3VdbeUsesBtree(v, i);
                }
            }
            sqlite3VdbeAddOp2(v, OP_AutoCommit, 0, 0);
        }
コード例 #2
0
ファイル: Expr.cs プロジェクト: smorey2/feaserver
        public ITable pZombieTab;     // List of Table objects to delete after code gen
#endif
        #endregion

        public void CopyFrom(Expr cf)
        {
            op              = cf.op;
            affinity        = cf.affinity;
            flags           = cf.flags;
            u               = cf.u;
            pColl           = (cf.pColl == null ? null : cf.pColl.Copy());
            iTable          = cf.iTable;
            iColumn         = cf.iColumn;
            pAggInfo        = (cf.pAggInfo == null ? null : cf.pAggInfo.Copy());
            iAgg            = cf.iAgg;
            iRightJoinTable = cf.iRightJoinTable;
            flags2          = cf.flags2;
            pTab            = (cf.pTab == null ? null : cf.pTab);
#if SQLITE_MAX_EXPR_DEPTH
            nHeight    = cf.nHeight;
            pZombieTab = cf.pZombieTab;
#endif
            pLeft     = (cf.pLeft == null ? null : cf.pLeft.Copy());
            pRight    = (cf.pRight == null ? null : cf.pRight.Copy());
            x.pList   = (cf.x.pList == null ? null : cf.x.pList.Copy());
            x.pSelect = (cf.x.pSelect == null ? null : cf.x.pSelect.Copy());
        }
コード例 #3
0
ファイル: Expr.cs プロジェクト: JiujiangZhu/feaserver
        public ITable pZombieTab;      // List of Table objects to delete after code gen
#endif
        #endregion

        public void CopyFrom(Expr cf)
        {
            op = cf.op;
            affinity = cf.affinity;
            flags = cf.flags;
            u = cf.u;
            pColl = (cf.pColl == null ? null : cf.pColl.Copy());
            iTable = cf.iTable;
            iColumn = cf.iColumn;
            pAggInfo = (cf.pAggInfo == null ? null : cf.pAggInfo.Copy());
            iAgg = cf.iAgg;
            iRightJoinTable = cf.iRightJoinTable;
            flags2 = cf.flags2;
            pTab = (cf.pTab == null ? null : cf.pTab);
#if SQLITE_MAX_EXPR_DEPTH
            nHeight = cf.nHeight;
            pZombieTab = cf.pZombieTab;
#endif
            pLeft = (cf.pLeft == null ? null : cf.pLeft.Copy());
            pRight = (cf.pRight == null ? null : cf.pRight.Copy());
            x.pList = (cf.x.pList == null ? null : cf.x.pList.Copy());
            x.pSelect = (cf.x.pSelect == null ? null : cf.x.pSelect.Copy());
        }