electrodb icon indicating copy to clipboard operation
electrodb copied to clipboard

Doc example incorrect and misleading

Open iOSonntag opened this issue 10 months ago • 2 comments

Hey folks, GREAT JOB on ElectroDB absolutely dope what you have build!!

Just a quick note on one doc example I found to be misleading. In the ConditionExpression section under examples here in the "dynamic" filtering example is a logical issue (I think).

As I understood the framework, chained where clauses lead to implicit ANDs and if thats the case then the example will never ever return any item. That is because it tries to find an item where the keeper attribute is two different values at the same time (pratically impossible).

My suggestion would be to update the example to use OR instead, but I am not sure how to do this in order for the example to still contain that for loop. That is why I have not edited the page.

iOSonntag avatar Apr 21 '24 13:04 iOSonntag

Great catch! I usually accept and merge pretty much any documentation PRs; I'm not very opinionated about how an inaccurate example would be changed, so if you wanted to remove the loop entirely (for example) I'd be totally fine with that. If you'd like to make a PR I'd stamp it, otherwise I'll note this for my next documentation commit!

tywalch avatar May 01 '24 13:05 tywalch

@tywalch Alright I just reversed the condition to not equal ne() that should do the trick I guess. Pull request #379

iOSonntag avatar May 04 '24 20:05 iOSonntag

Closed with merge of #379

iOSonntag avatar May 23 '24 13:05 iOSonntag