ImportCollectionsByMarshaledJSON is the same as [ImportCollections] but accept marshaled json array as import data (usually used for the autogenerated snapshots).
(rawSliceOfMaps []byte, deleteMissing bool)
| 16 | // ImportCollectionsByMarshaledJSON is the same as [ImportCollections] |
| 17 | // but accept marshaled json array as import data (usually used for the autogenerated snapshots). |
| 18 | func (app *BaseApp) ImportCollectionsByMarshaledJSON(rawSliceOfMaps []byte, deleteMissing bool) error { |
| 19 | data := []map[string]any{} |
| 20 | |
| 21 | err := json.Unmarshal(rawSliceOfMaps, &data) |
| 22 | if err != nil { |
| 23 | return err |
| 24 | } |
| 25 | |
| 26 | return app.ImportCollections(data, deleteMissing) |
| 27 | } |
| 28 | |
| 29 | // ImportCollections imports the provided collections data in a single transaction. |
| 30 | // |
nothing calls this directly
no test coverage detected