Discover Packages
github.com/bubblebox/server
db
package
Version:
v0.0.0-...-93140eb
Opens a new window with list of versions in this module.
Published: Dec 14, 2015
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 3
Opens a new window with list of known importers.
Documentation
Documentation
¶
DB wraps BoltDB and handles storing/retrieving data
DeleteItem delete the item with `id` from the database
DoesItemExist returns true if an item with `code` exists. Falase otherwise.
GetItem will retrieve an item from the database, given it's unique Code
GetItems returns all items, yes, all of them.
TODO: Add pagination
Open will open a new Bolt database and create the necessary buckets
for using it elsewhere in Fire Dragon.
SaveItem will save the item, if the item has no code yet, it will be
automatically assigned one. If a code is provided and it already
exists, an error will be returned.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.