• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Vdbe类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: SQLiteVdbe

    /// <summary>
    /// Creates new instance of SQLiteVdbe class by compiling a statement
    /// </summary>
    /// <param name="query"></param>
    /// <returns>Vdbe</returns>
    public SQLiteVdbe( SQLiteDatabase db, String query )
    {
      vm = null;

      // prepare and compile 
      csSQLite.sqlite3_prepare_v2( db.Connection(), query, query.Length, ref vm, 0 );
    }
开发者ID:mbahar94,项目名称:fracture,代码行数:12,代码来源:SQLiteVdbe.cs


示例2: sqlite3ColumnDefault

    /*
    ** 2001 September 15
    **
    ** The author disclaims copyright to this source code.  In place of
    ** a legal notice, here is a blessing:
    **
    **    May you do good and not evil.
    **    May you find forgiveness for yourself and forgive others.
    **    May you share freely, never taking more than you give.
    **
    *************************************************************************
    ** This file contains C code routines that are called by the parser
    ** to handle UPDATE statements.
    **
    ** $Id: update.c,v 1.207 2009/08/08 18:01:08 drh Exp $
    **
    *************************************************************************
    **  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart
    **  C#-SQLite is an independent reimplementation of the SQLite software library
    **
    **  $Header$
    *************************************************************************
    */
    //#include "sqliteInt.h"

#if !SQLITE_OMIT_VIRTUALTABLE
/* Forward declaration */
//static void updateVirtualTable(
//Parse pParse,       /* The parsing context */
//SrcList pSrc,       /* The virtual table to be modified */
//Table pTab,         /* The virtual table */
//ExprList pChanges,  /* The columns to change in the UPDATE statement */
//Expr pRowidExpr,    /* Expression used to recompute the rowid */
//int aXRef,          /* Mapping from columns of pTab to entries in pChanges */
//Expr pWhere         /* WHERE clause of the UPDATE statement */
//);
#endif // * SQLITE_OMIT_VIRTUALTABLE */

    /*
** The most recently coded instruction was an OP_Column to retrieve the
** i-th column of table pTab. This routine sets the P4 parameter of the
** OP_Column to the default value, if any.
**
** The default value of a column is specified by a DEFAULT clause in the
** column definition. This was either supplied by the user when the table
** was created, or added later to the table definition by an ALTER TABLE
** command. If the latter, then the row-records in the table btree on disk
** may not contain a value for the column and the default value, taken
** from the P4 parameter of the OP_Column instruction, is returned instead.
** If the former, then all row-records are guaranteed to include a value
** for the column and the P4 value is not required.
**
** Column definitions created by an ALTER TABLE command may only have
** literal default values specified: a number, null or a string. (If a more
** complicated default expression value was provided, it is evaluated
** when the ALTER TABLE is executed and one of the literal values written
** into the sqlite_master table.)
**
** Therefore, the P4 parameter is only required if the default value for
** the column is a literal number, string or null. The sqlite3ValueFromExpr()
** function is capable of transforming these types of expressions into
** sqlite3_value objects.
**
** If parameter iReg is not negative, code an OP_RealAffinity instruction
** on register iReg. This is used when an equivalent integer value is
** stored in place of an 8-byte floating point value in order to save
** space.
*/
    static void sqlite3ColumnDefault( Vdbe v, Table pTab, int i, int iReg )
    {
      Debug.Assert( pTab != null );
      if ( null == pTab.pSelect )
      {
        sqlite3_value pValue = new sqlite3_value();
        int enc = ENC( sqlite3VdbeDb( v ) );
        Column pCol = pTab.aCol[i];
#if SQLITE_DEBUG
        VdbeComment( v, "%s.%s", pTab.zName, pCol.zName );
#endif
        Debug.Assert( i < pTab.nCol );
        sqlite3ValueFromExpr( sqlite3VdbeDb( v ), pCol.pDflt, enc,
        pCol.affinity, ref pValue );
        if ( pValue != null )
        {
          sqlite3VdbeChangeP4( v, -1, pValue, P4_MEM );
        }
#if !SQLITE_OMIT_FLOATING_POINT
        if ( iReg >= 0 && pTab.aCol[i].affinity == SQLITE_AFF_REAL )
        {
          sqlite3VdbeAddOp1( v, OP_RealAffinity, iReg );
        }
#endif
      }
    }
