Repository navigation
oracle-native 0.3.0
oracle-native 0.3.0 adds proxy authentication, tnsnames.ora aliases, wallets with mutual TLS and SSL_SERVER_CERT_DN checks, pipelining, DRCP and JSON binds encoded as OSON.
"dependencies": {
"oracle-native": "~>0.3.0"
}Tested on Oracle Database 23ai Free, 21c XE and 18c XE; D frontend 2.097 and newer; vibe-core 1.22 to 2.x. A ddbc driver for oracle-native is in ddbc 0.10.0 (configuration ORACLE).
Added
- Proxy authentication (#21):
ConnectionOptions.proxyClient(parameter
proxy_client), or the user name writtenproxy[target]: the proxy user
logs in with its own password to a session of the target user, who must
allow it (ALTER USER target GRANT CONNECT THROUGH proxy). tnsnames.oraconnect aliases (#22):ConnectionOptions.parse(and so
new Connection(alias, user, password)and pools) resolves a name such as
SALESthroughtnsnames.orainconfig_dir(new optionconfigDir),
$TNS_ADMINor$ORACLE_HOME/network/admin, with several names per
entry, comments andIFILEincludes; parameters may follow the alias
(SALES?config_dir=/etc/oracle).- Wallets and server certificate subjects (#22):
walletLocation
(wallet_location,MY_WALLET_DIRECTORYin descriptors) reads an Oracle
wallet in PEM form (ewallet.pem): its certificates are the trusted CAs,
and its private key (passwordwalletPassword/wallet_password) and
certificate are used for mutual TLS.serverCertDn(ssl_server_cert_dn,
SSL_SERVER_CERT_DN) checks the server certificate's subject instead of
the host name;ssl_server_dn_match=off/SSL_SERVER_DN_MATCH=offchecks
only the certificate chain. Needs dbwire 0.6. - Pipelines (#20):
conn.pipeline().exec(...).query(...).commit().run()
sends the statements together and reads their responses afterwards on 23ai
(one round trip;Connection.supportsPipelining), and runs them one by
one on older servers, with the samePipelineResults (row counts, OUT
values, all rows of queries, errors withrun(true)). The client now
offers TNS 319 and uses END_OF_RESPONSE when the server offers it. - DRCP, Database Resident Connection Pooling (#23):
serverTypepooled
(:pooled,server=pooled,(SERVER=POOLED)) with a connection class
(connectionClass,pool_connection_class,POOL_CONNECTION_CLASS) and
purity (purity,pool_purity,POOL_PURITY). AConnectionPoolhands
the session back to the database's pool when a connection is returned
(Connection.releaseSession), with a connection class of its own and
purityself; closing a DRCP connection ends its session without a logoff. - JSON parameters (#24):
std.json.JSONValuevalues and JSON text
(Parameter.json) are sent as JSON, encoded by the client in Oracle's
binary format (OSON), so the server doesn't parse text: for JSON columns,
PL/SQLJSONparameters (IN, OUT, IN OUT) andRETURNING ... INTO
(Parameter.output!JSONValue). Numbers in JSON text are kept exactly
(rounded to NUMBER's precision, or BINARY_DOUBLE outside its range, as the
server's parser does); field names longer than 255 bytes need 23ai. Servers
before 21c get the text.Variantparameters takeJSONValuetoo. INTERVAL YEAR TO MONTHvalues inside JSON are decoded (P1Y2M).
Fixed
- The session-return server piggyback was read with the wrong layout (it
comes with DRCP).Connection.sessionIdandserialNumberfollow the
session the server attaches. - A statement parsed again while its SQL was cached and in use (an open
result of the same SQL) kept its cursor open on the server after its result
was done; it is closed now. - Running a PL/SQL block with OUT parameters a second time on a connection
(a re-execution of its cached cursor) failed with ORA-03146 and the server
closed the connection: the client sent values for the OUT parameters and
didn't know their directions without the server's IO vector. BINARY_FLOATandBINARY_DOUBLEvalues inside JSON read as
JSON_SERIALIZEwrites them (0.00001,100,1E+300), not as
1e-05,1e+02,1e+300.
Full changelog: v0.2.0...v0.3.0
🤖 Generated with Claude Code