supabase-community / postgrest-csharp

A C# Client library for Postgrest
https://supabase-community.github.io/postgrest-csharp/api/Postgrest.html
MIT License
114 stars 22 forks source link

Refactoring utils methods #29

Closed elrhomariyounes closed 3 years ago

elrhomariyounes commented 3 years ago

Chore

Describe the chore

Hello @acupofjose, Your thoughts about moving utils methods in the Table class like (PrepareFilter, PrepareData, GenerateUrl) to static methods in Helpers class and make it internal?

acupofjose commented 3 years ago

I sort of wrestled with this idea when I wrote Table.cs - it seems to me that PrepareFilter, PrepareData, and GenerateUrl are specific to, and will only be called by, the Table class. As such, I think it best to stay in where it is.

However - and this is just my own ignorance on proper testing - I made them public so as to be able to call them from the Testing project. Is there a way to make them internal and still testable?

elrhomariyounes commented 3 years ago

@acupofjose I think there is a way to do it, I will send a PR

elrhomariyounes commented 3 years ago

Solved in #30