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:
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user