Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crud: allow interface{} as values for *ManyRequest #375

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

oleg-jukovec
Copy link
Collaborator

@oleg-jukovec oleg-jukovec commented Jan 29, 2024

It was a mistake to use []interface{} or []msgpack.CustomEncoder as types for an array of tuples or an array of objects. Users were unable to use slices of custom types as incoming values.

The patch now allows the use of interface{} as incoming values. It makes it easier to use the API, but users need to be more careful. Therefore, we have also added examples.

Closes #365

@oleg-jukovec oleg-jukovec force-pushed the oleg-jukovec/gh-365-crud-typed-batches branch 2 times, most recently from 77d65e8 to fe01ab9 Compare January 29, 2024 06:54
@oleg-jukovec oleg-jukovec changed the title crud: make *ManyRequest types less strict to tuples crud: allow interface{} as values for *ManyRequest Jan 29, 2024
@oleg-jukovec oleg-jukovec force-pushed the oleg-jukovec/gh-365-crud-typed-batches branch 2 times, most recently from 04fd0e8 to ba46e3e Compare January 29, 2024 06:59
crud/object.go Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
Copy link

@DerekBum DerekBum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. Just one nit and questions about examples.

README.md Outdated Show resolved Hide resolved
crud/example_test.go Outdated Show resolved Hide resolved
crud/example_test.go Outdated Show resolved Hide resolved
It was a mistake to use `[]interface{}` or `[]msgpack.CustomEncoder`
as types for an array of tuples or an array of objects. Users were
unable to use slices of custom types as incoming values.

The patch now allows the use of `interface{}` as incoming values. It
makes it easier to use the API, but users need to be more careful.
Therefore, we have also added examples.

Closes #365
@oleg-jukovec oleg-jukovec force-pushed the oleg-jukovec/gh-365-crud-typed-batches branch from 2860690 to 906765f Compare January 29, 2024 10:42
@oleg-jukovec oleg-jukovec merged commit 6ba01ff into master Jan 29, 2024
22 checks passed
@oleg-jukovec oleg-jukovec deleted the oleg-jukovec/gh-365-crud-typed-batches branch January 29, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crud: typed batches
3 participants