From 5c05f3f2cef774b4853bb59eeb7d0850afb9403a Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Fri, 28 Dec 2018 12:06:51 -0600 Subject: [PATCH] Add more todo ideas --- v4.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/v4.md b/v4.md index 43442ecd..50f76d56 100644 --- a/v4.md +++ b/v4.md @@ -20,7 +20,13 @@ Potential Changes: * Change prepared statement usage from using name as SQL text to specifically calling prepared statement (more like database/sql). * Remove stdlib hack for RegisterDriverConfig now that database/sql supports better way * Consider how to simplify context.Context and query cancellation support (or even remove). This logic is very complex and error prone. Perhaps connections should simply be killed on a cancelled context rather than trying to recover. Separating PostgreSQL query cancellation from context might simplify them both. Also consider that PG queries can be cancelled and connections can be terminated via SQL functions from another connection. -* Better error handling. Consider package functions that interrogate errors rather comparing to value or type. Like net.Error interface but with addition of package functions that unwrap and interrogate the error. +* Better error handling. Consider package functions that interrogate errors rather comparing to value or type. Like net.Error interface but with addition of package functions that unwrap and interrogate the error. Maybe target the Go 2 error proposal. +* Add function that extracts logger from context to conn config. +* Maybe move to zerolog style interface for logging +* Add libpq style function layer: sendquery, sendpreparedquery, getresults etc. +* Consider strongly typed row scan in style of zerolog (chained functions instead of varargs) +* Consider strongly typed query parameters in style of zerolog (chained functions instead of varargs) +* Consider buffered query select where entire result set is received and parsed successfully or call returns error Minor Potential Changes: