cbext

package module
v0.0.0-...-f4a694b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2014 License: MIT Imports: 6 Imported by: 0

README

go-cb-ext

A set of functions extending couchbase for xdcr-safe data structures.

Arrays

The keys are organized like this, where "key" is whatever key you like.

key_datacenterid = number of items in array, at this datacenter

key_datacenterid_id = item in array

Documentation

Index

Constants

View Source
const (
	OBJECT_NOT_FOUND_IN_ARRAY = "OBJECT_NOT_FOUND_IN_ARRAY"
	KEY_EXISTS                = "KEY_EXISTS"
)

error strings used as return values

View Source
const (
	KEY_ENOENT = "KEY_ENOENT" // the key isn't set in the database
)

couchbase error strings

Variables

This section is empty.

Functions

func AppendToArray

func AppendToArray(bucket *couchbase.Bucket, key string, value interface{}) (string, error)

func AssertNotExists

func AssertNotExists(bucket *couchbase.Bucket, key string) error

func CountArray

func CountArray(bucket *couchbase.Bucket, key string) (int, error)

func DeleteArrayObject

func DeleteArrayObject(bucket *couchbase.Bucket, key string, value interface{}) error

func DeleteUniqueArrayObject

func DeleteUniqueArrayObject(bucket *couchbase.Bucket, key string, unique string) error

func FlushArray

func FlushArray(bucket *couchbase.Bucket, key string, value interface{}) error

func GetArray

func GetArray(bucket *couchbase.Bucket, key string, rv interface{}) error

func GetCurrentDatacenter

func GetCurrentDatacenter() string

func GetDatacenters

func GetDatacenters() []string

func SilentUniqueAppendToArray

func SilentUniqueAppendToArray(bucket *couchbase.Bucket, key string, value interface{}, unique string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL