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

Filter method compilation error #17

Closed elrhomariyounes closed 3 years ago

elrhomariyounes commented 3 years ago

Bug report

Describe the bug

Hello,

When trying to perform a filter request to check if a column value is null

await client.Table<User>().Filter("data", Operator.Equals, null).Get();

A compilation error due to an ambiguity between Filter with string third parameter and List of objects overload

public Table<T> Filter(string columnName, Operator op, List<object> criteria)
public Table<T> Filter(string columnName, Operator op, string criteria)

To Reproduce

  1. Try to perform an Filter request to check if a column is null
    await client.Table<User>().Filter("data", Operator.Equals, null).Get();
elrhomariyounes commented 3 years ago

Hello @acupofjose, Any idea please ?

acupofjose commented 3 years ago

@elrhomariyounes sorry for the delay! I committed my solution for it onto master. Would you review as to whether it does what you expect?

Thank you!

elrhomariyounes commented 3 years ago

Yes thank you @acupofjose