Permalink
Browse files

Merge pull request #154 from slick/tmp/crossScalaDirectEmbedding

direct embedding: backported matching on tuples by symbols for Scala 2.1...
  • Loading branch information...
cvogt committed May 2, 2013
2 parents 17cb162 + 942d33e commit cb547577858478623dac90b2a0bf60ea449c222a
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/main/scala/scala/slick/direct/SlickBackend.scala
@@ -223,10 +223,14 @@ class SlickBackend( driver:BasicDriver, mapper:Mapper ) extends QueryableBackend
// Tuples
case Apply(
Select(Select(Ident(package_), class_), method_),
op,
components
)
if package_.decoded == "scala" && class_.decoded.startsWith("Tuple") && method_.decoded == "apply" // FIXME: match smarter than matching strings
if definitions
.TupleClass
.filter(_ != NoSymbol)
.map( _.companionSymbol.typeSignature.member( newTermName("apply") ) )
.contains( op.symbol )
=>
sq.ProductNode( components.map(s2sq(_).node) )

0 comments on commit cb54757

Please sign in to comment.