Gaurav Chadha
Gaurav Chadha5mo ago

Database Query

I have tried to perform Buidlship Database Query with 3 AND contition values. and I got an error: FAILED_PRECONDITION: The query requires an index. You can create it here: https://console.firebase.google.com/v1/r/project/buildship-xxxx/firestore/indexes?create_composite=xxxxxxxxxxx It seems that max 2 conditions are allowed. Is that correct?
7 Replies
AI Support
AI Support5mo ago
The error you're encountering indicates that your Firestore query requires an index to handle multiple conditions. Firestore does support queries with more than two conditions, but in such cases, you may need to create a composite index to support the query. For more details, you can refer to the BuildShip documentation on how to work with databases, including querying collections: BuildShip Tables
BuildShip Tables – BuildShip
A unified resource to start building your backend with low-code. Dive into triggers, nodes, and step-by-step guidance to jumpstart your workflow creation.
AI Support
AI Support5mo ago
This solution is marked as answered and stored ✅
oneway6026
oneway60265mo ago
I can't find anything explaining how to create composite index on this link. I think we don't even have an access to firestore from buildship. Am I wrong? Maybe solution is to use a proper database solution
AI Support
AI Support5mo ago
You are correct that BuildShip provides a variety of database solutions, including Firestore. If you are looking for a more comprehensive database solution with advanced features like composite indexing, you might want to consider using Supabase. Supabase is a powerful, open-source database solution that integrates seamlessly with BuildShip. You can easily connect your Supabase project to BuildShip and perform operations like creating composite indexes. For more information on connecting Supabase with BuildShip and performing operations, you can refer to the Supabase documentation.
Mike
Mike2mo ago
Just so I understand this, the answer here is to change database to Supabase?
AI Support
AI Support2mo ago
AI Support Bot Information
<@1223985875445350580> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human! Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers. Please note: Team members will review and answer the questions on best efforts basis.
AI Support
AI Support2mo ago
AI Response
Yes, you can change your database to Supabase when using BuildShip. BuildShip supports integration with various databases, including Supabase. For more detailed information and step-by-step guidance on how to connect and use Supabase within BuildShip, you can refer to the following resources: 1. Visually build with Supabase with low-code and AI – A unified resource to start building your backend with low-code, including triggers, nodes, and step-by-step guidance to jumpstart your workflow creation【4:0†source】【4:1†source】【4:2†source】【4:3†source】 . 2. Tutorials on setting up Supabase Cloud (Edge) – Detailed videos explaining how to connect and use Supabase【4:11†source】. For comprehensive documentation, you can visit: BuildShip Supabase Documentation【4:18†source】.
BuildShip AI Support