sebastienros/yessql

Improvments around IQuery and IQueryIndex

Opened this issue · 2 comments

Here are some recommendation around improving IQuery<> and IQueryIndex<>

  • Add a way to create multiple joins on the same index. Currently when With<TIndex> is called multiple time, we assumed that the users want to join on the same index. This is fine in most/default case, but I think it would be much more helpful to allow the user to change that behavior by adding an alias parameter like something like this
IQueryIndex<TIndex> With<TIndex>(Expression<Func<TIndex, bool>> predicate, string alias = "") where TIndex : class, IIndex

With this change, we can say I want to join the same index multiple time if needed. Each time, a different alias value will have to be provided. When the same alias is used, then we use the existing join.

Maybe that's what Any/All are doing, I don't remember. @deanmarcussen ?

Yeah I think that’s .Any and .All