Documentation
¶
Index ¶
- func Init() error
- type JDB
- type SqlJDB
- func (jdb *SqlJDB) Del(id jsondb.JID) (ok bool, err error)
- func (jdb *SqlJDB) Dump() ([]jsondb.JSONObj, error)
- func (jdb *SqlJDB) Get(id jsondb.JID) (jo jsondb.JSONObj, ok bool, err error)
- func (jdb *SqlJDB) List() ([]jsondb.JID, error)
- func (jdb *SqlJDB) Load(data []map[string]any) error
- func (jdb *SqlJDB) Ping() error
- func (jdb *SqlJDB) Put(jo jsondb.JSONObj) (jsondb.JSONObj, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JDB ¶
type JDB interface { List() ([]jsondb.JID, error) Put(jo jsondb.JSONObj) (jsondb.JSONObj, error) Get(id jsondb.JID) (jo jsondb.JSONObj, ok bool, err error) Del(id jsondb.JID) (ok bool, err error) Dump() ([]jsondb.JSONObj, error) Load(data []map[string]any) error Ping() error }
JDB is the principal interface to direct access of a JSON-DB
func InitMemoryJDB ¶
func InitSqliteJDB ¶
func NewMemoryJDB ¶
func NewMemoryJDB() JDB
Click to show internal directories.
Click to hide internal directories.