GoshawkDB Collections Library
Because GoshawkDB stores an object graph, and does not provide abstractions such as tables, it also does not provide the collection-like properties of tables. In programming languages, we're used to working with rich collection libraries supporting a number of different properties: sets, maps, trees etc. These are highly efficient structures that allow us to work with very large collections of objects quickly.
For the supported GoshawkDB clients, we provide a collections library. These contain prebuilt and tested collections that you can instantiate and use in your programs, which store values in GoshawkDB safely, using the GoshawkDB clients. The collections are compatible across the different languages, so for example a map created and populated by the Java client can be further manipulated by the Go client. There is no magic to these collections: they do not require anything other than the vanilla clients, they are simply there to provide a base level of functionality and to avoid every use from having to reimplement the same basic data structures.
The collections library is available for both the Go client and the Java client.
- For Go, the API documentation is available on godoc.
- For Java, javadoc can be browsed from this server.
Currently, the Collections Library contains a single
Hash Map. This is a key-value map which
O(log2(N)) objects for a map of
Remove operations. Iteration is supported
ForEach function, which iterates over
the key-value pairs in an undefined order. The keys are
byte-arrays, and the values are GoshawkDB Object
References. By ignoring the value element of each pair,
this collection can be used as a set, though
currently lacks typical set operations such
Additional collection types are currently being worked on, including a B-tree which supports ordered traversal.