mirror of https://github.com/jackc/pgx.git
remove unused definitions on messages.go
parent
557018a24e
commit
5ebf34e484
19
messages.go
19
messages.go
|
@ -3,16 +3,9 @@ package pgx
|
||||||
import (
|
import (
|
||||||
"database/sql/driver"
|
"database/sql/driver"
|
||||||
|
|
||||||
"github.com/jackc/pgio"
|
|
||||||
"github.com/jackc/pgtype"
|
"github.com/jackc/pgtype"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
copyData = 'd'
|
|
||||||
copyFail = 'f'
|
|
||||||
copyDone = 'c'
|
|
||||||
)
|
|
||||||
|
|
||||||
func convertDriverValuers(args []interface{}) ([]interface{}, error) {
|
func convertDriverValuers(args []interface{}) ([]interface{}, error) {
|
||||||
for i, arg := range args {
|
for i, arg := range args {
|
||||||
switch arg := arg.(type) {
|
switch arg := arg.(type) {
|
||||||
|
@ -28,15 +21,3 @@ func convertDriverValuers(args []interface{}) ([]interface{}, error) {
|
||||||
}
|
}
|
||||||
return args, nil
|
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
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue