Open djzort opened 6 years ago
It's definitely worth exploring ODPI-C as the DB access layer. ODPI-C's exposes common OCI functionality in a consumable way. Active projects use it, and it is maintained, tested, etc. The most prominent Oracle DB drivers using ODPI-C are Python cx_Oracle, Node.js node-oracledb, and Go goracle.
It has a simpler memory management for binding variables and fetching.
Binding and 'defining' (for fetches) are automatically converted to "native" C types so that additional calls do not need to be made - this is of note particularly for numbers and dates. The ability to retrieve LONG and LOB columns as strings/buffers is an advantage as well.
Provides a "safer" API: resource handles are validated. A reference counting mechanism adds resiliency by stopping applications destroying in-use OCI resources.
The API makes connection management simpler. For example it automatically does session pool pinging to provide better "High Availability".
etc etc
Oracle Database Programming Interface for C (ODPI-C) is an open source library of C code that simplifies the use of common Oracle Call Interface (OCI) features for Oracle Database drivers and user applications. The ODPI-C project is open source and maintained by Oracle Corp.
https://oracle.github.io/odpi/
It would likely make sense to create a new DBD driver for it, so as not to cut off anyone still building against Oracle 9 on HPUX etc
Suggested by https://github.com/cjbj