Project goal: pure-Python implementation of the Informix SQLI wire protocol. No CSDK, no JVM, no native deps. Targets icr.io/informix /informix-developer-database (port 9088) as the dev/test instance. Phase 0 is a documentation-only spike that gates all implementation work. The four scaffolds: - README.md: project status and Phase 0 deliverable index - docs/PROTOCOL_NOTES.md: byte-level wire-format reference (TBD) - docs/JDBC_NOTES.md: reverse-lookup index into the decompiled IBM JDBC driver (4.50.4.1), populated from build/jdbc-src/ once the decompile lands - docs/DECISION_LOG.md: running rationale, with the Phase-1 paramstyle /Python-floor/autocommit decisions pre-locked so they don't churn later CLAUDE.md is gitignored — operator-private context, public-PyPI repo.
67 lines
3.0 KiB
Markdown
67 lines
3.0 KiB
Markdown
# IBM JDBC Driver — Wire Protocol Class Index
|
|
|
|
> **Phase 0 spike artifact.** Reverse-lookup index into the decompiled `com.ibm.informix:jdbc:4.50.4.1` JAR. This document tells us which Java class to read when we want to understand how the JDBC driver implements a given wire-protocol concern.
|
|
>
|
|
> **Legal note**: the decompiled source lives in `build/jdbc-src/` and is **not committed to this repository**. It is consulted as a clean-room understanding reference only. The Python implementation in `src/informix_db/` is written from `PROTOCOL_NOTES.md` (which cites observed packet bytes), not from the Java source.
|
|
|
|
## Decompilation
|
|
|
|
```bash
|
|
# Get the JAR
|
|
curl -O https://repo1.maven.org/maven2/com/ibm/informix/jdbc/4.50.4.1/jdbc-4.50.4.1.jar
|
|
|
|
# Decompile (CFR — https://www.benf.org/other/cfr/)
|
|
java -jar cfr.jar jdbc-4.50.4.1.jar --outputdir build/jdbc-src/
|
|
```
|
|
|
|
Driver version: `4.50.4.1` (latest as of 2026-05-02 on Maven Central).
|
|
|
|
## Top-level package layout
|
|
|
|
TBD — populate after decompilation.
|
|
|
|
Expected (from research):
|
|
- `com.informix.jdbc` — driver entry, connection, statement, result-set
|
|
- Likely subpackages for protocol I/O, type system, error mapping
|
|
|
|
## Class index (responsibility → class)
|
|
|
|
| Concern | Class | File path under `build/jdbc-src/` | Notes |
|
|
|---------|-------|------------------------------------|-------|
|
|
| Driver entry point | `com.informix.jdbc.IfxDriver` | TBD | implements `java.sql.Driver` |
|
|
| Connection | `com.informix.jdbc.IfxConnection` | TBD | extends `java.sql.Connection` |
|
|
| Wire socket I/O | TBD | TBD | look for `DataOutputStream` / `DataInputStream` users |
|
|
| Message framing | TBD | TBD | length-prefix + type-tag handlers |
|
|
| Login handshake | TBD | TBD | username/password/database selection |
|
|
| Auth method dispatch | TBD | TBD | plain / obfuscated / GSSAPI |
|
|
| Statement execute | TBD | TBD | EXECUTE / EXECUTE IMMEDIATE entry points |
|
|
| Prepared statement | TBD | TBD | parameter descriptors |
|
|
| Result-set parsing | TBD | TBD | column descriptors + row decoding |
|
|
| Type codecs (encoders) | TBD | TBD | `IfxTypeId` likely; per-type encoder methods |
|
|
| Type codecs (decoders) | TBD | TBD | per-type decoder methods |
|
|
| Error decoding (SQLSTATE) | TBD | TBD | error-message → SQLException mapping |
|
|
| Disconnection | TBD | TBD | logout / socket close |
|
|
| Protocol trace | `com.informix.jdbc.*.getProtoTrace` | TBD | Useful debug hook; understand what it logs |
|
|
|
|
## Method-level pointers
|
|
|
|
> As we identify specific methods that map to specific wire bytes, record them here. Format: `Class#method() → wire effect`.
|
|
|
|
- _(none yet)_
|
|
|
|
## Things to grep for
|
|
|
|
```bash
|
|
# Wire I/O entry points
|
|
grep -rln "DataOutputStream\|DataInputStream" build/jdbc-src/
|
|
|
|
# Type code constants
|
|
grep -rln "TYPEID\|IfxTypeId\|TypeId" build/jdbc-src/
|
|
|
|
# Auth method strings
|
|
grep -rln "OBFUSCATE\|PWDOBFUSCATION\|GSS\|KERBEROS" build/jdbc-src/
|
|
|
|
# SQLSTATE / error mapping
|
|
grep -rln "SQLSTATE\|SQLException" build/jdbc-src/
|
|
```
|