开发者ID:mbahar94,项目名称:fracture,代码行数:94,代码来源:update_c.cs


示例3: sqlite3IndexAffinityStr

 /*
 ** Return a pointer to the column affinity string associated with index
 ** pIdx. A column affinity string has one character for each column in 
 ** the table, according to the affinity of the column:
 **
 **  Character      Column affinity
 **  ------------------------------
 **  'a'            TEXT
 **  'b'            NONE
 **  'c'            NUMERIC
 **  'd'            INTEGER
 **  'e'            REAL
 **
 ** An extra 'b' is appended to the end of the string to cover the
 ** rowid that appears as the last column in every index.
 **
 ** Memory for the buffer containing the column index affinity string
 ** is managed along with the rest of the Index structure. It will be
 ** released when sqlite3DeleteIndex() is called.
 */
 static string sqlite3IndexAffinityStr( Vdbe v, Index pIdx )
 {
   if ( pIdx.zColAff == null || pIdx.zColAff[0] == '\0' )
   {
     /* The first time a column affinity string for a particular index is
     ** required, it is allocated and populated here. It is then stored as
     ** a member of the Index structure for subsequent use.
     **
     ** The column affinity string will eventually be deleted by
     ** sqliteDeleteIndex() when the Index structure itself is cleaned
     ** up.
     */
     int n;
     Table pTab = pIdx.pTable;
     sqlite3 db = sqlite3VdbeDb( v );
     StringBuilder pIdx_zColAff = new StringBuilder( pIdx.nColumn + 2 );// (char )sqlite3DbMallocRaw(0, pIdx->nColumn+2);
     //      if ( pIdx_zColAff == null )
     //      {
     //        db.mallocFailed = 1;
     //        return null;
     //      }
     for ( n = 0; n < pIdx.nColumn; n++ )
     {
       pIdx_zColAff.Append( pTab.aCol[pIdx.aiColumn[n]].affinity );
     }
     pIdx_zColAff.Append( SQLITE_AFF_NONE );
     pIdx_zColAff.Append( '\0' );
     pIdx.zColAff = pIdx_zColAff.ToString();
   }
   return pIdx.zColAff;
 }
开发者ID:Gillardo,项目名称:Cordova-SQLitePlugin,代码行数:51,代码来源:insert_c.cs


示例4: sqlite3VdbeSetSql

    /*
    ** Remember the SQL string for a prepared statement.
    */
    static void sqlite3VdbeSetSql( Vdbe p, string z, int n, int isPrepareV2 )
    {
      if ( p == null ) return;
#if SQLITE_OMIT_TRACE
if( !isPrepareV2 ) return;
#endif
      Debug.Assert( p.zSql == "" );
      p.zSql = z.Substring( 0, n );// sqlite3DbStrNDup(p.db, z, n);
      p.isPrepareV2 = isPrepareV2 != 0;
    }
开发者ID:plainprogrammer,项目名称:csharp-sqlite,代码行数:13,代码来源:vdbeaux_c.cs


示例5: vdbeSafetyNotNull

 static bool vdbeSafetyNotNull( Vdbe p )
 {
   if ( p == null )
   {
     sqlite3_log( SQLITE_MISUSE, "API called with NULL prepared statement" );
     return true;
   }
   else
   {
     return vdbeSafety( p );
   }
 }
开发者ID:CryptoManiac,项目名称:csharpsqlite,代码行数:12,代码来源:vdbeapi_c.cs


示例6: SQLiteVdbe

    /// <summary>
    /// Creates new instance of SQLiteVdbe class by compiling a statement
    /// </summary>
    /// <param name="query"></param>
    /// <returns>Vdbe</returns>
    public SQLiteVdbe( SQLiteDatabase db, String query )
    {
      vm = null;

      // prepare and compile 
#if NET_35
      Sqlite3.PrepareV2NoTail
#else
Sqlite3.sqlite3_prepare_v2
#endif
( db.Connection(), query, query.Length, ref vm, 0 );
    }
开发者ID:Jaden-J,项目名称:csharp-sqlite,代码行数:17,代码来源:SQLiteVdbe.cs


