NCBI C++ ToolKit
|
#include <string>
#include <map>
#include <vector>
#include <corelib/ncbitime.hpp>
#include <corelib/rwstream.hpp>
#include <util/ncbi_url.hpp>
#include <dbapi/dbapi.hpp>
#include <dbapi/error_codes.hpp>
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
class | CSDB_Exception |
Exception class used throughout the API. More... | |
class | CSDB_DeadlockException |
class | CQuery |
Object used to execute queries and stored procedures on the database server and retrieve result sets. More... | |
class | CQuery::CField |
Class representing value in result set or output parameter of stored procedure. More... | |
class | CQuery::CRow |
A full row of result data. More... | |
class | CQuery::CRowIterator |
Iterator class doing main navigation through result sets. More... | |
class | CBlobBookmark |
Object used to store bookmarks to blobs to be changed later. More... | |
class | CBulkInsert |
Object used to perform bulk-inserting operations to database. More... | |
class | CSDB_Decryptor |
Database password decryptor. More... | |
class | CSDB_ConnectionParam |
Convenience class to initialize database connection parameters from URL-like strings and/or application configuration and/or hard-code. More... | |
class | CDatabase |
Database connection object. More... | |
class | CSDBAPI |
Macros | |
#define | SDBAPI_TRANSACTION(obj) DBAPI_TRANSACTION(obj) |
Establish an automatically managed anonymous SQL transaction on the specified object's connection for the duration of the immediately following code block: SDBAPI_TRANSACTION(obj) { ... More... | |
Enumerations | |
enum | ESDB_Type { eSDB_Byte , eSDB_Short , eSDB_Int4 , eSDB_Int8 , eSDB_Float , eSDB_Double , eSDB_String , eSDB_StringUCS2 , eSDB_Binary , eSDB_DateTime , eSDB_BigDateTime , eSDB_Text , eSDB_TextUCS2 , eSDB_Image , eSDB_StringMax , eSDB_StringMaxUCS2 , eSDB_BinaryMax , eSDB_Bit } |
Database types used throughout API. More... | |
enum | ESP_ParamType { eSP_In , eSP_InOut } |
Stored procedure and statement parameter types. More... | |
enum | ENewBlobStoreFlags { fNBS_ZLib = 1 << 0 , fNBS_BZLib = 1 << 1 , fNBS_LogIt = 1 << 2 , fNBS_IsText = 1 << 3 , fNBS_Preallocated = 1 << 4 } |
Flags for NewBlobStore methods. More... | |
Functions | |
DECLARE_SAFE_FLAGS_TYPE (ENewBlobStoreFlags, TNewBlobStoreFlags) | |
DECLARE_SAFE_FLAGS (ENewBlobStoreFlags) | |
CAutoTrans::CSubject | DBAPI_MakeTrans (CDatabase &db) |
(S)DBAPI_TRANSACTION glue for CDatabase. More... | |
CAutoTrans::CSubject | DBAPI_MakeTrans (CQuery &query) |
(S)DBAPI_TRANSACTION glue for CQuery. More... | |
CBulkInsert & | NullValue (CBulkInsert &bi) |
Manipulator putting null value into the bulk-insert row. More... | |
CBulkInsert & | EndRow (CBulkInsert &bi) |
Manipulator ending row in the bulk-insert object. More... | |
#define SDBAPI_TRANSACTION | ( | obj | ) | DBAPI_TRANSACTION(obj) |
Establish an automatically managed anonymous SQL transaction on the specified object's connection for the duration of the immediately following code block: SDBAPI_TRANSACTION(obj) { ...
}
Automatically COMMIT upon reaching the end of the block normally. Automatically ROLLBACK upon leaving the block early, via a break or return statement or uncaught exception. A client crash or severed connection will trigger an implicit server-side ROLLBACK.
Nested transactions are possible, and will use savepoints for inner transactions so they can fail cleanly (without also canceling outer transactions).
Definition at line 227 of file sdbapi.hpp.
enum ENewBlobStoreFlags |
Flags for NewBlobStore methods.
Definition at line 200 of file sdbapi.hpp.
enum ESDB_Type |
Database types used throughout API.
Each corresponds most naturally to a common Transact-SQL type, but implicit conversion is also possible in many cases, including to and from types with no exact SDBAPI equivalent.
Definition at line 172 of file sdbapi.hpp.
enum ESP_ParamType |
Stored procedure and statement parameter types.
Enumerator | |
---|---|
eSP_In | Parameter is only passed to server, no return is expected. |
eSP_InOut | Parameter can be returned from stored procedure. |
Definition at line 194 of file sdbapi.hpp.
CAutoTrans::CSubject DBAPI_MakeTrans | ( | CDatabase & | db | ) |
(S)DBAPI_TRANSACTION glue for CDatabase.
Definition at line 3513 of file sdbapi.cpp.
References CDatabaseImpl::GetConnection(), and CDatabase::m_Impl.
Referenced by DBAPI_MakeTrans().
CAutoTrans::CSubject DBAPI_MakeTrans | ( | CQuery & | query | ) |
(S)DBAPI_TRANSACTION glue for CQuery.
Definition at line 3518 of file sdbapi.cpp.
References DBAPI_MakeTrans(), and query.
DECLARE_SAFE_FLAGS | ( | ENewBlobStoreFlags | ) |
DECLARE_SAFE_FLAGS_TYPE | ( | ENewBlobStoreFlags | , |
TNewBlobStoreFlags | |||
) |
CBulkInsert& EndRow | ( | CBulkInsert & | bi | ) |
Manipulator ending row in the bulk-insert object.
Definition at line 2508 of file sdbapi.cpp.
References CBulkInsertImpl::EndRow(), and CBulkInsert::m_Impl.
Referenced by CSdbapiTest::Run().
CBulkInsert& NullValue | ( | CBulkInsert & | bi | ) |
Manipulator putting null value into the bulk-insert row.
Definition at line 2501 of file sdbapi.cpp.
References CBulkInsert::m_Impl, and CBulkInsertImpl::WriteNull().
Referenced by do_binds(), and test_bind().