From f947f0971fcbd12262cf66094ec6324d0c23638a Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Tue, 14 Feb 2017 21:57:48 -0600 Subject: [PATCH] more v3 notes --- v3.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/v3.md b/v3.md index cd6345d0..89a080b2 100644 --- a/v3.md +++ b/v3.md @@ -34,6 +34,10 @@ Organize errors better Remove circular dependency between Conn and ConnPool such that ConnPool depends on Conn, but Conn doesn't know anything about ConnPool +Or maybe double-down on conn/pool coupling and improve connpool + +Add auto-idle pinging to conns in pool + Extract types Null* and Hstore to separate package Remove names from prepared statements - use database/sql style objects @@ -42,14 +46,13 @@ Better way of handling text/binary protocol choice than pgx.DefaultTypeFormats o Also maybe support binary and text for everything possible -Copy protocol support (this potentially ties in with text/binary protocol) -ValueReader / msgReader cleanup +dValueReader / msgReader cleanup Make easier / possible to mock Conn or ConnPool (https://github.com/jackc/pgx/pull/162) Every field that should not be set by user should be replaced by accessor method (e.g. Conn.PID, Conn.SecretKey) -Investigate strongly typed queries. i.e. Some sort of interface where varargs of Query, Exec, and Scan wouldn't happen. Need to be some low-level interface where (probably generated) functions could (more or less) directly read and write to the connection. +Investigate strongly typed queries. i.e. Some sort of interface where varargs of Query, Exec, and Scan wouldn't happen. Need to be some low-level interface where (probably generated) functions could (more or less) directly read and write to the connection. Clean code and type-safety / control would be the benefits. Row scanning performance is already so fast there is little to improve (go_db_bench shows under 1 microsecond per row). Reject scanning non-string like things into a string (e.g. binary encoded timestamptz to string). See https://github.com/jackc/pgx/issues/223