feat(orm): ModuleDB JSON import/export/default/validate methods (#11101)

* feat(orm): ModuleDB JSON methods

* WIP

* WIP on JSON

* WIP

* WIP

* tests and docs

* revert

* tests and docs

* docs

* address review comments
This commit is contained in:
Aaron Craelius
2022-02-03 20:36:21 -08:00
committed by GitHub
parent 888548ab53
commit 37ae08d92a
26 changed files with 393 additions and 45 deletions
+18
View File
@@ -0,0 +1,18 @@
// Package ormtest contains utilities for testing modules built with the ORM.
package ormtest
import (
"github.com/cosmos/cosmos-sdk/orm/internal/testkv"
"github.com/cosmos/cosmos-sdk/orm/model/ormtable"
)
// NewMemoryBackend returns a new ORM memory backend which can be used for
// testing purposes independent of any storage layer.
//
// Example:
// backend := ormtest.NewMemoryBackend()
// ctx := ormtable.WrapContextDefault()
// ...
func NewMemoryBackend() ormtable.Backend {
return testkv.NewSplitMemBackend()
}