-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add support for tokio-rusqlite #29
Conversation
Ah I see you merged the PR to add the up/down hooks. I'll rebase it on the current master later ;). |
@cljoly I had a far better idea how this could be implemented so that:
Have a look at: https://github.com/Czocher/rusqlite_migration/pull/new/support-tokio-sqlite-v2 What I did in v2 is to create a simple Tell me which version you like best (IMHO v2 better handles your requirements as to the implementation). The v2 branch should also be considered a work in progress:
|
@czocher thanks for opening this PR, I'll try and take a look on Sunday. |
Sorry I am very busy this week, I did not get the chance to look into your PR, hopefully this weekend. |
@cljoly there's no rush :). I suggest you first look into what's proposed in this comment: #29 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a look at your v2, it’s much better in terms of code duplication, I quite like it actually! Perhaps you could push the commits from the v2 branch into this branch, to ease further review?
Just a minor point, we could rename AsyncAdapter
to AsyncMigration
there.
Yes, but this is much less of a problem in your v2 branch :)
We want to have good test coverage indeed 👍🏼 |
Right, I think there are cases where you don’t use 'static. In any case, I believe going to a more restrictive lifetime parameter would be a breaking API change, so that should be avoided if possible. |
I appreciate all the work you have put in this @czocher and sorry I could not review earlier. Hopefully, I have addressed all your questions (that were not solved in v2). |
That’s fine and I suspect you will have less conflicts (if at all in the v2 branch) |
01b4fbb
to
eec3a7b
Compare
Replaced the branch in this PR with the the What needs to be done before this change should be reviewed:
What kind of unit tests should be provided @cljoly? |
eec3a7b
to
e786dcd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ll look more into this later, but here are some first few comments.
I need to think a bit more about unit tests and how to disable the async example by default. And also,
|
bd62538
to
86e0cd5
Compare
From what I saw usually people make a
Check if I did it correctly ;). I added a test with |
9816af5
to
31c7c6a
Compare
Since I have not found a better option, let’s do that if you don’t mind.
The CI looks great, thanks! |
3b0b798
to
b5bff07
Compare
I implemented the structure change here since it's required for this PR to compile. If you feel like it should be extracted to a separate PR let me now ;).
EDIT: I think I managed to fix |
184d21e
to
345d700
Compare
4af63d8
to
eab9c67
Compare
In my opinion this task is mergeable at the moment, only thing potentially missing are unit tests for the async version. I wrote an |
Great! I should be able to take a deeper look this weekend and if everything goes well, to merge. |
I think it looks great, and this can be further refined if needed in the future. I’m sorry I introduced a conflict when merging another PR, I’ll solve the conflict when I get the chance and merge. |
668b070
to
8e426f6
Compare
8e426f6
to
fa0d8f2
Compare
Alright, I’ve also fixed a markdown link :) |
Thank you so much for your contribution and your patience! |
@cljoly please have a look and comment everything that you feel is not right. Consider it a very preliminary version.
There's a few things that are still missing:
sync
version to theasync
version. Feels more like doctests should be considered for both versions and the main tests should be performed only on the extracted functions?AsyncMigrations
struct and leaving theMigrations
without any changes (except extracting the functions) may be a solution? What do you thing @cljoly?lib.rs
.Closes #24.