supabase-community / postgrest-go

Isomorphic Go client for PostgREST. (Now Updating)
https://supabase.io
Apache License 2.0
170 stars 27 forks source link

Implement a Single method #8

Closed inian closed 2 years ago

inian commented 3 years ago

Similar to https://supabase.io/docs/reference/javascript/single

yusufpapurcu commented 3 years ago

Single method is exist but in unusable status. We need think about how can we add them to flow.

yusufpapurcu commented 3 years ago

Actually all transform builders in unusable status.

bariqhibat commented 2 years ago

Hey @inian, I saw that this method is implemented already in the transform builder https://github.com/supabase-community/postgrest-go/blob/main/transformbuilder.go#L83

yusufpapurcu commented 2 years ago

Yes it is implemented in transform builders. But they are unusable because of current builder architecture. We must design a better architecture for this project.

bariqhibat commented 2 years ago

Yes it is implemented in transform builders. But they are unusable because of current builder architecture. We must design a better architecture for this project.

Can the single just use the limit method and take only one? It'll still return an array, but still makes sense

yusufpapurcu commented 2 years ago

Yes we can do this but this method is not correct I think. True one is implementing every transform builders to the architecture. Actually we can talk this architect changes in another issue 😄

bariqhibat commented 2 years ago

Yes we can do this but this method is not correct I think. True one is implementing every transform builders to the architecture. Actually we can talk this architect changes in another issue 😄

Yeah that makes sense.. Sure, thanks Yusuf!