Minor docs fixes for large objects

pull/59/head
Jonathan Rudenberg 2015-01-02 17:05:44 -05:00
parent b5eb23da7b
commit 10655944aa
2 changed files with 8 additions and 6 deletions

View File

@ -25,6 +25,7 @@ The pgx native interface supports the following extra features:
* Configurable connection pool with after connect hooks to do arbitrary connection setup
* PostgreSQL array to Go slice mapping for integers, floats, and strings
* Hstore support
* Large object support
## database/sql

View File

@ -78,18 +78,19 @@ func (o *LargeObjects) Unlink(oid Oid) error {
}
// A LargeObject is a large object stored on the server. It is only valid within
// the transaction that it was initialized in. It implements the these interfaces:
// the transaction that it was initialized in. It implements these interfaces:
//
// - io.Writer
// - io.Reader
// - io.Seeker
// - io.Closer
// io.Writer
// io.Reader
// io.Seeker
// io.Closer
type LargeObject struct {
fd int32
lo *LargeObjects
}
// Write writes
// Write writes p to the large object and returns the number of bytes written
// and an error if not all of p was written.
func (o *LargeObject) Write(p []byte) (int, error) {
n, err := fpInt32(o.lo.fp.CallFn("lowrite", []fpArg{fpIntArg(o.fd), p}))
return int(n), err