The alternative is something hard to say here... H3.2.6 have so strange
things.....The have an SQL-AST but it is completely wired with ANTLR in fact
they don't use the SQL-AST to create all query but only to translate the
HQL-AST.
Now... have an SQL-AST for everything is too much (even if it can be useful
in some cases as the MSSQL2005 dialect) but the SqlString only to have a
certain position of a unidentified-parameter is too much too.
We must think in something more light... well... it is not a moment for
this analysis.

2008/12/15 Tuna Toksöz <[email protected]>

> what would be the alternative? It becomes another pita point, especially
> when it is tried to convert into string etc.
>
>
> On Mon, Dec 15, 2008 at 11:37 PM, Fabio Maulo <[email protected]>wrote:
>
>> And, after that, another thing I would like to thrown away is the
>> SqlString
>>
>> 2008/12/15 Fabio Maulo <[email protected]>
>>
>>
>>> 2008/12/15 Davy Brion <[email protected]>
>>>
>>>> do you mean we would only take care of this in Artorius? and not in the
>>>> current code?
>>>>
>>>> because for me, this issue is rather blocking... we use MultiCriteria in
>>>> my current project in a lot of places, often with paged queries, so i
>>>> wouldn't be able to upgrade to NH 2.1 if that release does not use 
>>>> Artorius.
>>>>
>>>
>>> No Davy... (apparently my English is a disaster)
>>> I mean....
>>> This is my proposal:
>>> "Transform" positional parameters to "NamedParameter" with a certain name
>>> as: nhp1__01, nhp1__02...
>>> when a positional parameter is used in a MultiCriteria or MultiQuery the
>>> name will be
>>> Query1: nhp1__01, nhp1__02....
>>> Query2: nhp2__01, nhp2__02....
>>>
>>> That is my proposal to solve it in trunk.
>>>
>>> Then...... I'm thinking to apply this solution for the QueryTranslator in
>>> Artorius (where possible) because the actual implementation of mix
>>> positional+named parameter is a PITA.
>>>
>>>
>>>>
>>>> On Mon, Dec 15, 2008 at 10:18 PM, Fabio Maulo <[email protected]>wrote:
>>>>
>>>>> Ok... I have an idea about this problem since various month and
>>>>> probably is the time to apply it even if it mean a deviation...My
>>>>> proposal is:
>>>>> "Transform" positional parameters to "NamedParameter" with a certain
>>>>> name as: nhp1__01, nhp1__02...
>>>>> when a positional parameter is used in a MultiCriteria or MultiQuery
>>>>> the name will be
>>>>> Query1: nhp1__01, nhp1__02....
>>>>> Query2: nhp2__01, nhp2__02....
>>>>>
>>>>> I'm thinking to manage it in this way in Artorius
>>>>>
>>>>> thoughts?
>>>>>
>>>>>
>>>>> 2008/12/15 Davy Brion <[email protected]>
>>>>>
>>>>> yes, it was introduced in revision 3860 by the following change:
>>>>>>
>>>>>>         void ISqlStringVisitor.Parameter()
>>>>>>         {
>>>>>>             string name = formatter.GetParameterName(parameterIndex);
>>>>>>             parameterIndex++;
>>>>>>             result.Append(name);
>>>>>>         }
>>>>>>
>>>>>> which was changed to this:
>>>>>>
>>>>>>         void ISqlStringVisitor.Parameter(Parameter parameter)
>>>>>>         {
>>>>>>             string name = formatter.GetParameterName(
>>>>>>                 parameter.OriginalPositionInQuery ?? parameterIndex);
>>>>>>             parameterIndex++;
>>>>>>             result.Append(name);
>>>>>>         }
>>>>>>
>>>>>> the change was necessary to get some really complex paging with order
>>>>>> by queries working, but it did unfortunately also break paging 
>>>>>> parameters in
>>>>>> certain multicriteria situations
>>>>>>
>>>>>>
>>>>>> On Mon, Dec 15, 2008 at 10:04 PM, Tuna Toksöz <[email protected]>wrote:
>>>>>>
>>>>>>> Davy do you know if this issue existed before new 2005 dialect
>>>>>>> proposal?
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Dec 15, 2008 at 10:32 PM, Davy Brion 
>>>>>>> <[email protected]>wrote:
>>>>>>>
>>>>>>>> well not sure if it's exactly the same... in my issue, the
>>>>>>>> parameters are also ordered incorrectly, but in the other direction 
>>>>>>>> and only
>>>>>>>> when using MultiCriteria (and probably MultiQuery as well)
>>>>>>>>
>>>>>>>> i have a possible fix in mind, which i'm going to try soon, but it
>>>>>>>> would be somewhat specific to the MultiCriteria/MultiQuery situation
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Dec 15, 2008 at 9:30 PM, Tuna Toksöz <[email protected]>wrote:
>>>>>>>>
>>>>>>>>> probably. So moving previous as a subtask of your issue.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Dec 15, 2008 at 10:29 PM, Davy Brion <[email protected]
>>>>>>>>> > wrote:
>>>>>>>>>
>>>>>>>>>> hmm, this also appears to be related to an issue i created earlier
>>>>>>>>>> today:
>>>>>>>>>> http://jira.nhibernate.org/browse/NH-1609
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Mon, Dec 15, 2008 at 9:17 PM, Tuna Toksöz 
>>>>>>>>>> <[email protected]>wrote:
>>>>>>>>>>
>>>>>>>>>>> http://jira.nhibernate.org/browse/NH-1610
>>>>>>>>>>>
>>>>>>>>>>> Here is the issue, add it to your watch list so you can track.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Dec 15, 2008 at 10:13 PM, Diego Jancic <[email protected]
>>>>>>>>>>> > wrote:
>>>>>>>>>>>
>>>>>>>>>>>>  Sure I will (not at work now, but I'm gonna do it tomorrow)
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> *From:* [email protected] [mailto:
>>>>>>>>>>>> [email protected]] *On Behalf Of *Tuna
>>>>>>>>>>>> Toksöz
>>>>>>>>>>>> *Sent:* Monday, December 15, 2008 18:07
>>>>>>>>>>>> *To:* [email protected]
>>>>>>>>>>>> *Subject:* [nhibernate-development] Re: Parameters Bug
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Yes that was it! I am going to reopen the issue, btw eventhough
>>>>>>>>>>>> it maynot be related can you update to revision 3945 and see what 
>>>>>>>>>>>> happens?
>>>>>>>>>>>>
>>>>>>>>>>>> On Mon, Dec 15, 2008 at 10:02 PM, Diego Jancic <
>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> René André suggested a changed (in the same issue), which was
>>>>>>>>>>>> never applied.
>>>>>>>>>>>> File: src\NHibernate\SqlCommand\SqlString.cs, line: 27
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Tuna Toksöz
>>>>>>>>>>>> http://tunatoksoz.com
>>>>>>>>>>>>
>>>>>>>>>>>> Typos included to enhance the readers attention!
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Tuna Toksöz
>>>>>>>>>>> http://tunatoksoz.com
>>>>>>>>>>>
>>>>>>>>>>> Typos included to enhance the readers attention!
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Davy Brion
>>>>>>>>>> http://davybrion.com
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Tuna Toksöz
>>>>>>>>> http://tunatoksoz.com
>>>>>>>>>
>>>>>>>>> Typos included to enhance the readers attention!
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Davy Brion
>>>>>>>> http://davybrion.com
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Tuna Toksöz
>>>>>>> http://tunatoksoz.com
>>>>>>>
>>>>>>> Typos included to enhance the readers attention!
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Davy Brion
>>>>>> http://davybrion.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Fabio Maulo
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Davy Brion
>>>> http://davybrion.com
>>>>
>>>
>>>
>>>
>>> --
>>> Fabio Maulo
>>>
>>
>>
>>
>> --
>> Fabio Maulo
>>
>
>
>
> --
> Tuna Toksöz
> http://tunatoksoz.com
>
> Typos included to enhance the readers attention!
>
>


-- 
Fabio Maulo

Reply via email to