-
Notifications
You must be signed in to change notification settings - Fork 5
refresh_from_db #96
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
base: master
Are you sure you want to change the base?
refresh_from_db #96
Conversation
|
@makridenko can you please review?) |
Hi, don't worry, he will check as soon as possible, thanks for ur PR! :) |
|
Hi, @darya-shynkevich |
It's great idea. Maybe I will open a PR or you? :) |
|
please add to PR description |
|
@darya-shynkevich thank you! |
Maybe we can do it together? |
makridenko
left a 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.
thank you!
| db_client = self._get_db_client() | ||
| raw: dict[str, Any] = db_client.execute(query_builder=query_builder)[0] | ||
|
|
||
| fresh = self.__class__.model_validate(raw, from_attributes=False) |
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.
let's name it refreshed
|
@darya-shynkevich I've been a bit busy, sorry, are you still in? |
Hey, yep, I was a bit busy last week, will finish today :) |
closes #90
Tested on my local project : https://github.com/darya-shynkevich/comment_generator
The local project is a bit messy, sorry for that. yet the refresh_from_db seems to work.
I also think it may be a good idea to contact the owners of the https://github.com/AtticusZeller/fastapi_supabase_template to integrate the library into it. WDYT?