Repository navigation
oracle-native 0.1.0
The first release of oracle-native, a native Oracle Database client for D: the Oracle Net (TNS) and TTC protocols in pure D, for threads (blocking sockets) and vibe.d fibers, with no Oracle Instant Client, no OCI, no ODBC and no C libraries at build time.
"dependencies": {
"oracle-native": "~>0.1.0"
}Tested on Oracle Database 23ai Free, 21c XE and 18c XE (12.1 and newer on the wire); D frontend 2.097 and newer; vibe-core 1.22 to 2.x. Built on dbwire 0.5.
Unofficial project, not affiliated with Oracle. Oracle is a registered trademark of Oracle and/or its affiliates.
Added
- High-level API (#6):
ConnectionPool/PooledConnectionfor threads and
vibe.d fibers (dbwire's pool core;pool_*connection string parameters;
uncommitted changes rolled back when a connection is handed out again),
struct mapping (query!T,queryRow!T,queryValue!T,insertwith
array DML;@column,@ignore), fiber-mode tests against vibe-core 1.x
and 2.x, examples (:example-basic,:example-vibe). - LOBs and long data (#5): CLOB, NCLOB and BLOB columns fetched with their
contents (as LONG / LONG RAW) or, with thelob_locatorsoption, as
locators;Lob(length, read and readText at offsets, write and
writeText, trim, free),Value.getLob,getLobSize; temporary LOBs
(Connection.createLob) bound as parameters; BFILE reads; strings and
bytes of any length bound (values over 32767 bytes are sent after the
others, as LONG binds require). - Bind variables and statements (#4):
:1,:nameand?placeholders,
Parameter(D values to Oracle types, NULLs, named binds,Variant),
OUT and IN OUT parameters (Parameter.output,inOut,refCursor),
RETURNING ... INTO(one value per changed row),QueryResult.outputs,
rowCountandimplicitResults, REF cursors; array DML (execMany) with
row counts per row and batch errors; a statement cache per connection
(re-execution with new values, re-parse when a table changed; option
statement_cache_size);Connection.cancel. - Data types (#3):
BINARY_FLOAT/BINARY_DOUBLE,DATE,TIMESTAMP(with
nanoseconds),WITH TIME ZONE(offsets and regions, with a region table
generated from the server bytools/tzregions.d),WITH LOCAL TIME ZONE
(converted from the database to the session time zone),INTERVAL YEAR TO MONTH,INTERVAL DAY TO SECOND,LONG,LONG RAW,UROWID;NUMBERas an
exactDecimal. NewValuetype and getters (getInt,getBool,
getDecimal,getDate,getTime,getDateTime,getSysTime,
getNanoseconds,getDuration,getMonthInterval,getVariant); the
texts of dates, timestamps and intervals are those of the server. - Connecting and first statements (#2):
- the listener handshake (TNS 318: CONNECT, ACCEPT, REFUSE, REDIRECT,
RESEND, SDU up to 2 MB), protocol and data-type negotiation, Native Network
Encryption declined (servers requiring it are refused with a clear error); - O5LOGON password logins with 11g and 12c verifiers, the server's proof
checked, session information (serverVersion,sessionId,
serialNumber,serviceName,databaseName,maxIdentifierLength); - TLS (TCPS) through dbwire with certificate and host name verification;
oracle://URLs, Easy Connect ([tcps://]host[:port]/service[:server][/instance])
and connect descriptors (address lists,LOAD_BALANCE,SID,
INSTANCE_NAME,SERVER); failover to the next address; client
identification and session time zone options;exec(row counts),query(rows fetched in batches, duplicate-column
compression),commit,rollback,ping,close(logoff), an
autoCommitoption, server errors with ORA code and position, cursors
closed with the next call;NUMBER(text,long,double),VARCHAR2/CHAR/NVARCHAR2/NCHAR
text,RAW(hex),ROWID;- integration tests on 23ai, 21c and 18c in thread and fiber mode, TLS
through a test proxy.
- the listener handshake (TNS 318: CONNECT, ACCEPT, REFUSE, REDIRECT,
- Repository scaffold (#1): dub package
oracle-native(moduleoracle) on
dbwire 0.5, CI on Linux, Windows and macOS with DMD and LDC down to frontend
2.097, Oracle Database Free 23ai and XE 21c service containers for
integration tests, lint and documentation checks.