00001 /*00002 * The Software License00003 * =================================================================================00004 * Copyright (c) 2003-.The Terimber Corporation. All rights reserved.00005 * =================================================================================00006 * Redistributions of source code must retain the above copyright notice, 00007 * this list of conditions and the following disclaimer.00008 * Redistributions in binary form must reproduce the above copyright notice, 00009 * this list of conditions and the following disclaimer in the documentation 00010 * and/or other materials provided with the distribution.00011 * The end-user documentation included with the redistribution, if any, 00012 * must include the following acknowledgment:00013 * "This product includes software developed by the Terimber Corporation."00014 * =================================================================================00015 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, 00016 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 00017 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00018 * IN NO EVENT SHALL THE TERIMBER CORPORATION OR ITS CONTRIBUTORS BE LIABLE FOR 00019 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00020 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00021 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 00022 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT00023 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE00024 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.00025 * ================================================================================00026 */00027
00028 #ifndef _terimber_orclsrv_h_00029 #define _terimber_orclsrv_h_00030
00031 #include "db/db.h"00032 #include "dborcl/orclinc.h"00033
00034 BEGIN_TERIMBER_NAMESPACE00035 #pragma pack(4)00036
00039class orcl_dbserver : publicdbserver_impl00040 {
00041 public:
00043 orcl_dbserver( size_t ident
00044 );
00046 virtual00047 ~orcl_dbserver();
00048
00049 protected:
00050 // database specific00051 virtualvoidv_connect(bool trusted_connection, constchar* connection_string);
00052 virtualvoidv_disconnect();
00053 virtualvoidv_start_transaction();
00054 virtualvoidv_commit();
00055 virtualvoidv_rollback();
00056 virtualboolv_is_connect_alive();
00057 virtualvoidv_before_execute();
00058 virtualvoidv_after_execute();
00059 virtualvoidv_before_bind_columns();
00060 virtualvoidv_execute();
00061 virtualvoidv_close();
00062 virtualvoidv_fetch();
00063 virtualvoidv_replace_quote();
00064 virtualvoidv_bind_one_param(size_t index);
00065 virtualvoidv_bind_one_column(size_t index);
00066 virtualsize_tv_get_number_columns();
00067 virtualvoidv_convert_one_value(size_t row, size_t index, terimber_db_value& val);
00068 virtualvoidv_get_one_column_info(size_t index);
00069 virtualvoidv_form_sql_string();
00070 virtualvoidv_rebind_one_param(size_t index);
00071 virtualvoidv_interrupt_async();
00072 virtualdbtypesv_native_type_to_client_type(size_t native_type);
00073
00074 private:
00075 OCIEnv* _envhp;
00076 OCISvcCtx* _svchp;
00077 OCIError* _errhp;
00078 OCIStmt* _stmthp;
00079 };
00080
00082 // pool support00085class orcl_db_creator : publicdb_creator< orcl_db_creator >
00086 {
00087 public:
00089 static00090 db_entry*
00091 create( constdb_arg& arg
00092 );
00093 };
00094
00095typedefpool< orcl_db_creator >orcl_db_pool_t;
00096
00097 #pragma pack()00098 END_TERIMBER_NAMESPACE00099
00100 #endif // _terimber_orclsrv_h_00101