Not only for auto-quote.
keywords are even used in <formula>

On Sun, Aug 22, 2010 at 9:10 AM, Diego Mijelshon <[email protected]>wrote:

> RegisterKeyword only tells NH about reserved words that need to be quoted;
> it's not a way to extend the syntax.
>
> I don't think it's even possible to implement CONNECT BY without doing some
> major SqlString rewriting, as it's a whole extension to the SQL grammar, not
> just a function that can be included as part of the SELECT/FROM/WHERE/etc
> clauses.
>
>     Diego
>
>
>
> On Fri, Aug 20, 2010 at 12:05, Mike <[email protected]> wrote:
>
>> I created a custom dialect and told NH to use it. From there I
>> registered a few keywords so I could use it with HQL.
>>
>> public class CustomDialect : Oracle10gDialect
>> {
>>        public CustomDialect()
>>        {
>>                RegisterKeyword("start");
>>                RegisterKeyword("with");
>>                RegisterKeyword("connect");
>>                RegisterKeyword("by");
>>                RegisterKeyword("prior");
>>        }
>> }
>>
>> Here is the function in my repository responsible for using those
>> keywords.
>>
>> public static IList<string> FindAll()
>> {
>>        ISession sesion = GetSession();
>>
>>        var q = sesion.CreateQuery(@"select nu.StationDesc from
>> NormalUpstream nu
>>                        start with nu.UpStationNumber = 'abc'
>>                        connect by prior StationNumber =
>> nu.UpStationNumber");
>>
>>        return q.List<string>();
>> }
>>
>> That HQL only generated `select nu.StationDesc from NormalUpstream
>> nu`.From that HQL, I would expect the SQL generated would include my
>> new keywords.
>>
>> Why is NH ignoring my registered keywords?
>>
>> Thank you.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "nhusers" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<nhusers%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>



-- 
Fabio Maulo

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to