SQLite VFS Shim
Single header with classes for easily implementing SQLite VFS shims in C++11
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
sqlitevfs::SQLiteVfsImpl< TFileImpl > Struct Template Reference

#include <SQLiteVfs.hpp>

Public Types

using FileImpl = TFileImpl
 

Public Member Functions

virtual int xOpen (sqlite3_filename zName, SQLiteFile< TFileImpl > *file, int flags, int *pOutFlags)
 
virtual int xDelete (const char *zName, int syncDir)
 
virtual int xAccess (const char *zName, int flags, int *pResOut)
 
virtual int xFullPathname (const char *zName, int nOut, char *zOut)
 
virtual void * xDlOpen (const char *zFilename)
 
virtual void xDlError (int nByte, char *zErrMsg)
 
virtual void xDlClose (void *library)
 
virtual int xRandomness (int nByte, char *zOut)
 
virtual int xSleep (int microseconds)
 
virtual int xCurrentTime (double *pResOut)
 
virtual int xGetLastError (int nByte, char *zOut)
 
virtual int xCurrentTimeInt64 (sqlite3_int64 *pResOut)
 
virtual int xSetSystemCall (const char *zName, sqlite3_syscall_ptr ptr)
 
virtual sqlite3_syscall_ptr xGetSystemCall (const char *zName)
 
virtual const char * xNextSystemCall (const char *zName)
 

Public Attributes

sqlite3_vfs * original_vfs
 
virtual void(*)(void) xDlSym (void *library, const char *zSymbol)
 

Detailed Description

template<typename TFileImpl>
struct sqlitevfs::SQLiteVfsImpl< TFileImpl >

SQLite VFS implementation with virtual methods for C++.

The default method implementations forward execution to original_vfs.

You should not create objects of this type manually. Instead, you should subclass it, overriding any of the methods necessary, and pass your subclass to SQLiteVfs<>.

Template Parameters
TFileImplSQLiteFileImpl subclass
See also
https://sqlite.org/c3ref/vfs.html

Member Typedef Documentation

◆ FileImpl

template<typename TFileImpl >
using sqlitevfs::SQLiteVfsImpl< TFileImpl >::FileImpl = TFileImpl

Member Function Documentation

◆ xAccess()

template<typename TFileImpl >
virtual int sqlitevfs::SQLiteVfsImpl< TFileImpl >::xAccess ( const char *  zName,
int  flags,
int *  pResOut 
)
inlinevirtual

◆ xCurrentTime()

template<typename TFileImpl >
virtual int sqlitevfs::SQLiteVfsImpl< TFileImpl >::xCurrentTime ( double *  pResOut)
inlinevirtual

◆ xCurrentTimeInt64()

template<typename TFileImpl >
virtual int sqlitevfs::SQLiteVfsImpl< TFileImpl >::xCurrentTimeInt64 ( sqlite3_int64 *  pResOut)
inlinevirtual

◆ xDelete()

template<typename TFileImpl >
virtual int sqlitevfs::SQLiteVfsImpl< TFileImpl >::xDelete ( const char *  zName,
int  syncDir 
)
inlinevirtual

◆ xDlClose()

template<typename TFileImpl >
virtual void sqlitevfs::SQLiteVfsImpl< TFileImpl >::xDlClose ( void *  library)
inlinevirtual

◆ xDlError()

template<typename TFileImpl >
virtual void sqlitevfs::SQLiteVfsImpl< TFileImpl >::xDlError ( int  nByte,
char *  zErrMsg 
)
inlinevirtual

◆ xDlOpen()

template<typename TFileImpl >
virtual void * sqlitevfs::SQLiteVfsImpl< TFileImpl >::xDlOpen ( const char *  zFilename)
inlinevirtual

◆ xFullPathname()

template<typename TFileImpl >
virtual int sqlitevfs::SQLiteVfsImpl< TFileImpl >::xFullPathname ( const char *  zName,
int  nOut,
char *  zOut 
)
inlinevirtual

◆ xGetLastError()

template<typename TFileImpl >
virtual int sqlitevfs::SQLiteVfsImpl< TFileImpl >::xGetLastError ( int  nByte,
char *  zOut 
)
inlinevirtual

◆ xGetSystemCall()

template<typename TFileImpl >
virtual sqlite3_syscall_ptr sqlitevfs::SQLiteVfsImpl< TFileImpl >::xGetSystemCall ( const char *  zName)
inlinevirtual

◆ xNextSystemCall()

template<typename TFileImpl >
virtual const char * sqlitevfs::SQLiteVfsImpl< TFileImpl >::xNextSystemCall ( const char *  zName)
inlinevirtual

◆ xOpen()

template<typename TFileImpl >
virtual int sqlitevfs::SQLiteVfsImpl< TFileImpl >::xOpen ( sqlite3_filename  zName,
SQLiteFile< TFileImpl > *  file,
int  flags,
int *  pOutFlags 
)
inlinevirtual

Open the database.

file is guaranteed to have been constructed using the default constructor. If you return SQLITE_OK, the file IO methods will be populated. Otherwise, IO methods will be set to NULL and file will be automatically destroyed.

See also
https://sqlite.org/c3ref/vfs.html

◆ xRandomness()

template<typename TFileImpl >
virtual int sqlitevfs::SQLiteVfsImpl< TFileImpl >::xRandomness ( int  nByte,
char *  zOut 
)
inlinevirtual

◆ xSetSystemCall()

template<typename TFileImpl >
virtual int sqlitevfs::SQLiteVfsImpl< TFileImpl >::xSetSystemCall ( const char *  zName,
sqlite3_syscall_ptr  ptr 
)
inlinevirtual

◆ xSleep()

template<typename TFileImpl >
virtual int sqlitevfs::SQLiteVfsImpl< TFileImpl >::xSleep ( int  microseconds)
inlinevirtual

Member Data Documentation

◆ original_vfs

template<typename TFileImpl >
sqlite3_vfs* sqlitevfs::SQLiteVfsImpl< TFileImpl >::original_vfs

VFS used by the default method implementations.

◆ xDlSym

template<typename TFileImpl >
virtual void(*)(void) sqlitevfs::SQLiteVfsImpl< TFileImpl >::xDlSym(void *library, const char *zSymbol)
inline

The documentation for this struct was generated from the following file: