(ctx context.Context, value dagql.Typed)
| 723 | } |
| 724 | |
| 725 | func (obj *CoreModScalar) ConvertToSDKInput(ctx context.Context, value dagql.Typed) (any, error) { |
| 726 | state, err := obj.coreMod.viewState(ctx) |
| 727 | if err != nil { |
| 728 | return nil, err |
| 729 | } |
| 730 | s, ok := state.server.ScalarType(obj.name) |
| 731 | if !ok { |
| 732 | return nil, fmt.Errorf("CoreModScalar.ConvertToSDKInput: found no scalar type") |
| 733 | } |
| 734 | val, ok := value.(dagql.Scalar[dagql.String]) |
| 735 | if !ok { |
| 736 | // we assume all core scalars are strings |
| 737 | return nil, fmt.Errorf("CoreModScalar.ConvertToSDKInput: core scalar should be string") |
| 738 | } |
| 739 | return s.DecodeInput(string(val.Value)) |
| 740 | } |
| 741 | |
| 742 | func (obj *CoreModScalar) CollectContent(ctx context.Context, value dagql.AnyResult, content *core.CollectedContent) error { |
| 743 | if value == nil { |
nothing calls this directly
no test coverage detected