My problem is that I just found a SQL Server query hint that helps me to optimize my huge ES query. The query is not static, I build it at runtime, I like the flexibility ES provides in this matter.
I completely understand your concerns and it's hard for me to argue because I agree hints are probably touching just one customer out of a thousand. What I have in mind is to put your thoughts in a direction of how to make custom sql injections into the final select statement generated by EntitySpaces. You already provide '<..>' syntax for using in selects and order by clauses, but it's not always sufficient. What I'd really like to see is the following:
1. Expose the final SQL statement (as a string) to the caller BEFORE actually executing it. A virtual method in the esDynamicQuery class would be great for this purpose. Let the developer to make a change to this string, if necessary. This would be the ultimate flexibility.
2. Provide a virtual method in the esDynamicQuery class that let's to intercept different stages of the final query construction. Something like OnQueryBuild(QueryBuildArgs args) method with possible different inputs, like building a select clause, building a join, building a from clause, etc.
What do you think?
Thanks,
Leonid