database

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2021 License: Apache-2.0, BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package database is a plugin that manages the badger database (e.g. garbage collection).

Index

Constants

View Source
const (
	// DBVersion defines the version of the database schema this version of Wasp supports.
	// Every time there's a breaking change regarding the stored data, this version flag should be adjusted.
	DBVersion = 0
)

Variables

View Source
var (
	// ErrDBVersionIncompatible is returned when the database has an unexpected version.
	ErrDBVersionIncompatible = errors.New("database version is not compatible. please delete your database folder and restart")
)

Functions

func GetInstance added in v0.1.0

func GetInstance() *dbprovider.DBProvider

func GetPartition

func GetPartition(chainID *coretypes.ChainID) kvstore.KVStore

each key in DB is prefixed with `chainID` | `SC index` | `object type byte` GetPartition returns a Partition, which is a KVStore prefixed with the chain ID.

func GetRegistryPartition

func GetRegistryPartition() kvstore.KVStore

func Init

func Init() *node.Plugin

Init is an entry point for the plugin.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL