示例#1
0
func (o *LargeObjects) Create(id oid.Oid) (oid.Oid, error) {
	o.mtx.Lock()
	defer o.mtx.Unlock()

	newOid, err := fpInt32(o.fp.CallFn("lo_create", []fpArg{fpIntArg(int32(id))}))
	return oid.Oid(newOid), err
}
示例#2
0
func (b *readBuf) oid() (n oid.Oid) {
	n = oid.Oid(binary.BigEndian.Uint32(*b))
	*b = (*b)[4:]
	return
}