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

Does upsert clause API has mixed up generic types? #2769

Closed
mozochek opened this issue Dec 4, 2023 · 1 comment
Closed

Does upsert clause API has mixed up generic types? #2769

mozochek opened this issue Dec 4, 2023 · 1 comment

Comments

@mozochek
Copy link

mozochek commented Dec 4, 2023

DoUpdate have where parameter, which is a callback function with T parameter named old
image
But T is a generic type for table.
image

And whats the point of returning table in upsert clause in where when I expect the returning object to be an instance of data object of this table? This is misleading and seems like a bug or I just don't understend how it works and how I can reuse old values when doing upsert.

drift: 2.13.2

@mozochek
Copy link
Author

mozochek commented Dec 4, 2023

Just looked at tests and saw the examples. I think this API needs to be more clear by adding some examples

@mozochek mozochek closed this as completed Dec 4, 2023
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

No branches or pull requests

1 participant