(ctx context.Context, value any)
| 706 | var _ core.ModType = (*CoreModScalar)(nil) |
| 707 | |
| 708 | func (obj *CoreModScalar) ConvertFromSDKResult(ctx context.Context, value any) (dagql.AnyResult, error) { |
| 709 | state, err := obj.coreMod.viewState(ctx) |
| 710 | if err != nil { |
| 711 | return nil, err |
| 712 | } |
| 713 | s, ok := state.server.ScalarType(obj.name) |
| 714 | if !ok { |
| 715 | return nil, fmt.Errorf("CoreModScalar.ConvertFromSDKResult: found no scalar type") |
| 716 | } |
| 717 | |
| 718 | input, err := s.DecodeInput(value) |
| 719 | if err != nil { |
| 720 | return nil, fmt.Errorf("CoreModScalar.ConvertFromSDKResult: failed to decode input: %w", err) |
| 721 | } |
| 722 | return dagql.NewResultForCurrentCall(ctx, input) |
| 723 | } |
| 724 | |
| 725 | func (obj *CoreModScalar) ConvertToSDKInput(ctx context.Context, value dagql.Typed) (any, error) { |
| 726 | state, err := obj.coreMod.viewState(ctx) |
nothing calls this directly
no test coverage detected