From 5ebf34e4848b10c928870f16a94090b0b00607c1 Mon Sep 17 00:00:00 2001 From: Oleg Kovalov Date: Mon, 5 Oct 2020 20:22:45 +0200 Subject: [PATCH] remove unused definitions on messages.go --- messages.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/messages.go b/messages.go index 8e00f65f..5324cbb5 100644 --- a/messages.go +++ b/messages.go @@ -3,16 +3,9 @@ package pgx import ( "database/sql/driver" - "github.com/jackc/pgio" "github.com/jackc/pgtype" ) -const ( - copyData = 'd' - copyFail = 'f' - copyDone = 'c' -) - func convertDriverValuers(args []interface{}) ([]interface{}, error) { for i, arg := range args { switch arg := arg.(type) { @@ -28,15 +21,3 @@ func convertDriverValuers(args []interface{}) ([]interface{}, error) { } return args, nil } - -// appendQuery appends a PostgreSQL wire protocol query message to buf and returns it. -func appendQuery(buf []byte, query string) []byte { - buf = append(buf, 'Q') - sp := len(buf) - buf = pgio.AppendInt32(buf, -1) - buf = append(buf, query...) - buf = append(buf, 0) - pgio.SetInt32(buf[sp:], int32(len(buf[sp:]))) - - return buf -}