2
0

Add/fix comments

This commit is contained in:
Jack Christensen
2014-07-09 08:10:32 -05:00
parent c4db9d3547
commit eb8b2a16ff
+4 -2
View File
@@ -36,7 +36,10 @@ func (e SerializationError) Error() string {
return string(e) return string(e)
} }
// Scanner is an interface used to decode values from the PostgreSQL server.
type Scanner interface { type Scanner interface {
// Scan MUST check fd's DataType and FormatCode before decoding. It should
// not assume that it was called on the type of value.
Scan(qr *QueryResult, fd *FieldDescription, size int32) error Scan(qr *QueryResult, fd *FieldDescription, size int32) error
} }
@@ -53,8 +56,7 @@ type TextEncoder interface {
// BinaryEncoder is an interface used to encode values in binary format for // BinaryEncoder is an interface used to encode values in binary format for
// transmission to the PostgreSQL server. It is used by prepared queries. // transmission to the PostgreSQL server. It is used by prepared queries.
type BinaryEncoder interface { type BinaryEncoder interface {
// EncodeText MUST sanitize (and quote, if necessary) the returned string. // EncodeBinary writes the binary value to w
// It will be interpolated directly into the SQL string.
EncodeBinary(w *WriteBuf) error EncodeBinary(w *WriteBuf) error
} }