-
Notifications
You must be signed in to change notification settings - Fork 966
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
Data Connect @check in query doesn't work - should it? #8133
Comments
Thanks for reporting this! @\check should work in queries, so this definitely seems like a bug - looking into it now |
I was able to repro the issue on the emulator, and also verified that this is working in production. This seems to be an issue with how PGLite is handling transactions/multiple connections. Debug logs from repro:
|
Ok, we've got a few fixes incoming for this: 1 - #8137 should fix the emualtor falling into a broken state and returning prepared statement errors After 1 and 2, this issue should no longer occur 3 - (TODO: @joehan) The underlying issue here is improper handling of single statement transactions. For the sake of correctness, I'm working on a fix here too. |
LGTM! Thanks for prioritizing this. |
[REQUIRED] Environment info
firebase-tools: 13.29.1
Platform: macOS
[REQUIRED] Test case
Attempting to check for membership by row presence in
OrganizationMembership
when querying for anOrganization
row by ID.schema.gql
:queries.gql
:[REQUIRED] Steps to reproduce
Organization
andOrganizationMembership
rows. The following mutations could be used:[REQUIRED] Expected behavior
Inclusion of the
@check
directive has the effect of returning an error if the expression evaluates to false, otherwise is a no-op.[REQUIRED] Actual behavior
The Data array, decoded:
The emulator is then left in a broken state and needs restarting. Prior to restarting, any schema modifications and subsequent queries result in a such an error:
SQL Error: pq: prepared statement "1" already exists
The text was updated successfully, but these errors were encountered: