No other thoughts?
On Sat, Oct 4, 2008 at 11:10 PM, Tuna Toksöz <[EMAIL PROTECTED]> wrote:
> Doesn't have to have any method, a marker interface just works. But if we
> are to define, then we can use
>
> interface INhQuery
> {
> void SetCachable(bool);
> void SetCacheRegion(string);
> void SetCacheMode(whatever);
> }
>
> Those are the biggest set of methods that are common among Hql,Criteria and
> Linq(in the future)
>
> On Sat, Oct 4, 2008 at 11:00 PM, Fabio Maulo <[EMAIL PROTECTED]> wrote:
>
>> 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
>>
>
>
>
> --
> Tuna Toksöz
>
> Typos included to enhance the readers attention!
>
--
Tuna Toksöz
Typos included to enhance the readers attention!