Add/fix comments

scan-io
Jack Christensen 2014-07-09 08:10:32 -05:00
parent c4db9d3547
commit eb8b2a16ff
1 changed files with 4 additions and 2 deletions

View File

@ -36,7 +36,10 @@ func (e SerializationError) Error() string {
return string(e)
}
// Scanner is an interface used to decode values from the PostgreSQL server.
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
}
@ -53,8 +56,7 @@ type TextEncoder interface {
// BinaryEncoder is an interface used to encode values in binary format for
// transmission to the PostgreSQL server. It is used by prepared queries.
type BinaryEncoder interface {
// EncodeText MUST sanitize (and quote, if necessary) the returned string.
// It will be interpolated directly into the SQL string.
// EncodeBinary writes the binary value to w
EncodeBinary(w *WriteBuf) error
}