Found this while deleting expired records. the IsProtected check is lost and protected rows get deleted too:
await client.Table<Record>().Where(x => x.IsProtected ? false : x.IsExpired).Delete();
// sends is_expired=eq.True
same query with x => !x.IsProtected && x.IsExpired sends and=(is_protected.not.eq.True,is_expired.eq.True) which is correct.
other ternaries have the same problem, the last bool column wins:
.Where(x => x.IsProtected ? x.IsExpired : false) // sends is_expired=eq.True
.Where(x => x.IsProtected ? x.IsExpired : x.IsArchived) // sends is_archived=eq.True
there is no VisitConditional in WhereExpressionVisitor, so VisitMember just overwrites the filter for every branch. no error, the request goes out with half the filter.
Found this while deleting expired records. the IsProtected check is lost and protected rows get deleted too:
same query with
x => !x.IsProtected && x.IsExpiredsendsand=(is_protected.not.eq.True,is_expired.eq.True)which is correct.other ternaries have the same problem, the last bool column wins:
there is no
VisitConditionalinWhereExpressionVisitor, soVisitMemberjust overwrites the filter for every branch. no error, the request goes out with half the filter.