-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Breaking changes for v2.0 #113
Comments
It's probably a good idea to re-examine the method chaining style in general. Should we use interfaces instead of structs (#143)? Should we switch to functional parameters? Should we wait until Go 2 and use generics somehow? Input is welcome. Method chaining structs (current style)
Method chaining + interfaces
Functional parameters
Go 2 (generics)
|
Hi @guregu, mocking will become easy when returning interfaces, tho, it's generally advisable to receive interfaces return concrete types. In my opinion i'll go in favour of method chaining + interfaces |
Will dynamo v2 also support |
@mingrammer I think so, yes. It's a good opportunity to make breaking changes, so I want to switch to aws-sdk-v2 if possible. |
Hello @guregu, are there plans to switch to/support AWS SDK V2 anytime soon? |
@SubNader My current plan is to let the dust settle with Go 1.18 and generics and see where it goes from there. I would like to create an alpha version of v2 after Go 1.18 so we can play around with improving the API. Ideally I would like v1 to be "feature complete" before we start on v2 because I don't want to maintain two versions but we'll see how it goes 👀. There are not too many features I still want to add, but it might be a good idea to add missing things like PartiQL before we make a new version. |
Waiting so much for v2 support! |
I started using dynamo and like to have AWS SDK v2 support. As @guregu seems busy, I think I would give a try to make a PR that supports sdk v2. I don't know if sdk v2 support and the interface changes discussed above should be out at the same time, but anyway IMHO sdk v2 support PR could be of some help in some way. |
@irohiroki Yes, that would be helpful. I can use it as a base for the next version. This fork also seems to do the same thing but I have not looked at it closely: https://github.com/niltonkummer/dynamo |
I see there's a lot of demand for AWS SDK v2 support. Maybe we should consider a minimal v2 and release it sooner rather than later. It might be easier to think of things that we need to add to v1 before v2. I'd rather not maintain two branches at once, so v1 should be 'done' by the time v2 is out. Things we probably need to do in v1
Things I definitely want for v2
Nice to have
|
I just made #206 Migrate to AWS SDK v2 🚀 |
On the topic of making breaking changes to the BatchGet / BatchWrite APIs i think that it is a bit awkward that the Lines 18 to 43 in a749b0c
Seems like this should be moved to be a reciever on the DB struct and then somehow through interactions with the I could believe that some version of this idea could be warranted
but just wanted to say that in using this new branch I don't the current apis particularly intuitive for doing multi-table reads. |
Yeah, the current Batch APIs are my biggest regret for this library. The transaction APIs are the atonement for my sins (they are closer to how the batch APIs ought to look, probably). The recent additions of multi-table stuff is mostly just trying to hack it in without breaking the API. Removing the current batch APIs for v2 will probably break too much existing code for an easy transition but a separate API based on DB methods would be a nice addition I think. |
I mean updating to use v2 will require code updates to adopt so perhaps this is the time to address in spite of that. That said if you're looking for some half-way solutions perhaps you could add a new api that is more in line with the vision and mark the old API as |
Eventually I'd like to put out a v2.0 and improve some things. Feel free to comment with changes you'd like to see made.
Here's some stuff I'd like to examine:
dynamo.Keyed
or make it more useful somehow.We should make it easy to access that in addition to the total, perhaps as a separate Capacity struct for indexes (Can't differentiate between read and write in ConsumedCapacity #112). Maybe use a different kind of ConsumedCapacity for transactions?The text was updated successfully, but these errors were encountered: