Documentation ¶
Index ¶
- Constants
- Variables
- type LocalDatabase
- func (ldb *LocalDatabase) BaseURL() core.URL
- func (ldb *LocalDatabase) Close(ctx *core.Context) error
- func (ldb *LocalDatabase) Get(ctx *core.Context, key core.Path) (core.Value, core.Bool)
- func (ldb *LocalDatabase) GetSerialized(ctx *core.Context, key core.Path) (string, bool)
- func (ldb *LocalDatabase) Has(ctx *core.Context, key core.Path) bool
- func (ldb *LocalDatabase) Insert(ctx *core.Context, key core.Path, value core.Serializable)
- func (ldb *LocalDatabase) InsertSerialized(ctx *core.Context, key core.Path, serialized string)
- func (ldb *LocalDatabase) LoadTopLevelEntities(ctx *core.Context) (map[string]core.Serializable, error)
- func (ldb *LocalDatabase) Remove(ctx *core.Context, key core.Path)
- func (ldb *LocalDatabase) Resource() core.SchemeHolder
- func (ldb *LocalDatabase) Schema() *core.ObjectPattern
- func (ldb *LocalDatabase) Set(ctx *core.Context, key core.Path, value core.Serializable)
- func (ldb *LocalDatabase) SetSerialized(ctx *core.Context, key core.Path, serialized string)
- func (ldb *LocalDatabase) UpdateSchema(ctx *core.Context, schema *core.ObjectPattern, ...)
- type LocalDatabaseConfig
Constants ¶
View Source
const ( SCHEMA_KEY = "/_schema_" DB_KV_FILE = "db.bbolt" META_KV_FILE = "meta.buntdb" OS_DB_DIR = 0700 )
Variables ¶
View Source
var ( LOCAL_DB_PROPNAMES = []string{"update_schema", "close"} JSON_SERIALIZATION_CONFIG = core.JSONSerializationConfig{ReprConfig: core.ALL_VISIBLE_REPR_CONFIG} ErrOpenDatabase = errors.New("database is already open by the current process or another one") )
Functions ¶
This section is empty.
Types ¶
type LocalDatabase ¶
type LocalDatabase struct {
// contains filtered or unexported fields
}
A LocalDatabase is a database thats stores data on the OS filesystem.
func OpenDatabase ¶
func OpenDatabase(ctx *core.Context, r core.ResourceName, restrictedAccess bool) (*LocalDatabase, error)
OpenDatabase opens a local database, read, create & write permissions are required.
func (*LocalDatabase) BaseURL ¶
func (ldb *LocalDatabase) BaseURL() core.URL
func (*LocalDatabase) GetSerialized ¶
func (*LocalDatabase) Insert ¶
func (ldb *LocalDatabase) Insert(ctx *core.Context, key core.Path, value core.Serializable)
func (*LocalDatabase) InsertSerialized ¶
func (*LocalDatabase) LoadTopLevelEntities ¶
func (ldb *LocalDatabase) LoadTopLevelEntities(ctx *core.Context) (map[string]core.Serializable, error)
func (*LocalDatabase) Resource ¶
func (ldb *LocalDatabase) Resource() core.SchemeHolder
func (*LocalDatabase) Schema ¶
func (ldb *LocalDatabase) Schema() *core.ObjectPattern
func (*LocalDatabase) Set ¶
func (ldb *LocalDatabase) Set(ctx *core.Context, key core.Path, value core.Serializable)
func (*LocalDatabase) SetSerialized ¶
func (*LocalDatabase) UpdateSchema ¶
func (ldb *LocalDatabase) UpdateSchema(ctx *core.Context, schema *core.ObjectPattern, handlers core.MigrationOpHandlers)
Click to show internal directories.
Click to hide internal directories.