Which should be the contract of INhQuery ?

2008/10/4 Tuna Toksöz <[EMAIL PROTECTED]>

> Hello everybody,
>
> When studying the issue NH-1508<http://jira.nhibernate.org/browse/NH-1508>,
> I realized that MultiQuery is coupled to Hql(Sql is not possible). Fabio
> told me to throw NotSupportedException temporarily, just to let the user
> know about the situation.
> The discussion between Fabio and me brought some ideas in my mind.
>
> Let me tell what I have in my mind.
>
> 1. Define an interface INHQuery (a better name would be IQuery but it is
> used for Hql) which will be base for IQuery and ICriteria, and in the future
> Linq Queries. Can be either a marker interface or a set of common methods
> such as cacheable etc. This part is optional)
> 2. Define a Batcher class(I need to study NH more to come up with full
> declaration) and an interface IBatchQueryAppender<T> where T:INhQuery
>     The batcher will accept any INhQuery as long as its Appender is
> defined. It will do the work to append the query to the batch.
>  This way, different querying methods can be used in the same batch.
>
> This implementation will make MultiQuery and MultiCriteria obselete and
> current implementations for those will redirect method calls to INhQuery in
> order to prevent breaking changes.
>
> This is my initial thoughts about the issue. Comments are welcome.
>
> Cheers!
> --
> Tuna Toksöz
>
> Typos included to enhance the readers attention
>



-- 
Fabio Maulo

Reply via email to