Expand description
Real, full-fidelity Oracle connect-string parsing.
This module parses the three connect-string forms understood by
python-oracledb thin mode, matching the reference parser
(impl/base/parsers.pyx / connect_params.pyx) semantics:
-
TNS connect descriptors —
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=..)(PORT=..))) (CONNECT_DATA=(SERVICE_NAME=..))), includingDESCRIPTION_LIST, multipleADDRESS_LIST/ADDRESS,LOAD_BALANCE/FAILOVER/SOURCE_ROUTE,RETRY_COUNT/RETRY_DELAY,EXPIRE_TIME,TRANSPORT_CONNECT_TIMEOUT,SDU,SECURITY(wallet / cert DN), and arbitrary pass-through keys. Case-insensitive keywords, nested parens, quoted values, and whitespace tolerance. -
EZConnect / EZConnect-Plus —
[proto://]host[,host2][:port][/service][:server][/instance][?k=v&..], including multiple hosts, multiple address lists (;), IPv6[::1], and the extended?key=valueparameters. -
tnsnames.ora — alias -> descriptor maps with comments (
#), multi-line entries, comma-separated alias lists, andIFILEincludes (with cycle detection), resolved relative toTNS_ADMIN/ a config dir.
Beyond parity, the parser produces rich diagnostics: every error points
at the offending byte offset with surrounding context, and Descriptor
offers a Descriptor::describe troubleshooting dump of the resolved
address list and connect data.
Modules§
- tnsnames
- Parses
tnsnames.orafiles into an alias -> connect-descriptor map.
Structs§
- Address
- A single resolved network endpoint (one
ADDRESSnode). - Address
List - A group of
Addresses (oneADDRESS_LISTnode) plus its navigation flags. - Connect
Data - Resolved
CONNECT_DATAsettings. - Description
- A single resolved
DESCRIPTIONnode. - Descriptor
- A fully parsed connect string: one or more
Descriptions. - Security
- Resolved
SECURITYsettings (only meaningful for TCPS addresses).
Enums§
- Protocol
- Transport protocol parsed from an
ADDRESSPROTOCOL=or an EZConnectproto://prefix. - Purity
- DRCP connection-pool purity (
(POOL_PURITY=..)). - Server
Type - Database server connection mode (
(SERVER=..)/:serverin EZConnect).
Constants§
- DEFAULT_
PORT - Default listener port when none is given (reference
DEFAULT_PORT). - DEFAULT_
RETRY_ DELAY - Default retry delay (reference
DEFAULT_RETRY_DELAY). - DEFAULT_
SDU - Default SDU in bytes (reference
DEFAULT_SDU). - DEFAULT_
TCPS_ PORT - Default TCPS listener port.
- DEFAULT_
TCP_ CONNECT_ TIMEOUT - Default transport connect timeout in seconds.
- MAX_SDU
- Maximum SDU after sanitisation.
- MIN_SDU
- Minimum SDU after sanitisation.
Functions§
- parse
- Parses a connect string into a
Descriptor.