示例7: vdbeSafety

    /*
** Check on a Vdbe to make sure it has not been finalized.  Log
** an error and return true if it has been finalized (or is otherwise
** invalid).  Return false if it is ok.
*/
    static bool vdbeSafety( Vdbe p )
    {
      if ( p.db == null )
      {
        sqlite3_log( SQLITE_MISUSE, "API called with finalized prepared statement" );
        return true;
      }
      else
      {
        return false;
      }
    }
开发者ID:CryptoManiac,项目名称:csharpsqlite,代码行数:17,代码来源:vdbeapi_c.cs


示例8: sqlite3VdbeCreate

    /*
** Create a new virtual database engine.
*/
    static Vdbe sqlite3VdbeCreate( sqlite3 db )
    {
      Vdbe p;
      p = new Vdbe();// sqlite3DbMallocZero(db, Vdbe).Length;
      if ( p == null ) return null;
      p.db = db;
      if ( db.pVdbe != null )
      {
        db.pVdbe.pPrev = p;
      }
      p.pNext = db.pVdbe;
      p.pPrev = null;
      db.pVdbe = p;
      p.magic = VDBE_MAGIC_INIT;
      return p;
    }
开发者ID:koush,项目名称:csharp-sqlite,代码行数:19,代码来源:vdbeaux_c.cs


示例9: memAboutToChange

		/*
		** 2001 September 15
		**
		** The author disclaims copyright to this source code.  In place of
		** a legal notice, here is a blessing:
		**
		**    May you do good and not evil.
		**    May you find forgiveness for yourself and forgive others.
		**    May you share freely, never taking more than you give.
		**
		*************************************************************************
		** The code in this file implements execution method of the
		** Virtual Database Engine (VDBE).  A separate file ("vdbeaux.c")
		** handles housekeeping details such as creating and deleting
		** VDBE instances.  This file is solely interested in executing
		** the VDBE program.
		**
		** In the external interface, an "sqlite3_stmt*" is an opaque pointer
		** to a VDBE.
		**
		** The SQL parser generates a program which is then executed by
		** the VDBE to do the work of the SQL statement.  VDBE programs are
		** similar in form to assembly language.  The program consists of
		** a linear sequence of operations.  Each operation has an opcode
		** and 5 operands.  Operands P1, P2, and P3 are integers.  Operand P4
		** is a null-terminated string.  Operand P5 is an unsigned character.
		** Few opcodes use all 5 operands.
		**
		** Computation results are stored on a set of registers numbered beginning
		** with 1 and going up to Vdbe.nMem.  Each register can store
		** either an integer, a null-terminated string, a floating point
		** number, or the SQL "NULL" value.  An implicit conversion from one
		** type to the other occurs as necessary.
		**
		** Most of the code in this file is taken up by the sqlite3VdbeExec()
		** function which does the work of interpreting a VDBE program.
		** But other routines are also provided to help in building up
		** a program instruction by instruction.
		**
		** Various scripts scan this source file in order to generate HTML
		** documentation, headers files, or other derived files.  The formatting
		** of the code in this file is, therefore, important.  See other comments
		** in this file for details.  If in doubt, do not deviate from existing
		** commenting and indentation practices when changing or adding code.
		*************************************************************************
		**  Included in SQLite3 port to C#-SQLite;  2008 Noah B Hart
		**  C#-SQLite is an independent reimplementation of the SQLite software library
		**
		**  SQLITE_SOURCE_ID: 2011-06-23 19:49:22 4374b7e83ea0a3fbc3691f9c0c936272862f32f2
		**
		*************************************************************************
		*/
		//#include "sqliteInt.h"
		//#include "vdbeInt.h"

		/*
		** Invoke this macro on memory cells just prior to changing the
		** value of the cell.  This macro verifies that shallow copies are
		** not misused.
		*/
#if SQLITE_DEBUG
	//# define memAboutToChange(P,M) sqlite3VdbeMemPrepareToChange(P,M)
	static void memAboutToChange( Vdbe P, Mem M )
	{
	  sqlite3VdbeMemPrepareToChange( P, M );
	}
开发者ID:jcwmoore,项目名称:athena,代码行数:66,代码来源:vdbe_c.cs


