Create creates a new large object. If oid is zero, the server assigns an unused OID.
(ctx context.Context, oid uint32)
| 30 | |
| 31 | // Create creates a new large object. If oid is zero, the server assigns an unused OID. |
| 32 | func (o *LargeObjects) Create(ctx context.Context, oid uint32) (uint32, error) { |
| 33 | err := o.tx.QueryRow(ctx, "select lo_create($1)", oid).Scan(&oid) |
| 34 | return oid, err |
| 35 | } |
| 36 | |
| 37 | // Open opens an existing large object with the given mode. ctx will also be used for all operations on the opened large |
| 38 | // object. |