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


C# sqlite3_vfs类代码示例

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


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

示例1: vfstraceRandomness

/*
** Populate the buffer pointed to by zBufOut with nByte bytes of 
** random data.
*/
static int vfstraceRandomness(sqlite3_vfs pVfs, int nByte, byte[] zBufOut){
  vfstrace_info pInfo = (vfstrace_info)pVfs.pAppData;
  sqlite3_vfs pRoot = pInfo.pRootVfs;
  vfstrace_printf(pInfo, "%s.xRandomness(%d)\n", pInfo.zVfsName, nByte);
  return pRoot.xRandomness( pRoot, nByte, zBufOut );
}
开发者ID:Jaden-J,项目名称:csharp-sqlite,代码行数:10,代码来源:test_vfstrace_c.cs

示例2: sqlite3JournalOpen

/*
** Open a journal file.
*/
int sqlite3JournalOpen(
sqlite3_vfs pVfs,         /* The VFS to use for actual file I/O */
string zName,         /* Name of the journal file */
sqlite3_file pJfd,        /* Preallocated, blank file handle */
int flags,                 /* Opening flags */
int nBuf                   /* Bytes buffered before opening the file */
){
JournalFile p = (JournalFile )pJfd;
memset(p, 0, sqlite3JournalSize(pVfs));
if( nBuf>0 ){
p.zBuf = sqlite3MallocZero(nBuf);
if( null==p.zBuf ){
return SQLITE_NOMEM;
}
}else{
return sqlite3OsOpen(pVfs, zName, pJfd, flags, 0);
}
p.pMethod = JournalFileMethods;
p.nBuf = nBuf;
p.flags = flags;
p.zJournal = zName;
p.pVfs = pVfs;
return SQLITE_OK;
}
开发者ID:RainsSoft,项目名称:CsharpSQLite,代码行数:27,代码来源:journal_c.cs

示例3: sqlite3_vfs

 public sqlite3_vfs( int iVersion,
 int szOsFile,
 int mxPathname,
 sqlite3_vfs pNext,
 string zName,
 object pAppData,
 dxOpen xOpen,
 dxDelete xDelete,
 dxAccess xAccess,
 dxFullPathname xFullPathname,
 dxDlOpen xDlOpen,
 dxDlError xDlError,
 dxDlSym xDlSym,
 dxDlClose xDlClose,
 dxRandomness xRandomness,
 dxSleep xSleep,
 dxCurrentTime xCurrentTime,
 dxGetLastError xGetLastError,
 dxCurrentTimeInt64 xCurrentTimeInt64,
 dxSetSystemCall xSetSystemCall,
 dxGetSystemCall xGetSystemCall,
 dxNextSystemCall xNextSystemCall)
 {
   this.iVersion = iVersion;
   this.szOsFile = szOsFile;
   this.mxPathname = mxPathname;
   this.pNext = pNext;
   this.zName = zName;
   this.pAppData = pAppData;
   this.xOpen = xOpen;
   this.xDelete = xDelete;
   this.xAccess = xAccess;
   this.xFullPathname = xFullPathname;
   this.xDlOpen = xDlOpen;
   this.xDlError = xDlError;
   this.xDlSym = xDlSym;
   this.xDlClose = xDlClose;
   this.xRandomness = xRandomness;
   this.xSleep = xSleep;
   this.xCurrentTime = xCurrentTime;
   this.xGetLastError = xGetLastError;
   this.xCurrentTimeInt64 = xCurrentTimeInt64;
 }
开发者ID:hanahanaside,项目名称:JPN,代码行数:43,代码来源:sqlite3_h.cs

示例4: sqlite3_vfs_unregister

    /*
    ** Unregister a VFS so that it is no longer accessible.
    */
    static int sqlite3_vfs_unregister( sqlite3_vfs pVfs )
    {
#if SQLITE_THREADSAFE
      sqlite3_mutex mutex = sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER );
