Skip to main content

faq

FAQs

Query condition is correct but result is empty

When using database queries, if an empty result is returned, it usually has the following two scenarios:

  1. No data that meet the search criteria
  2. Data is filtered by permission control

Troubleshooting method

  1. Confirm data existence -Check if the target data exists in the collection directly in the TCB console -Check if the creation time and field value of the data meet expectations

  2. Check permission configuration -Check whether the base permission settings of the collection allow the current user to read -Database queries use the _openid field as the judgment basis for data ownership. -If using a security rule, verify whether the regular expression is correct -Check whether the query condition contains the required fields in the security rule

  3. Verify the query condition -Simplify the query condition and gradually troubleshoot which condition causes the result to be empty -Check whether the field name, data type, and query syntax are correct