abklevigoNS

package module
v1.0.1-0...-c38ed9a Latest Latest
Warning

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

Go to latest
Published: May 21, 2015 License: MIT Imports: 5 Imported by: 0

README

levigoNS


 ___                       ()    __,,,             \|\\   ||"  |====)
  \ \    ___  __      __  ___    | _ \     ____     ||\\  ||   \\
  | |   / ==\  \\    //    ||    \ " ,|,  / __ \    || \\ ||    +++
  | |  | ,--"   \\  //     ||   _/ _ \   | |  | |   ||  \\||       \\
  | |  | |_.    | \/ |     ||   |_ " /    \ \/ /    ||   \||   /|__/ |
 _|_|_  \___\    \__/     _||_   ;;\/      \__/    _||    \|\  \____/

levigoNS ~ The same old leveldb at Go via levigo with NameSpaced Key powers.

baby-gopher

Contributing?

We have set of Go Tasks available here to bring you at pace...

  • Install tall Go lib dependencies:
./go-tasks.sh deps
  • Run all Tests:
./go-tasks.sh test

So, you can have all dependencies set-up in project specific GoEnv and quickly run (updated) tests against your changes.


Basic Logic Used

Set of Key:Val sent to KeyVal Store

a => A a:1 => A1 a:2 => A2 a:3 => A3 a:1:2 => A12 a:2:1 => A21 a:1:1 => A11

Representation at KeyVal Store


 ~> a

 key::a      =>  (/)
 val::a      =>  A



 ~> a:1

 key::a      =>  key::a:1
 val::a      =>  A
 key::a:1    =>  (/)
 val::a:1    =>  A1




 ~> a:2

 key::a      =>  key::a:1,key::a:2
 val::a      =>  A
 key::a:1    =>  (/)
 val::a:1    =>  A1
 key::a:2    =>  (/)
 val::a:2    =>  A2




 ~> a:3

 key::a      =>  key::a:1,key::a:2,key::a:3
 val::a      =>  A
 key::a:1    =>  (/)
 val::a:1    =>  A1
 key::a:2    =>  (/)
 val::a:2    =>  A2
 key::a:3    =>  (/)
 val::a:3    =>  A3




 ~> a:1:2

 key::a      =>  key::a:1,key::a:2,key::a:3
 val::a      =>  A
 key::a:1    =>  key::a:1:2
 val::a:1    =>  A1
 key::a:2    =>  (/)
 val::a:2    =>  A2
 key::a:3    =>  (/)
 val::a:3    =>  A3
 key::a:1:2  =>  (/)
 val::a:1:2  =>  A12




 ~> a:2:1

 key::a      =>  key::a:1,key::a:2,key::a:3
 val::a      =>  A
 key::a:1    =>  key::a:1:2
 val::a:1    =>  A1
 key::a:2    =>  key::a:2:1
 val::a:2    =>  A2
 key::a:3    =>  (/)
 val::a:3    =>  A3
 key::a:1:2  =>  (/)
 val::a:1:2  =>  A12
 key::a:2:1  =>  (/)
 val::a:2:1  =>  A21




 ~> a:1:1

 key::a      =>  key::a:1,key::a:2,key::a:3
 val::a      =>  A
 key::a:1    =>  key::a:1:2,key::a:1:1
 val::a:1    =>  A1
 key::a:2    =>  key::a:2:1
 val::a:2    =>  A2
 key::a:3    =>  (/)
 val::a:3    =>  A3
 key::a:1:2  =>  (/)
 val::a:1:2  =>  A12
 key::a:2:1  =>  (/)
 val::a:2:1  =>  A21
 key::a:1:1  =>  (/)
 val::a:1:1  =>  A11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NamespaceSeparator = ":"
)
NameSpaceSeparator could be modified if something other than colon-char ":"

is to be used as separator symbol for NameSpace.

Functions

func CreateNS

func CreateNS(key string, db *levigo.DB) bool

CreateNS updates entry with its trail of namespace given a keyname.

func DeleteNS

func DeleteNS(key string, db *levigo.DB) bool

DeleteNS deletes a namespace with all direct children and unroot it.

func DeleteNSKey

func DeleteNSKey(key string, db *levigo.DB) bool

DeleteNSKey directly deletes a child key-val and unroot it from parent.

func DeleteNSRecursive

func DeleteNSRecursive(key string, db *levigo.DB) bool

DeleteNSRecursive to delete a namespace with all children below and unroot it.

func PushNS

func PushNS(key string, val string, db *levigo.DB) bool

PushNS feeds in namespace entries given namespace key and val.

func ReadNS

func ReadNS(key string, db *levigo.DB) 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 ReadNSRecursive

func ReadNSRecursive(key string, db *levigo.DB) 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

func UnrootNS

func UnrootNS(key string, db *levigo.DB) bool

UnrootNS update key's presence from it's parent's group-val of child key names.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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