Documentation
¶
Index ¶
- Constants
- func GenID(idSize int) string
- func GenIDFromSeeed(seed string) string
- type JSONDB
- func (db *JSONDB) Delete(collection, resource string) error
- func (db *JSONDB) Get(collection, resource string, record interface{}) error
- func (db *JSONDB) GetAll(collection string, records interface{}) error
- func (db *JSONDB) GetBytes(collection, resource string) ([]byte, error)
- func (db *JSONDB) GetWhere(collection, query string, expression, records interface{}, limit int64) error
- func (db *JSONDB) GetWhereNot(collection, query string, expression, records interface{}, limit int64) error
- func (db *JSONDB) InitCollection(collection string) error
- func (db *JSONDB) Link(srcCollection, srcResource, destCollection, destResource string) error
- func (db *JSONDB) Put(collection, resource string, v interface{}) error
- func (db *JSONDB) Stat(path string) (fi os.FileInfo, err error)
Constants ¶
const Version = "0.0.1"
Variables ¶
This section is empty.
Functions ¶
func GenIDFromSeeed ¶
Simple ID Generating function from seed
Types ¶
type JSONDB ¶
type JSONDB struct {
Trace bool
Logger *logger.Logger
Dir string
// contains filtered or unexported fields
}
func (*JSONDB) Delete ¶
Delete locks that database and then attempts to remove the collection/resource specified by path
func (*JSONDB) GetAll ¶
GetAll records from a collection; this populates the passed slice with records
func (*JSONDB) GetWhere ¶
func (db *JSONDB) GetWhere(collection, query string, expression, records interface{}, limit int64) error
GetWhere records from a collection where the query path equals the expression; this populates the passed slice with records
func (*JSONDB) GetWhereNot ¶
func (db *JSONDB) GetWhereNot(collection, query string, expression, records interface{}, limit int64) error
GetWhereNot records from a collection where the query path does not equal the expression; this populates the passed slice with records
func (*JSONDB) InitCollection ¶
InitCollection creates a collection in the JSONDB