-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: implement very basic ORM #9
Conversation
TodoItem::objects() | ||
.filter(<TodoItem as Model>::Fields::ID.eq(todo_id)) |
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.
Eventually we'll have some nice macro that will turn the above into something like:
query!(TodoItem, col(id) == todo_id)
(or something similar)
but I wanted to keep this PR smaller (and honestly, the current API isn't terribly bad either).
flareon-orm/Cargo.toml
Outdated
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.
Removed for now as the proc macros currently have the ORM source path hardcoded as ::flareon::db
(and honestly I'm not sure about if there is an easy way to un-hardcode this). We might uncouple this eventually if it will make sense in the future, but let's keep the ORM bundled inside the main crate for now.
d8f5b41
to
cdb8653
Compare
At this stage, there is an easy way to query, insert, and delete with super simple filters. This is enough of a scaffolding to be able to quickly make it much more advanced.
Seems like the audit check failure is partially caused by a bug in Cargo: rust-lang/cargo#10801 (comment). A vulnerability was found in The vulnerability in |
At this stage, there is an easy way to query, insert, and delete with super simple filters. This is enough of a scaffolding to be able to quickly make it much more advanced.