Skip to content
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(publicBrains): use join queries for better performance #1730

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

mamadoudicko
Copy link
Contributor

@mamadoudicko mamadoudicko commented Nov 27, 2023

Issue #1720

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 27, 2023
Copy link

vercel bot commented Nov 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2023 1:14pm
quivr-strapi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2023 1:14pm
quivrapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2023 1:14pm

@dosubot dosubot bot added the area: backend Related to backend functionality or under the /backend directory label Nov 27, 2023
@@ -96,23 +96,23 @@ def get_user_brains(self, user_id) -> list[MinimalBrainEntity]:
def get_public_brains(self) -> list[PublicBrain]:
response = (
self.db.from_("brains")
.select("id:brain_id, name, description, last_update, brain_type")
.select(
"id:brain_id, name, description, last_update, brain_type, brain_definition: api_brain_definition(*), number_of_subscribers:brains_users(count)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brains_users count works ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 27, 2023
@mamadoudicko mamadoudicko merged commit f1ddaca into main Nov 27, 2023
8 checks passed
StanGirard added a commit that referenced this pull request Nov 28, 2023
🤖 I have created a release *beep* *boop*
---


## 0.0.121 (2023-11-28)

## What's Changed
* fix: update max token logic by @mamadoudicko in
#1725
* fix: update public brain subscription logic by @mamadoudicko in
#1727
* fix: sanitize file name by @mamadoudicko in
#1728
* feat(publicBrains): use join queries for better performance by
@mamadoudicko in #1730
* feat: improve delete knowledge performance by @mamadoudicko in
#1733
* fix: 🐛 crawler by @StanGirard in
#1735
* feat: 🎸 local user by @StanGirard in
#1736


**Full Changelog**:
v0.0.120...v0.0.121

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
coolCatalyst added a commit to coolCatalyst/quivr that referenced this pull request Jun 1, 2024
🤖 I have created a release *beep* *boop*
---


## 0.0.121 (2023-11-28)

## What's Changed
* fix: update max token logic by @mamadoudicko in
QuivrHQ/quivr#1725
* fix: update public brain subscription logic by @mamadoudicko in
QuivrHQ/quivr#1727
* fix: sanitize file name by @mamadoudicko in
QuivrHQ/quivr#1728
* feat(publicBrains): use join queries for better performance by
@mamadoudicko in QuivrHQ/quivr#1730
* feat: improve delete knowledge performance by @mamadoudicko in
QuivrHQ/quivr#1733
* fix: 🐛 crawler by @StanGirard in
QuivrHQ/quivr#1735
* feat: 🎸 local user by @StanGirard in
QuivrHQ/quivr#1736


**Full Changelog**:
QuivrHQ/quivr@v0.0.120...v0.0.121

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: backend Related to backend functionality or under the /backend directory lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants