PutForeignKeyCollection implements the interface doltdb.RootValue.
(ctx context.Context, fkc *doltdb.ForeignKeyCollection)
| 596 | |
| 597 | // PutForeignKeyCollection implements the interface doltdb.RootValue. |
| 598 | func (root *RootValue) PutForeignKeyCollection(ctx context.Context, fkc *doltdb.ForeignKeyCollection) (doltdb.RootValue, error) { |
| 599 | value, err := doltdb.SerializeForeignKeys(ctx, root.vrw, fkc) |
| 600 | if err != nil { |
| 601 | return nil, err |
| 602 | } |
| 603 | newStorage, err := root.st.SetForeignKeyMap(ctx, root.vrw, value) |
| 604 | if err != nil { |
| 605 | return nil, err |
| 606 | } |
| 607 | return root.withStorage(newStorage), nil |
| 608 | } |
| 609 | |
| 610 | // PutRootObject implements the interface doltdb.RootValue. |
| 611 | func (root *RootValue) PutRootObject(ctx context.Context, tName doltdb.TableName, rootObj doltdb.RootObject) (doltdb.RootValue, error) { |
no test coverage detected