Documentation ¶
Overview ¶
Package scribble is a tiny gob database
Index ¶
Constants ¶
const Version = "3.0.0"
Version is the current version of the project
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
Collection a collection of documents
func (*Collection) Check ¶
func (c *Collection) Check() error
Check if there is an error while getting the collection
func (*Collection) Delete ¶
func (c *Collection) Delete() error
Delete removes a collection and all of its childeren
func (*Collection) Document ¶
func (c *Collection) Document(key string) *Document
Document gets a document from a collection
func (*Collection) GetDocuments ¶
func (c *Collection) GetDocuments() ([]*Document, error)
GetDocuments gets all documents in a collection.
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
Document a single document which can have sub collections
func New ¶
New creates a new scribble database at the desired directory location, and returns a *Driver to then use for interacting with the database
func (*Document) Collection ¶
func (d *Document) Collection(name string) *Collection
Collection gets a collction from in a document
func (*Document) Delete ¶
Delete locks that database and removes the document including all of its sub documents