Add more notes about v4

v4-experimental
Jack Christensen 2018-11-10 19:44:17 -06:00
parent 2e72ca854a
commit 06fb816b71
2 changed files with 28 additions and 7 deletions

28
v4.md Normal file
View File

@ -0,0 +1,28 @@
# V4
## Goals
The goal for V4 is to decouple the components of pgx, Conn and ConnPool in particular, such that specialized use cases can compose a custom driver from the driver parts rather than the Conn type have to monolithically support them.
Example cases:
* Almost PostgreSQL servers such as Amazon RedShift, CrateDB, and PgBouncer sometimes need slightly different behavior.
* Connection loss detection and query retry logic is highly application specific.
* Desired connection pool behavior can vary widely (this often goes along with the previous item).
* Replication support may be simpler if decoupled from the current high level pgx.Conn instead of simply wrapping it.
* Alternative or very low level row parsing that bypasses the `Rows.Scan` interface entirely.
Potential Changes:
* Decouple establish connection logic from using a connection. Base connection establishment should be re-usable for multiple connection types.
* Decouple connection pool from connections. Connection pool should be entirely replaceable.
* Decouple various logical layers of PostgreSQL connection such that an advanced user can choose what layer to work at and pgx still handles the lower level details. e.g Normal high level query level, PostgreSQL wire protocol message level, or wire byte level.
* Change prepared statement usage from using name as SQL text to specifically calling prepared statement (more like database/sql).
## Changes
`base.Conn` now contains core PostgreSQL connection functionality.
### Incompatible Changes
* `RuntimeParams` removed from `pgx.Conn` and added to `base.Conn`

View File

@ -1,7 +0,0 @@
# V4 Changes
`base.Conn` now contains core PostgreSQL connection functionality.
## Incompatible Changes
* `RuntimeParams` removed from `pgx.Conn` and added to `base.Conn`