加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

OTL 4.0, Introduction

发布时间:2020-12-13 17:47:29 所属栏目:百科 来源:网络整理
导读:Introduction This document describes the Oracle,ODBC and DB2-CLI Template Library,Version 4.0 (OTL 4.0). OTL 4.0 is a C++ library based on C++ templates. OTL 4.0 was designed as a combination of a C++ template framework and OTL-adapters. T

Introduction

This document describes the Oracle,ODBC and DB2-CLI Template Library,Version 4.0 (OTL 4.0). OTL 4.0 is a C++ library based on C++ templates.

OTL 4.0 was designed as a combination of a C++ template framework and OTL-adapters. The framework is a generic implementation of the concept of OTL streams. The OTL-adapters are thin wrappers around the database APIs and are used as class type parameters to be passed into the template framework.

OTL 4.0 covers the functionality of a full featured C++ database access library with just a handful of classes: otl_stream, otl_connect,otl_exception,otl_long_string,and several template PL/SQL (Oracle) table container classes,generated from the template framework and the OTL-adapters.

The OTL code gets expanded into direct database API function calls,so it provides very decent performance (only 10-15% overhead compared with the database APIs themselves) and reliability in multiprocessor environments as well as traditional batch programs. OTL 4.0,being a template library,is highly portable since it is self-sufficient and compact enough.

OTL 4.0 is ANSI C++ compliant (ANSI C++ typecasts,clean templatized code,etc.),tightly integrated with the Standard Template Library (STL) via STL-compliant stream iterators,and natively supports the STL std::string by the otl_stream class. OTL integrates with ACE,and supports ACE_TStrings. A new C++ standard (C++11) was adopted in 2011. OTL uses C++-11 features like move constructors,move assignment operators,nullptr,etc. in order to keep its code clean and modern for compilers that support C++11 features.

OTL 4.0 supports all major and a few minor relational database types (Oracle,MS SQL Server,DB2,Informix,TimesTen,MAX/DB,etc.) natively via the corresponding database API. For the rest of database types (PostgreSQL,MySQL,Sybase,SQLite,MS ACCESS,Firebird,OTL has support via ODBC 3.x,or ODBC 2.5 (legacy applications).

In the last several years (2004-present),transition from 32-bit platforms to 64-bit platforms has occurred: OTL's source code is portable,and it supports both 32-bit and 64-bit C++ compilers.

Also,OTL supports UTF-8 and UTF-16 string data for Oracle,and UTF-16 for the rest of the database types,when the underlying database API / ODBC driver supports it.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读