From 10655944aa609056b617130a76bde95a31288b63 Mon Sep 17 00:00:00 2001 From: Jonathan Rudenberg Date: Fri, 2 Jan 2015 17:05:44 -0500 Subject: [PATCH] Minor docs fixes for large objects --- README.md | 1 + large_objects.go | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0ffee866..fe385a13 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/large_objects.go b/large_objects.go index b208aede..a4922ef1 100644 --- a/large_objects.go +++ b/large_objects.go @@ -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