© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
2 replies
bennettcohen

Increment values in bulk

I have a function that sends notifications and I'm storing the total # of notifications sent in my db. What's the best way to increment this value from the js client without a for loop?

const { data: updatedSigners, error: e2 } = await supabase
    .from('contract_signers')
    .update({
    last_notification: now.toISOString(),
    total_notifications: ?????
})
    .in('id', signers.map((signer) => signer.id));
const { data: updatedSigners, error: e2 } = await supabase
    .from('contract_signers')
    .update({
    last_notification: now.toISOString(),
    total_notifications: ?????
})
    .in('id', signers.map((signer) => signer.id));
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Bulk Insert RPC to return inserted values.
SupabaseSSupabase / help-and-questions
4y ago
Automated increment in id in table
SupabaseSSupabase / help-and-questions
2w ago
Auto increment ID in JavaScript
SupabaseSSupabase / help-and-questions
4y ago
Increment Not Working
SupabaseSSupabase / help-and-questions
4y ago