-
Notifications
You must be signed in to change notification settings - Fork 0
Move to SQLx #8
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
Merged
Merged
Move to SQLx #8
Conversation
This file contains hidden or 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
it's just easier tbh. even without the compile-time checks, it's muuuuch cleaner and easier to understand for me. i think that orms really hurt there so my future work will likely be based on this branch
just to show that it's a SQLite database, instead of being ambiguous (like Surreal)
this isn't great, as preferably, we'd have the database ensure that media files aren't duplicated we'll need to do so ourselves, i guess. nonetheless, this is important because of update-insert rules: you can't have more than one trigger for ON CONFLICT during an INSERT
unsurprisingly, it's a way to describe how something should be inserted into a table. but really, it's important for eliminating verbosity - especially since we get to use the macro now!
see last commit for info
to use `tokio-console` without compiling everything over and over again... :D
idea's been in my head a while
we don't need users to pass that in. just makes things more difficult (makes tokio literally cry)
(for safe library usage)
currently just checks if the database fns actually do metadata lol and hey! they do :D
oh. that's cruel, rustc...
for the UUID and "first seen date" on Media, we'll want to save those from the database instead of making new ones each time. having them as fields on the `MediaBuilder` was a bad call, so now they're gone, to be generated if they don't exist already in the database. this doesn't yet account for media files that were moved, but checking their hash should help with that later on!
they were split weirdly s.t. it was hard to find them lol
tbh not sure if i'll keep this going or not. might be a better idea to use UNIX files or whatever the fuck, but they might be hard to connect to! ...could possibly use the name of the test in a hardcoded place?
without them, we're kinda clueless as to where our files came from.
im about to remove this function lol. but it's nice to have it updated for completion's sake
we'll know if we break hashing with this! :D
we no longer model a `Metadata` ty directly in the database! as such, it's weird to have a `model` import for it.
lol that's been there for this whole time?
no need for a folder; it's really not that verbose, surprisingly!
was causing a panic before, after my refactor that i totally havent done yet
we only need one. before, they were all doing the same thing lol
it was pretty awful before, man
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
also a lot of other stuff bc i was too lazy to merge before i knew it worked well