supabase / postgrest-js

Isomorphic JavaScript client for PostgREST.
https://supabase.com
MIT License
962 stars 128 forks source link

detect !inner in one-to-one relationships #530

Closed wyozi closed 4 weeks ago

wyozi commented 2 months ago

What kind of change does this PR introduce?

Select query type parser feature/bugfix

What is the current behavior?

.select("a_onetoone_rel!inner(*)")

results in a nullable a_onetoone_rel, while it should be non-nullable due to !inner

What is the new behavior?

Detects this case and removes nullability of the inner one-to-one relationship.

Additional context

non one-to-one case was fixed in #458

wyozi commented 2 months ago

@steve-chavez this would be good to have merged, since otherwise https://github.com/supabase/postgrest-js/pull/458 will behave very unexpectedly with !inner randomly not working on one-on-one relationships

github-actions[bot] commented 4 weeks ago

:tada: This PR is included in version 1.15.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket: