-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refact(project): add connection to struct
This was a lot more complicated than I expected, because you cannot share a rusqlite `Connection` object across unwrap boundaries (you can share it across threads, but our `Async` does automatic unwrapping …). So what I do here is that whenever we want to clone a `Project`, I create something I call “skeleton”, which is a clone of the project without the connection object (just the sqlite file path), then on the other side of the boundary I turn the skeleton back into a Project by connecting to the database again. I think this is quite an okay solution.
- Loading branch information
1 parent
d44b6fc
commit 3db14ab
Showing
9 changed files
with
160 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.