OpenPetra
Free Administration Software for Non-Profits
Ict.Common.DB.DBAccess Class Reference

Contains some Constants and a Global Variable for use with Database Access. More...

Static Public Member Functions

static TDataBase Connect (string AConnectionName, TDataBase ADataBase=null)
 Creates a new TDataBase instance and opens a DB Connection on it. More...
 
static void WriteTransaction (ref TDBTransaction ATransaction, ref bool ASubmitOK, Action AEncapsulatedDBAccessCode)
 this is a direct way to create a serializable transaction on an anonymous database connection More...
 
static void ReadTransaction (ref TDBTransaction ATransaction, Action AEncapsulatedDBAccessCode)
 this is a direct way to create a read transaction on an anonymous database connection More...
 

Static Public Attributes

const Int32 DB_DEBUGLEVEL_DETAILED_CONN_INFO = 2
 DebugLevel for logging of detailed DB Establishing/DB Disconnection information. More...
 
const Int32 DB_DEBUGLEVEL_QUERY = 3
 DebugLevel for logging the SQL code from DB queries. More...
 
const Int32 DB_DEBUGLEVEL_TRANSACTION = 2
 DebugLevel for logging information about DB Transactions. More...
 
const Int32 DB_DEBUGLEVEL_TRANSACTION_DETAIL = 10
 DebugLevel for logging information about DB Transactions. More...
 
const Int32 DB_DEBUGLEVEL_RESULT = 6
 DebugLevel for logging results from DB queries: is 6 (was 4 before). More...
 
const Int32 DB_DEBUGLEVEL_TRACE = 10
 DebugLevel for tracing (very verbose log output): is 10 (was 4 before). More...
 
const Int32 DB_DEBUGLEVEL_COORDINATED_DBACCESS_STACKTRACES = 11
 DebugLevel for dumping stacktraces when Thread-safe access to the TDataBase Class is requested/released (extremely verbose log output): is 11 More...
 

Properties

static TDBType DBType [get]
 Returns the type of the RDBMS that is defined in the config file More...
 

Detailed Description

Contains some Constants and a Global Variable for use with Database Access.

Member Function Documentation

◆ Connect()

static TDataBase Ict.Common.DB.DBAccess.Connect ( string  AConnectionName,
TDataBase  ADataBase = null 
)
inlinestatic

Creates a new TDataBase instance and opens a DB Connection on it.

Parameters
AConnectionNameName of the DB Connection (optional). It gets logged and hence can aid debugging (also useful for Unit Testing).
ADataBaseif this is not null, no new Connection is opened, but this connection is reused
Returns
TDataBase instance with an open DB Connection.

◆ ReadTransaction()

static void Ict.Common.DB.DBAccess.ReadTransaction ( ref TDBTransaction  ATransaction,
Action  AEncapsulatedDBAccessCode 
)
inlinestatic

this is a direct way to create a read transaction on an anonymous database connection

◆ WriteTransaction()

static void Ict.Common.DB.DBAccess.WriteTransaction ( ref TDBTransaction  ATransaction,
ref bool  ASubmitOK,
Action  AEncapsulatedDBAccessCode 
)
inlinestatic

this is a direct way to create a serializable transaction on an anonymous database connection

Member Data Documentation

◆ DB_DEBUGLEVEL_COORDINATED_DBACCESS_STACKTRACES

const Int32 Ict.Common.DB.DBAccess.DB_DEBUGLEVEL_COORDINATED_DBACCESS_STACKTRACES = 11
static

DebugLevel for dumping stacktraces when Thread-safe access to the TDataBase Class is requested/released (extremely verbose log output): is 11

◆ DB_DEBUGLEVEL_DETAILED_CONN_INFO

const Int32 Ict.Common.DB.DBAccess.DB_DEBUGLEVEL_DETAILED_CONN_INFO = 2
static

DebugLevel for logging of detailed DB Establishing/DB Disconnection information.

◆ DB_DEBUGLEVEL_QUERY

const Int32 Ict.Common.DB.DBAccess.DB_DEBUGLEVEL_QUERY = 3
static

DebugLevel for logging the SQL code from DB queries.

◆ DB_DEBUGLEVEL_RESULT

const Int32 Ict.Common.DB.DBAccess.DB_DEBUGLEVEL_RESULT = 6
static

DebugLevel for logging results from DB queries: is 6 (was 4 before).

◆ DB_DEBUGLEVEL_TRACE

const Int32 Ict.Common.DB.DBAccess.DB_DEBUGLEVEL_TRACE = 10
static

DebugLevel for tracing (very verbose log output): is 10 (was 4 before).

◆ DB_DEBUGLEVEL_TRANSACTION

const Int32 Ict.Common.DB.DBAccess.DB_DEBUGLEVEL_TRANSACTION = 2
static

DebugLevel for logging information about DB Transactions.

◆ DB_DEBUGLEVEL_TRANSACTION_DETAIL

const Int32 Ict.Common.DB.DBAccess.DB_DEBUGLEVEL_TRANSACTION_DETAIL = 10
static

DebugLevel for logging information about DB Transactions.

Property Documentation

◆ DBType

TDBType Ict.Common.DB.DBAccess.DBType
staticget

Returns the type of the RDBMS that is defined in the config file


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