#endif
      sqlite3_mutex_enter( mutex );
      vfsUnlink( pVfs );
      sqlite3_mutex_leave( mutex );
      return SQLITE_OK;
    }
开发者ID:pragmat1c,项目名称:coolstorage,代码行数:13,代码来源:os_c.cs

示例5: sqlite3WalOpen

		/*
		** 2010 February 1
		**
		** 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 header file defines the interface to the write-ahead logging 
		** system. Refer to the comments below and the header comment attached to 
		** the implementation of each function in log.c for further details.
		*************************************************************************
		**  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
		**
		*************************************************************************
		*/

		//#if !_WAL_H_
		//#define _WAL_H_

		//#include "sqliteInt.h"

#if SQLITE_OMIT_WAL

		//# define sqlite3WalOpen(x,y,z)                 0
		static int sqlite3WalOpen(sqlite3_vfs x, sqlite3_file y, string z)
		{
			return 0;
		}
开发者ID:RainsSoft,项目名称:CsharpSQLite,代码行数:35,代码来源:wal_h.cs

示例6: sqlite3OsCurrentTimeInt64

 static int sqlite3OsCurrentTimeInt64( sqlite3_vfs pVfs, ref sqlite3_int64 pTimeOut )
 {
   int rc;
   /* IMPLEMENTATION-OF: R-49045-42493 SQLite will use the xCurrentTimeInt64()
   ** method to get the current date and time if that method is available
   ** (if iVersion is 2 or greater and the function pointer is not NULL) and
   ** will fall back to xCurrentTime() if xCurrentTimeInt64() is
   ** unavailable.
   */
   if ( pVfs.iVersion >= 2 && pVfs.xCurrentTimeInt64 != null )
   {
     rc = pVfs.xCurrentTimeInt64( pVfs, ref pTimeOut );
   }
   else
   {
     double r = 0;
     rc = pVfs.xCurrentTime( pVfs, ref r );
     pTimeOut = (sqlite3_int64)( r * 86400000.0 );
   }
   return rc;
 }
开发者ID:pragmat1c,项目名称:coolstorage,代码行数:21,代码来源:os_c.cs

示例7: vfsUnlink

 /*
 ** Unlink a VFS from the linked list
 */
 static void vfsUnlink( sqlite3_vfs pVfs )
 {
   Debug.Assert( sqlite3_mutex_held( sqlite3MutexAlloc( SQLITE_MUTEX_STATIC_MASTER ) ) );
   if ( pVfs == null )
   {
     /* No-op */
   }
   else if ( vfsList == pVfs )
   {
     vfsList = pVfs.pNext;
   }
   else if ( vfsList != null )
   {
     sqlite3_vfs p = vfsList;
     while ( p.pNext != null && p.pNext != pVfs )
     {
       p = p.pNext;
     }
     if ( p.pNext == pVfs )
     {
       p.pNext = pVfs.pNext;
     }
   }
 }
开发者ID:pragmat1c,项目名称:coolstorage,代码行数:27,代码来源:os_c.cs

示例8: vfstraceNextSystemCall

static string vfstraceNextSystemCall(sqlite3_vfs pVfs, string zName){
  vfstrace_info pInfo = (vfstrace_info)pVfs.pAppData;
  sqlite3_vfs pRoot = pInfo.pRootVfs;
  Debugger.Break();
  //return pRoot.xNextSystemCall(pRoot, zName);
  return "";
}
开发者ID:Jaden-J,项目名称:csharp-sqlite,代码行数:7,代码来源:test_vfstrace_c.cs

