Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

orcl_dbserver Class Reference

class implements interface dbserver More...

#include <orclsrv.h>

Inheritance diagram for orcl_dbserver:

dbserver_impl dbserver terimber_thread_employer terimber_log_helper terimber_log

List of all members.

Public Member Functions

 orcl_dbserver (size_t ident)
 constructor
virtual ~orcl_dbserver ()
 destructor

Protected Member Functions

virtual void v_connect (bool trusted_connection, const char *connection_string)
 establishes connection to db
virtual void v_disconnect ()
 closes connection
virtual void v_start_transaction ()
 starts transaction
virtual void v_commit ()
 commits transaction
virtual void v_rollback ()
 rolls back transaction
virtual bool v_is_connect_alive ()
 checks if the connection is alive
virtual void v_before_execute ()
 pure virtual functions
virtual void v_after_execute ()
 calls additional function after executing the sql statement
virtual void v_before_bind_columns ()
 before bind columns sometimes we got db specific
virtual void v_execute ()
 executes SQL expression
virtual void v_close ()
 closes opened query
virtual void v_fetch ()
 fetches block of rows
virtual void v_replace_quote ()
 replaces quote to the available sign for native drive
virtual void v_bind_one_param (size_t index)
 binds one param by index
virtual void v_bind_one_column (size_t index)
 binds one column by index
virtual size_t v_get_number_columns ()
 gets number columns in query
virtual void v_convert_one_value (size_t row, size_t index, terimber_db_value &val)
 converts one field value to variant buffer
virtual void v_get_one_column_info (size_t index)
 gets one column info from native driver
virtual void v_form_sql_string ()
 forms SQL expression depending on type selected and native driver
virtual void v_rebind_one_param (size_t index)
 rebinds one param for input/output or output params
virtual void v_interrupt_async ()
 terminates asynchronous action
virtual dbtypes v_native_type_to_client_type (size_t native_type)
 converts types

Private Attributes

OCIEnv * _envhp
 oracle environment handle
OCISvcCtx * _svchp
 oracle server context handle
OCIError * _errhp
 oracle error interface handle
OCIStmt * _stmthp
 oracle SQL statement handle


Detailed Description

class implements interface dbserver

Definition at line 39 of file orclsrv.h.


Constructor & Destructor Documentation

orcl_dbserver::orcl_dbserver ( size_t  ident  ) 

constructor

Parameters:
ident  server ident

Definition at line 59 of file orclsrv.cpp.

orcl_dbserver::~orcl_dbserver (  )  [virtual]


Member Function Documentation

void orcl_dbserver::v_connect ( bool  trusted_connection,
const char *  connection_string 
) [protected, virtual]

establishes connection to db

must be overriden database specific

Implements dbserver_impl.

Definition at line 78 of file orclsrv.cpp.

References _envhp, _errhp, _svchp, exception::_throw(), check_retcode_db, and str_template::strlen().

void orcl_dbserver::v_disconnect (  )  [protected, virtual]

closes connection

Implements dbserver_impl.

Definition at line 111 of file orclsrv.cpp.

References _envhp, _errhp, _svchp, dbserver_impl::_temp_allocator, check_retcode_db, byte_allocator::clear_extra(), and v_close().

void orcl_dbserver::v_start_transaction (  )  [protected, virtual]

starts transaction

Implements dbserver_impl.

Definition at line 139 of file orclsrv.cpp.

References _errhp, _svchp, and check_retcode_db.

void orcl_dbserver::v_commit (  )  [protected, virtual]

commits transaction

Implements dbserver_impl.

Definition at line 146 of file orclsrv.cpp.

References _errhp, _svchp, and check_retcode_db.

void orcl_dbserver::v_rollback (  )  [protected, virtual]

rolls back transaction

Implements dbserver_impl.

Definition at line 153 of file orclsrv.cpp.

References _errhp, _svchp, and check_retcode_db.

bool orcl_dbserver::v_is_connect_alive (  )  [protected, virtual]

checks if the connection is alive

Implements dbserver_impl.

Definition at line 160 of file orclsrv.cpp.

References dbserver_impl::_is_connect().

void orcl_dbserver::v_before_execute (  )  [protected, virtual]

pure virtual functions

allocates resources before executing sql statement

Implements dbserver_impl.

Definition at line 174 of file orclsrv.cpp.

References _envhp, _errhp, dbserver_impl::_sql, _stmthp, check_retcode, and base_string< T >::length().

void orcl_dbserver::v_after_execute (  )  [protected, virtual]

calls additional function after executing the sql statement

Implements dbserver_impl.

Definition at line 181 of file orclsrv.cpp.

void orcl_dbserver::v_before_bind_columns (  )  [protected, virtual]

before bind columns sometimes we got db specific

Implements dbserver_impl.

Definition at line 550 of file orclsrv.cpp.

void orcl_dbserver::v_execute (  )  [protected, virtual]

void orcl_dbserver::v_close (  )  [protected, virtual]

closes opened query

Implements dbserver_impl.

Definition at line 211 of file orclsrv.cpp.

References dbserver_impl::_cols, dbserver_impl::_params, _stmthp, and base_vector< T >::size().

Referenced by v_disconnect(), and v_interrupt_async().

void orcl_dbserver::v_replace_quote (  )  [protected, virtual]

size_t orcl_dbserver::v_get_number_columns (  )  [protected, virtual]

gets number columns in query

Implements dbserver_impl.

Definition at line 631 of file orclsrv.cpp.

References _errhp, _stmthp, and check_retcode.

void orcl_dbserver::v_get_one_column_info ( size_t  index  )  [protected, virtual]

void orcl_dbserver::v_interrupt_async (  )  [protected, virtual]

terminates asynchronous action

Implements dbserver_impl.

Definition at line 1051 of file orclsrv.cpp.

References v_close().

dbtypes orcl_dbserver::v_native_type_to_client_type ( size_t  native_type  )  [protected, virtual]

converts types

Implements dbserver_impl.

Definition at line 1059 of file orclsrv.cpp.

References db_binary, db_date, db_double, db_numeric, db_sb4, db_string, db_ub4, and db_unknown.


Member Data Documentation

OCIEnv* orcl_dbserver::_envhp [private]

oracle environment handle

Definition at line 75 of file orclsrv.h.

Referenced by v_before_execute(), v_bind_one_column(), v_connect(), v_disconnect(), and v_execute().

OCISvcCtx* orcl_dbserver::_svchp [private]

oracle server context handle

Definition at line 76 of file orclsrv.h.

Referenced by v_commit(), v_connect(), v_convert_one_value(), v_disconnect(), v_execute(), v_rebind_one_param(), v_rollback(), and v_start_transaction().

OCIStmt* orcl_dbserver::_stmthp [private]

oracle SQL statement handle

Definition at line 78 of file orclsrv.h.

Referenced by v_before_execute(), v_bind_one_column(), v_close(), v_execute(), v_fetch(), v_get_number_columns(), and v_get_one_column_info().


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


© Copyright Terimber 2003-.