-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: HQL internal algorythms
PostPosted: Sun Jan 25, 2004 4:42 pm 
Newbie

Joined: Sun Jan 25, 2004 4:39 pm
Posts: 5
Hello All,
Could someone please explain or point to an explanation of
algorithms used to convert HQL to SQL ?

Thank you

Boris


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 25, 2004 7:30 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Its best to reference the source. It is difficult to explain it here (and some of the deep internals I am not that familar with).
In anycase, since HQL is based on SQL with the ORM twist alot of the HQL is passed directly without modification to the SQL engine.
Where most of the work needs to be done is in the select clause where not only the class property may need to be converted but the type of the expression has to be determined. In the case of the select functions (that may also be nested) its possible type conversions may need to occur.
Check the net.sf.hibernate.hql.* for the parser classes. Conversions etc occur then its time to load it - check out the loader classes in net.sf.hibernate.loader.* (in particular Loader.java). Lastly have a look through the net.sf.hibernate.persister.* classes for getting close to the metal.


Top
 Profile  
 
 Post subject: Thanks for reply David
PostPosted: Sun Jan 25, 2004 8:35 pm 
Newbie

Joined: Sun Jan 25, 2004 4:39 pm
Posts: 5
Thanks for reply David, and sorry for crossposting,
i just was not sure which forum was the best.

And yes, source is the best source :) but not the easiest.
I was hoping that someone wrote an overview of the approach.

Anyone ???

Best,
Boris


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.