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
+1 -1
View File
@@ -138,7 +138,7 @@ func (f fileGen) genStoreInterfaceGuard() {
}
func (f fileGen) genStoreConstructor(stores []*protogen.Message) {
f.P("func New", f.storeInterfaceName(), "(db ", ormdbPkg.Ident("ModuleDB"), ") (", f.storeInterfaceName(), ", error) {")
f.P("func New", f.storeInterfaceName(), "(db ", ormTablePkg.Ident("Schema"), ") (", f.storeInterfaceName(), ", error) {")
for _, store := range stores {
f.P(f.messageStoreReceiverName(store), ", err := ", f.messageConstructorName(store), "(db)")
f.P("if err != nil {")