A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/sqlitewrapp_8cpp.html below:

NCBI C++ ToolKit: src/db/sqlite/sqlitewrapp.cpp File Reference

Go to the source code of this file.

Go to the SVN repository for this file.

#define  NCBI_USE_ERRCODE_X   Db_Sqlite   #define  SQLITE_ERRMSG_STRM(handle, msg)    msg << ": [" << sqlite3_errcode(handle) << "] " << sqlite3_errmsg(handle)   #define  SQLITE_THROW(type, handle, msg)   Convenient macro for throwing CSQLITE_Exception containing error message from SQLite. More...
  #define  SQLITE_LOG_ERROR(err_subcode, handle, msg)   Same as SQLITE_THROW but for logging errors in places where throwing exceptions is impossible. More...
  #define  SQLITE_SAFE_CALL_EX(call, conn_handle, ex_type, err_msg, retry)   Make call to sqlite3 function with automatic retry mechanism. More...
  #define  SQLITE_SAFE_CALL(sqlite_call, conn_handle, ex_type, err_msg)   The same as SQLITE_SAFE_CALL_EX but without additional calls between retries. More...
  #define  STMT_BIND_IMPL(sql_type, str_type, index_and_val)   #define  COMMA   ,   #define  STMT_BIND_NO_VAL(sql_type, str_type, index)    STMT_BIND_IMPL(sql_type, str_type, index)   #define  STMT_BIND(sql_type, str_type, index, val)    STMT_BIND_IMPL(sql_type, str_type, index COMMA val)   #define  STMT_BIND3(sql_type, str_type, index, val1, val2, val3)    STMT_BIND_IMPL(sql_type, str_type, index COMMA val1 COMMA val2 COMMA val3)   #define  BLOB_SAFE_CALL(blob_call, ex_type, err_msg)   ◆ BLOB_SAFE_CALL #define BLOB_SAFE_CALL (   blob_call,   ex_type,   err_msg  ) Value:

err_msg << " " << m_Table << "." << m_Column \

<< " where rowid = " << m_Rowid)

#define SQLITE_SAFE_CALL(sqlite_call, conn_handle, ex_type, err_msg)

The same as SQLITE_SAFE_CALL_EX but without additional calls between retries.

Definition at line 880 of file sqlitewrapp.cpp.

◆ COMMA ◆ NCBI_USE_ERRCODE_X ◆ SQLITE_ERRMSG_STRM #define SQLITE_ERRMSG_STRM (   handle,   msg  )     msg << ": [" << sqlite3_errcode(handle) << "] " << sqlite3_errmsg(handle)

Definition at line 54 of file sqlitewrapp.cpp.

◆ SQLITE_LOG_ERROR #define SQLITE_LOG_ERROR (   err_subcode,   handle,   msg  ) Value:

#define ERR_POST_X(err_subcode, message)

Error posting with default error code and given error subcode.

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

#define SQLITE_ERRMSG_STRM(handle, msg)

Same as SQLITE_THROW but for logging errors in places where throwing exceptions is impossible.

Parameters
err_subcode Error subcode for err_posting handle Connection handle where error happened msg Additional explanation of the error

Definition at line 83 of file sqlitewrapp.cpp.

◆ SQLITE_SAFE_CALL #define SQLITE_SAFE_CALL (   sqlite_call,   conn_handle,   ex_type,   err_msg  ) Value:

(void)0)

#define SQLITE_SAFE_CALL_EX(call, conn_handle, ex_type, err_msg, retry)

Make call to sqlite3 function with automatic retry mechanism.

The same as SQLITE_SAFE_CALL_EX but without additional calls between retries.

Definition at line 235 of file sqlitewrapp.cpp.

◆ SQLITE_SAFE_CALL_EX #define SQLITE_SAFE_CALL_EX (   call,   conn_handle,   ex_type,   err_msg,   retry  ) Value:

int sql_ret = SQLITE_ERROR; \

do { \

try { \

sql_ret = call; \

CSQLITE_Exception::ex_type); \

if (sql_ret == SQLITE_BUSY) { \

retry; \

} \

} \

CNcbiOstrstream ostr; \

ostr << err_msg; \

} \

} \

while (sql_ret == SQLITE_BUSY)

CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:

Exception thrown from all SQLite-related objects and functions.

static int s_ProcessErrorCode(sqlite3 *handle, int sqlite3_code, CSQLITE_Exception::EErrCode ex_code)

Unified handling of return codes from sqlite.

Make call to sqlite3 function with automatic retry mechanism.

Result from call will be in sql_ret variable after macro.

Parameters
call Function along with its parameters to call conn_handle SQLite connection handle that will be used in call ex_type Enum value from CSQLITE_Exception which will be thrown in case of an error err_msg Error explanation to throw in case of an error retry Additional function call to make between retries

Definition at line 214 of file sqlitewrapp.cpp.

◆ SQLITE_THROW #define SQLITE_THROW (   type,   handle,   msg  ) Value:

do { \

CNcbiOstrstream ostr; \

} while (0)

#define DIAG_COMPILE_INFO

Make compile time diagnostic information object to use in CNcbiDiag and CException.

Convenient macro for throwing CSQLITE_Exception containing error message from SQLite.

Parameters
type Enum value from CSQLITE_Exception handle Connection handle where error happened msg Additional explanation of the error

Definition at line 66 of file sqlitewrapp.cpp.

◆ STMT_BIND ◆ STMT_BIND3 ◆ STMT_BIND_IMPL #define STMT_BIND_IMPL (   sql_type,   str_type,   index_and_val  ) Value:

do { \

_ASSERT(m_StmtHandle); \

SQLITE_SAFE_CALL((

NCBI_NAME2

(sqlite3_bind_, sql_type) \

(m_StmtHandle, index_and_val)), \

m_ConnHandle, eStmtBind, \

"Error binding " << #str_type \

<< " parameter N " << index \

); \

_ASSERT(sql_ret == SQLITE_OK); \

} while (0) \

#define NCBI_NAME2(Name1, Name2)

Name concatenation macro with two names.

Definition at line 690 of file sqlitewrapp.cpp.

◆ STMT_BIND_NO_VAL ◆ TBlobReadGuard

Guard opening blob for read-only access at construction and closing it at destruction.

Definition at line 873 of file sqlitewrapp.cpp.

◆ TBlobWriteGuard

Guard opening blob for read-write access at construction and closing it at destruction.

Definition at line 877 of file sqlitewrapp.cpp.

◆ DEFINE_STATIC_FAST_MUTEX() [1/3] DEFINE_STATIC_FAST_MUTEX ( s_AsyncThreadInitMutex  ) ◆ DEFINE_STATIC_FAST_MUTEX() [2/3] DEFINE_STATIC_FAST_MUTEX ( s_FileAccessMutex  ) ◆ DEFINE_STATIC_FAST_MUTEX() [3/3] DEFINE_STATIC_FAST_MUTEX ( s_SQLITE3_Init_Mutex  ) ◆ s_ProcessErrorCode() ◆ kSQLITE_DefPageSize ◆ s_AsyncWritesThread ◆ s_SQLITE3_Initialized

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4