示例9: sqlite3OsOpen

 /*
 ** The next group of routines are convenience wrappers around the
 ** VFS methods.
 */
 static int sqlite3OsOpen(
 sqlite3_vfs pVfs,
 string zPath,
 sqlite3_file pFile,
 int flags,
 ref int pFlagsOut
 )
 {
   int rc;
   DO_OS_MALLOC_TEST( null );
   /* 0x87f3f is a mask of SQLITE_OPEN_ flags that are valid to be passed
   ** down into the VFS layer.  Some SQLITE_OPEN_ flags (for example,
   ** SQLITE_OPEN_FULLMUTEX or SQLITE_OPEN_SHAREDCACHE) are blocked before
   ** reaching the VFS. */
   rc = pVfs.xOpen( pVfs, zPath, pFile, flags & 0x87f3f, ref pFlagsOut );
   Debug.Assert( rc == SQLITE_OK || pFile.pMethods == null );
   return rc;
 }
开发者ID:pragmat1c,项目名称:coolstorage,代码行数:22,代码来源:os_c.cs

示例10: vfstraceSetSystemCall

/*
** Override system calls.
*/
static int vfstraceSetSystemCall(
  sqlite3_vfs pVfs,
  string zName,
  sqlite3_int64 pFunc //sqlite3_syscall_ptr pFunc
){
  vfstrace_info pInfo = (vfstrace_info)pVfs.pAppData;
  sqlite3_vfs pRoot = pInfo.pRootVfs;
  return pRoot.xSetSystemCall(pRoot, zName, pFunc);
}
开发者ID:Jaden-J,项目名称:csharp-sqlite,代码行数:12,代码来源:test_vfstrace_c.cs

示例11: vfstraceGetSystemCall

static sqlite3_int64 vfstraceGetSystemCall(//sqlite3_syscall_ptr vfstraceGetSystemCall(
  sqlite3_vfs pVfs,
  string zName
){
  vfstrace_info pInfo = (vfstrace_info)pVfs.pAppData;
  sqlite3_vfs pRoot = pInfo.pRootVfs;
  Debugger.Break();
  //return pRoot.xGetSystemCall(pRoot, zName);
  return 0;
}
开发者ID:Jaden-J,项目名称:csharp-sqlite,代码行数:10,代码来源:test_vfstrace_c.cs

示例12: vfstraceGetLastError

/*
** Return th3 emost recent error code and message
*/
static int vfstraceGetLastError(sqlite3_vfs pVfs, int iErr, string zErr){
  vfstrace_info pInfo = (vfstrace_info)pVfs.pAppData;
  sqlite3_vfs pRoot = pInfo.pRootVfs;
  Debugger.Break();
  //return pRoot.xGetLastError(pRoot, iErr, zErr);
  return 0;
}
开发者ID:Jaden-J,项目名称:csharp-sqlite,代码行数:10,代码来源:test_vfstrace_c.cs

示例13: vfstraceCurrentTimeInt64

static int vfstraceCurrentTimeInt64(sqlite3_vfs pVfs, sqlite_int64 pTimeOut){
  vfstrace_info pInfo = (vfstrace_info)pVfs.pAppData;
  sqlite3_vfs pRoot = pInfo.pRootVfs;
  return pRoot.xCurrentTimeInt64(pRoot, ref pTimeOut);
}
开发者ID:Jaden-J,项目名称:csharp-sqlite,代码行数:5,代码来源:test_vfstrace_c.cs

示例14: vfstraceSleep

/*
** Sleep for nMicro microseconds. Return the number of microseconds 
** actually slept.
*/
static int vfstraceSleep(sqlite3_vfs pVfs, int nMicro){
  vfstrace_info pInfo = (vfstrace_info)pVfs.pAppData;
  sqlite3_vfs pRoot = pInfo.pRootVfs;
  return pRoot.xSleep(pRoot, nMicro);
}
开发者ID:Jaden-J,项目名称:csharp-sqlite,代码行数:9,代码来源:test_vfstrace_c.cs

示例15: sqlite3OsRandomness

 static int sqlite3OsRandomness( sqlite3_vfs pVfs, int nByte, ref byte[] zBufOut )
 {
   return pVfs.xRandomness( pVfs, nByte, ref zBufOut );
 }
开发者ID:pragmat1c,项目名称:coolstorage,代码行数:4,代码来源:os_c.cs


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