示例10: sqlite3VdbeExec

		/// <summary>
		/// Execute as much of a VDBE program as we can then return.
		/// 
		/// sqlite3VdbeMakeReady() must be called before this routine in order to
		/// close the program with a final OP_Halt and to set up the callbacks
		/// and the error message pointer.
		/// 
		/// Whenever a row or result data is available, this routine will either
		/// invoke the result callback (if there is one) or return with
		/// SQLITE_ROW.
		/// 
		/// If an attempt is made to open a locked database, then this routine
		/// will either invoke the busy callback (if there is one) or it will
		/// return SQLITE_BUSY.
		/// 
		/// If an error occurs, an error message is written to memory obtained
		/// from sqlite3Malloc() and p.zErrMsg is made to point to that memory.
		/// The error code is stored in p.rc and this routine returns SQLITE_ERROR.
		/// 
		/// If the callback ever returns non-zero, then the program exits
		/// immediately.  There will be no error message but the p.rc field is
		/// set to SQLITE_ABORT and this routine will return SQLITE_ERROR.
		/// 
		/// A memory allocation error causes p.rc to be set to SQLITE_NOMEM and this
		/// routine to return SQLITE_ERROR.
		/// 
		/// Other fatal errors return SQLITE_ERROR.
		/// 
		/// After this routine has finished, sqlite3VdbeFinalize() should be
		/// used to clean up the mess that was left behind
		/// </summary>
		/// <param name='p'>
		/// The VDBE
		/// </param>
		static int sqlite3VdbeExec(Vdbe p)
		{
			int pc = 0;                /* The program counter */
			Op[] aOp = p.aOp;          /* Copy of p.aOp */
			Op pOp;                    /* Current operation */
			int rc = SQLITE_OK;        /* Value to return */
			sqlite3 db = p.db;         /* The database */
			u8 resetSchemaOnFault = 0; /* Reset schema after an error if positive */
			u8 encoding = ENC(db);   /* The database encoding */
#if !SQLITE_OMIT_PROGRESS_CALLBACK
			bool checkProgress;        /* True if progress callbacks are enabled */
			int nProgressOps = 0;      /* Opcodes executed since progress callback. */
#endif
			Mem[] aMem = p.aMem;       /* Copy of p.aMem */
			Mem pIn1 = null;           /* 1st input operand */
			Mem pIn2 = null;           /* 2nd input operand */
			Mem pIn3 = null;           /* 3rd input operand */
			Mem pOut = null;           /* Output operand */
			int iCompare = 0;          /* Result of last OP_Compare operation */
			int[] aPermute = null;     /* Permutation of columns for OP_Compare */
			i64 lastRowid = db.lastRowid;  /* Saved value of the last insert ROWID */
#if VDBE_PROFILE
u64 start;                   /* CPU clock count at start of opcode */
int origPc;                  /* Program counter at start of opcode */
#endif
			/*** INSERT STACK UNION HERE ***/

			Debug.Assert(p.magic == VDBE_MAGIC_RUN);  /* sqlite3_step() verifies this */
			sqlite3VdbeEnter(p);
			if (p.rc == SQLITE_NOMEM)
			{
				/* This happens if a malloc() inside a call to sqlite3_column_text() or
				** sqlite3_column_text16() failed.  */
				goto no_mem;
			}
			Debug.Assert(p.rc == SQLITE_OK || p.rc == SQLITE_BUSY);
			p.rc = SQLITE_OK;
			Debug.Assert(p.explain == 0);
			p.pResultSet = null;
			db.busyHandler.nBusy = 0;
			if (db.u1.isInterrupted)
				goto abort_due_to_interrupt; //CHECK_FOR_INTERRUPT;
#if TRACE
sqlite3VdbeIOTraceSql( p );
#endif
#if !SQLITE_OMIT_PROGRESS_CALLBACK
			checkProgress = db.xProgress != null;
#endif
#if SQLITE_DEBUG
	  sqlite3BeginBenignMalloc();
	  if ( p.pc == 0
	  && ( p.db.flags & SQLITE_VdbeListing ) != 0 )
	  {
		int i;
		Console.Write( "VDBE Program Listing:\n" );
		sqlite3VdbePrintSql( p );
		for ( i = 0; i < p.nOp; i++ )
		{
		  sqlite3VdbePrintOp( Console.Out, i, aOp[i] );
		}
	  }
	  sqlite3EndBenignMalloc();
#endif
			for (pc = p.pc; rc == SQLITE_OK; pc++)
			{
				Debug.Assert(pc >= 0 && pc < p.nOp);
//.........这里部分代码省略.........
开发者ID:jcwmoore,项目名称:athena,代码行数:101,代码来源:vdbe_c.cs


示例11: importVtabErrMsg

		/// <summary>
		/// Transfer error message text from an sqlite3_vtab.zErrMsg (text stored
		/// in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored
		/// in memory obtained from sqlite3DbMalloc).
		/// </summary>
		static void importVtabErrMsg(Vdbe p, sqlite3_vtab pVtab)
		{
			sqlite3 db = p.db;
			sqlite3DbFree(db, ref p.zErrMsg);
			p.zErrMsg = pVtab.zErrMsg; // sqlite3DbStrDup( db, pVtab.zErrMsg );
			//sqlite3_free( pVtab.zErrMsg );
			pVtab.zErrMsg = null;
		}
开发者ID:jcwmoore,项目名称:athena,代码行数:13,代码来源:vdbe_c.cs


示例12: REGISTER_TRACE

		//#  define REGISTER_TRACE(R,M)
		static void REGISTER_TRACE(Vdbe p, int R, Mem M) { }
开发者ID:jcwmoore,项目名称:athena,代码行数:2,代码来源:vdbe_c.cs


示例13: VdbeComment

 }//# define VdbeComment(X)  sqlite3VdbeComment X
 //void sqlite3VdbeNoopComment(Vdbe*, const char*, ...);
 static void VdbeNoopComment( Vdbe v, string zFormat, params object[] ap )
 {
   sqlite3VdbeNoopComment( v, zFormat, ap );
 }//# define VdbeNoopComment(X)  sqlite3VdbeNoopComment X
开发者ID:z0rg1nc,项目名称:CsharpSqliteFork,代码行数:6,代码来源:Vdbe_h.cs


示例14: sqlite3ExprCodeGetColumnOfTable

 /*
 ** Generate code to extract the value of the iCol-th column of a table.
 */
 static void sqlite3ExprCodeGetColumnOfTable(
   Vdbe v,         /* The VDBE under construction */
   Table pTab,     /* The table containing the value */
   int iTabCur,    /* The cursor for this table */
   int iCol,       /* Index of the column to extract */
   int regOut      /* Extract the value into this register */
 )
 {
   if ( iCol < 0 || iCol == pTab.iPKey )
   {
     sqlite3VdbeAddOp2( v, OP_Rowid, iTabCur, regOut );
   }
   else
   {
     int op = IsVirtual( pTab ) ? OP_VColumn : OP_Column;
     sqlite3VdbeAddOp3( v, op, iTabCur, iCol, regOut );
   }
   if ( iCol >= 0 )
   {
     sqlite3ColumnDefault( v, pTab, iCol, regOut );
   }
 }
开发者ID:laboratoryyingong,项目名称:BARLESS,代码行数:25,代码来源:expr_c.cs


示例15: codeOffset

    /*
    ** Add code to implement the OFFSET
    */
    static void codeOffset(
    Vdbe v,          /* Generate code into this VM */
    Select p,        /* The SELECT statement being coded */
    int iContinue    /* Jump here to skip the current record */
    )
    {
      if ( p.iOffset != 0 && iContinue != 0 )
      {
        int addr;
        sqlite3VdbeAddOp2( v, OP_AddImm, p.iOffset, -1 );
        addr = sqlite3VdbeAddOp1( v, OP_IfNeg, p.iOffset );
        sqlite3VdbeAddOp2( v, OP_Goto, 0, iContinue );
#if SQLITE_DEBUG
        VdbeComment( v, "skip OFFSET records" );
#endif
        sqlite3VdbeJumpHere( v, addr );
      }
    }
开发者ID:CryptoManiac,项目名称:csharpsqlite,代码行数:21,代码来源:select_c.cs


示例16: sqlite3TableAffinityStr

    /*
    ** Set P4 of the most recently inserted opcode to a column affinity
    ** string for table pTab. A column affinity string has one character
    ** for each column indexed by the index, according to the affinity of the
    ** column:
    **
    **  Character      Column affinity
    **  ------------------------------
    **  'a'            TEXT
    **  'b'            NONE
    **  'c'            NUMERIC
    **  'd'            INTEGER
    **  'e'            REAL
    */
    static void sqlite3TableAffinityStr( Vdbe v, Table pTab )
    {
      /* The first time a column affinity string for a particular table
      ** is required, it is allocated and populated here. It is then
      ** stored as a member of the Table structure for subsequent use.
      **
      ** The column affinity string will eventually be deleted by
      ** sqlite3DeleteTable() when the Table structure itself is cleaned up.
      */
      if ( pTab.zColAff == null )
      {
        StringBuilder zColAff;
        int i;
        sqlite3 db = sqlite3VdbeDb( v );

        zColAff = new StringBuilder( pTab.nCol + 1 );// (char)sqlite3DbMallocRaw(0, pTab->nCol+1);
        if ( zColAff == null )
        {
          ////        db.mallocFailed = 1;
          return;
        }

        for ( i = 0; i < pTab.nCol; i++ )
        {
          zColAff.Append( pTab.aCol[i].affinity );
        }
        //zColAff.Append( '\0' );

        pTab.zColAff = zColAff.ToString();
      }

      sqlite3VdbeChangeP4( v, -1, pTab.zColAff, P4_TRANSIENT );
    }
开发者ID:Gillardo,项目名称:Cordova-SQLitePlugin,代码行数:47,代码来源:insert_c.cs


示例17: sqlite3Step

    /*
    ** Execute the statement pStmt, either until a row of data is ready, the
    ** statement is completely executed or an error occurs.
    **
    ** This routine implements the bulk of the logic behind the sqlite_step()
    ** API.  The only thing omitted is the automatic recompile if a
    ** schema change has occurred.  That detail is handled by the
    ** outer sqlite3_step() wrapper procedure.
    */
    static int sqlite3Step( Vdbe p )
    {
      sqlite3 db;
      int rc;

      Debug.Assert( p != null );
      if ( p.magic != VDBE_MAGIC_RUN )
      {
        /* We used to require that sqlite3_reset() be called before retrying
        ** sqlite3_step() after any error or after SQLITE_DONE.  But beginning
        ** with version 3.7.0, we changed this so that sqlite3_reset() would
        ** be called automatically instead of throwing the SQLITE_MISUSE error.
        ** This "automatic-reset" change is not technically an incompatibility, 
        ** since any application that receives an SQLITE_MISUSE is broken by
        ** definition.
        **
        ** Nevertheless, some published applications that were originally written
        ** for version 3.6.23 or earlier do in fact depend on SQLITE_MISUSE 
        ** returns, and the so were broken by the automatic-reset change.  As a
        ** a work-around, the SQLITE_OMIT_AUTORESET compile-time restores the
        ** legacy behavior of returning SQLITE_MISUSE for cases where the 
        ** previous sqlite3_step() returned something other than a SQLITE_LOCKED
        ** or SQLITE_BUSY error.
        */
#if SQLITE_OMIT_AUTORESET
if( p.rc==SQLITE_BUSY || p.rc==SQLITE_LOCKED ){
sqlite3_reset((sqlite3_stmt)p);
}else{
return SQLITE_MISUSE_BKPT();
}
#else
        sqlite3_reset( (sqlite3_stmt)p );
#endif
      }

      /* Check that malloc() has not failed. If it has, return early. */
      db = p.db;
      //if ( db.mallocFailed != 0 )
      //{
      //p->rc = SQLITE_NOMEM;
      //  return SQLITE_NOMEM;
      //}

      if ( p.pc <= 0 && p.expired )
      {
        p.rc = SQLITE_SCHEMA;
        rc = SQLITE_ERROR;
        goto end_of_step;
      }
      if ( p.pc < 0 )
      {
        /* If there are no other statements currently running, then
        ** reset the interrupt flag.  This prevents a call to sqlite3_interrupt
        ** from interrupting a statement that has not yet started.
        */
        if ( db.activeVdbeCnt == 0 )
        {
          db.u1.isInterrupted = false;
        }

        Debug.Assert( db.writeVdbeCnt > 0 || db.autoCommit == 0 || db.nDeferredCons == 0 );
#if  !SQLITE_OMIT_TRACE
        if ( db.xProfile != null && 0 == db.init.busy )
        {
          sqlite3OsCurrentTimeInt64( db.pVfs, ref p.startTime );
        }
#endif

        db.activeVdbeCnt++;
        if ( p.readOnly == false )
          db.writeVdbeCnt++;
        p.pc = 0;
      }
#if  !SQLITE_OMIT_EXPLAIN
      if ( p.explain != 0 )
      {
        rc = sqlite3VdbeList( p );
      }
      else
#endif // * SQLITE_OMIT_EXPLAIN */
      {

        db.vdbeExecCnt++;
        rc = sqlite3VdbeExec( p );
        db.vdbeExecCnt--;
      }

#if  !SQLITE_OMIT_TRACE
      /* Invoke the profile callback if there is one
*/
      if ( rc != SQLITE_ROW && db.xProfile != null && 0 == db.init.busy && p.zSql != null )
//.........这里部分代码省略.........
开发者ID:CryptoManiac,项目名称:csharpsqlite,代码行数:101,代码来源:vdbeapi_c.cs


示例18: VdbeNoopComment

//# define VdbeNoopComment(X)
static void VdbeNoopComment( Vdbe v, string zFormat, params object[] ap ) { }
开发者ID:z0rg1nc,项目名称:CsharpSqliteFork,代码行数:2,代码来源:Vdbe_h.cs


示例19: sqlite3ExprCodeIsNullJump

 /*
 ** Generate an OP_IsNull instruction that tests register iReg and jumps
 ** to location iDest if the value in iReg is NULL.  The value in iReg
 ** was computed by pExpr.  If we can look at pExpr at compile-time and
 ** determine that it can never generate a NULL, then the OP_IsNull operation
 ** can be omitted.
 */
 static void sqlite3ExprCodeIsNullJump(
 Vdbe v,            /* The VDBE under construction */
 Expr pExpr,        /* Only generate OP_IsNull if this expr can be NULL */
 int iReg,          /* Test the value in this register for NULL */
 int iDest          /* Jump here if the value is null */
 )
 {
   if ( sqlite3ExprCanBeNull( pExpr ) != 0 )
   {
     sqlite3VdbeAddOp2( v, OP_IsNull, iReg, iDest );
   }
 }
开发者ID:laboratoryyingong,项目名称:BARLESS,代码行数:19,代码来源:expr_c.cs


示例20: sqlite3LockAndPrepare

 static int sqlite3LockAndPrepare(
 sqlite3 db,               /* Database handle. */
 string zSql,              /* UTF-8 encoded SQL statement. */
 int nBytes,               /* Length of zSql in bytes. */
 int saveSqlFlag,          /* True to copy SQL text into the sqlite3_stmt */
 Vdbe pOld,                /* VM being reprepared */
 ref sqlite3_stmt ppStmt,  /* OUT: A pointer to the prepared statement */
 ref string pzTail         /* OUT: End of parsed string */
 )
 {
   int rc;
   //  assert( ppStmt!=0 );
   ppStmt = null;
   if ( !sqlite3SafetyCheckOk( db ) )
   {
     return SQLITE_MISUSE_BKPT();
   }
   sqlite3_mutex_enter( db.mutex );
   sqlite3BtreeEnterAll( db );
   rc = sqlite3Prepare( db, zSql, nBytes, saveSqlFlag, pOld, ref ppStmt, ref pzTail );
   if ( rc == SQLITE_SCHEMA )
   {
     sqlite3_finalize( ppStmt );
     rc = sqlite3Prepare( db, zSql, nBytes, saveSqlFlag, pOld, ref ppStmt, ref  pzTail );
   }
   sqlite3BtreeLeaveAll( db );
   sqlite3_mutex_leave( db.mutex );
   return rc;
 }
开发者ID:pragmat1c,项目名称:coolstorage,代码行数:29,代码来源:prepare_c.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Vec2类代码示例发布时间:2022-05-24
下一篇:
C# Variant类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap