Scala support

A full Scala integration means :

  • providing a Scala-compatible version of the Querydsl expr type hierarchy
  • making sure the Query interfaces are intuitive in Scala
  • adding code generation features to reflect annotated Scala-sources to Scala Querydsl types; alternatively something based on dynamic proxies like documented here : http://source.mysema.com/display/querydsl/Alias+usage

Option 1 - Proxy usage

Code generation of Expr-types for Scala is a challenge, since Scala doesn't have an APT equivalent. Alternatively Proxy instances could be used, and a Compiler plugin could change expressions involving proxy paths.

e.g.

var customer: Customer = Alias.create("customer")
var query = new HibernateQuery(session)
query.from(customer)              // compiler plugin changes customer to customer-path
   .where(customer.name eq "Bob") // compiler plugin takes customer.name and wraps it into 

Option 2 - Code generation and extension of Expr types

  • Needs Scala-specific extension of the Expr types
  • Needs code generation functionality

e.g.

var customer: QCustomer = QCustomer.customer
var query = new HibernateQuery(session)
query.from(customer)             
   .where(customer.name eq "Bob") 
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.