Documentation ¶
Index ¶
- Variables
- func RegisterNSDBEngine(name string, nsDbEngine NSDBEngine)
- type Delimited
- func (delimited *Delimited) Configure(db golkeyval.DBEngine)
- func (delimited *Delimited) CreateNS(key string) bool
- func (delimited *Delimited) DelKey(key string) bool
- func (delimited *Delimited) DeleteNS(key string) bool
- func (delimited *Delimited) DeleteNSKey(key string) bool
- func (delimited *Delimited) DeleteNSRecursive(key string) bool
- func (delimited *Delimited) GetVal(key string) string
- func (delimited *Delimited) PushKeyVal(key string, val string) bool
- func (delimited *Delimited) PushNS(key string, val string) bool
- func (delimited *Delimited) ReadNS(key string) golhashmap.HashMap
- func (delimited *Delimited) ReadNSRecursive(key string) golhashmap.HashMap
- func (delimited *Delimited) UnrootNS(key string) bool
- type NSDBEngine
Constants ¶
This section is empty.
Variables ¶
var NSDBEngines = make(map[string]NSDBEngine)
DBEngines acts as map for all available db-engines.
var (
NamespaceSeparator = ":"
)
NameSpaceSeparator could be modified if something other than colon-char ":"
is to be used as separator symbol for NameSpace.
Functions ¶
func RegisterNSDBEngine ¶
func RegisterNSDBEngine(name string, nsDbEngine NSDBEngine)
RegisterDBEngine gets used by adapters to register themselves.
Types ¶
type Delimited ¶
type Delimited struct {
// contains filtered or unexported fields
}
Delimited struct with required db details. Delimited is just easy quick namespacing style around stores with just key-val support like leveldb, such. Not to be opted for performance oriented use-cases.
func (*Delimited) DeleteNS ¶
DeleteNS deletes a namespace with all direct children with no further children and unroots it. For nodes with children, it just delete baselevel value, doesn't unroot.
func (*Delimited) DeleteNSKey ¶
DeleteNSKey directly deletes a child key-val and unroot it from parent.
func (*Delimited) DeleteNSRecursive ¶
DeleteNSRecursive to delete a namespace with all children below and unroot it.
func (*Delimited) ReadNS ¶
func (delimited *Delimited) ReadNS(key string) golhashmap.HashMap
ReadNS reads all direct child values in a given NameSpace For e.g.:
given keys a, a:b, a:b:1, a:b:2, a:b:2:3 reads for a:b:1, a:b:2 if queried for a:b
func (*Delimited) ReadNSRecursive ¶
func (delimited *Delimited) ReadNSRecursive(key string) golhashmap.HashMap
ReadNSRecursive reads all values belonging to tree below given NameSpace For e.g.:
given keys a, a:b, a:b:1, a:b:2, a:b:2:3 reads for a:b:1, a:b:2, a:b:2:3 if queried for a:b
type NSDBEngine ¶
type NSDBEngine interface { Configure(db golkeyval.DBEngine) PushNS(key string, val string) bool ReadNS(key string) golhashmap.HashMap ReadNSRecursive(key string) golhashmap.HashMap DeleteNSKey(key string) bool DeleteNS(key string) bool DeleteNSRecursive(key string) bool // golkeyval proxy func PushKeyVal(key string, val string) bool GetVal(key string) string DelKey(key string) bool }
DBEngine interface enables adapter feature for a key-val oriented DB.
func GetNSDBEngine ¶
func GetNSDBEngine(name string) NSDBEngine
GetDBEngine gets used by client to fetch a required db-engine.