Skip to content

Conversation

@darya-shynkevich
Copy link
Contributor

@darya-shynkevich darya-shynkevich commented Jul 27, 2025

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?

@darya-shynkevich darya-shynkevich changed the title DRAFT: add refresh_from_db refresh_from_db Jul 31, 2025
@darya-shynkevich
Copy link
Contributor Author

@makridenko can you please review?)

@AlexPozh
Copy link
Contributor

AlexPozh commented Aug 3, 2025

@makridenko can you please review?)

Hi, don't worry, he will check as soon as possible, thanks for ur PR! :)

@makridenko
Copy link
Owner

Hi, @darya-shynkevich
Sorry for delay, bit tough days

@makridenko
Copy link
Owner

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?

It's great idea. Maybe I will open a PR or you? :)
Or maybe @AlexPozh :)

@makridenko
Copy link
Owner

please add to PR description closes #issue_number

@makridenko
Copy link
Owner

@darya-shynkevich thank you!

@darya-shynkevich
Copy link
Contributor Author

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?

It's great idea. Maybe I will open a PR or you? :) Or maybe @AlexPozh :)

Maybe we can do it together?

Copy link
Owner

@makridenko makridenko left a 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)
Copy link
Owner

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

@makridenko
Copy link
Owner

@darya-shynkevich I've been a bit busy, sorry, are you still in?

@darya-shynkevich
Copy link
Contributor Author

@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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add refresh_from_db method to BaseSBModel

3 participants