CreateBucketIfNotExists creates a new bucket if it doesn't already exist. Returns an error if the bucket name is blank, or if the bucket name is too long. The bucket instance is only valid for the lifetime of the transaction.
(name []byte)
| 123 | // Returns an error if the bucket name is blank, or if the bucket name is too long. |
| 124 | // The bucket instance is only valid for the lifetime of the transaction. |
| 125 | func (tx *Tx) CreateBucketIfNotExists(name []byte) (*Bucket, error) { |
| 126 | return tx.root.CreateBucketIfNotExists(name) |
| 127 | } |
| 128 | |
| 129 | // DeleteBucket deletes a bucket. |
| 130 | // Returns an error if the bucket cannot be found or if the key represents a non-bucket value. |
no outgoing calls