Permalink
Browse files

remove deprecated view bound code

  • Loading branch information...
hepin1989 committed Dec 3, 2015
1 parent 921255c commit 147a28d7d63b92008971333686b0918fb28dd7ee
Showing with 4 additions and 2 deletions.
  1. +3 −1 slick/src/main/scala/slick/lifted/Ordered.fm
  2. +1 −1 slick/src/main/scala/slick/lifted/Query.scala
@@ -7,8 +7,10 @@ class Ordered(val columns: IndexedSeq[(Node, Ordering)])
object Ordered {
<#list 2..22 as i>
- implicit def tuple${i}Ordered[<#list 1..i as j>T${j} <% Ordered<#if i != j>, </#if></#list>](t: (<#list 1..i as j>T${j}<#if i != j>, </#if></#list>)) =
+ implicit def tuple${i}Ordered[<#list 1..i as j>T${j} <#if i != j>, </#if></#list>](t: (<#list 1..i as j>T${j}<#if i != j>, </#if></#list>))
+ (implicit <#list 1..i as j>ev${j}: T${j} => Ordered<#if i != j>, </#if></#list>): Ordered =
new Ordered(<#list 1..i as j>t._${j}.columns<#if i != j> ++ </#if></#list>)
+
</#list>
}
@@ -135,7 +135,7 @@ sealed abstract class Query[+E, U, C[_]] extends QueryBase[C[U]] { self =>
/** Sort this query according to a function which extracts the ordering
* criteria from the query's elements. */
- def sortBy[T <% Ordered](f: E => T): Query[E, U, C] = {
+ def sortBy[T](f: E => T)(implicit ev: T => Ordered): Query[E, U, C] = {
val generator = new AnonSymbol
val aliased = shaped.encodeRef(Ref(generator))
new WrappingQuery[E, U, C](SortBy(generator, toNode, ConstArray.from(f(aliased.value).columns)), shaped)

0 comments on commit 147a28d

Please sign in to comment.