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

[BUG]: $count is undefined on withReplicas #3951

Closed
1 task done
AndrewJo opened this issue Jan 14, 2025 · 2 comments · Fixed by #3952
Closed
1 task done

[BUG]: $count is undefined on withReplicas #3951

AndrewJo opened this issue Jan 14, 2025 · 2 comments · Fixed by #3952
Assignees
Labels
bug Something isn't working

Comments

@AndrewJo
Copy link
Contributor

Report hasn't been filed before.

  • I have verified that the bug I'm about to report hasn't been filed before.

What version of drizzle-orm are you using?

0.36.3

What version of drizzle-kit are you using?

0.28.1

Other packages

No response

Describe the Bug

When using $count on a client with replicas, the function is missing.

const db = withReplicas(primaryDb, [replicaDb]);
const postCount = db.$count(posts);
//                   ^ $count is undefined

Related/similar bug:

@AndriiSherman
Copy link
Member

Available in [email protected]

@AndrewJo
Copy link
Contributor Author

Thanks for the fast turnaround! You guys rock! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants