supabase / postgrest-js

Isomorphic JavaScript client for PostgREST.
https://supabase.com
MIT License
1.03k stars 133 forks source link

feat: query parser: add types for `count` #498

Closed bnjmnt4n closed 6 months ago

bnjmnt4n commented 10 months ago

What kind of change does this PR introduce?

Feature

What is the current behavior?

The types for select queries do not have types for count since it is not a column of the table.

What is the new behavior?

Types for count are added to all tables, since it is an aggregate which supported by PostgREST and is widely used in the Supabase-js documentation as well.

Additional context

This PR is stacked on top of #497. Closes https://github.com/supabase/postgrest-js/issues/447, https://github.com/supabase/postgrest-js/issues/479.

I'm not sure if the handling of the cardinality is correct for this.

github-actions[bot] commented 6 months ago

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

The release is available on:

Your semantic-release bot :package::rocket: