Browse files

Whoops

  • Loading branch information...
1 parent c5789a6 commit 97cbf7e938781bbe81f7b6221449b1d10118d07b @teozkr committed Jun 5, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 nina/src/main/scala/Query.scala
View
4 nina/src/main/scala/Query.scala
@@ -45,8 +45,8 @@ case object Descending extends OrderDirection
case class GetQuery[A, T <: Table](query: Query[T], cols: T#Columns[A], ordering: Option[(T#Column[_], OrderDirection)]) {
private val stringifiedOrdering = ordering map { case (col, dir) => (col.name, dir) }
- def order(column: query.table.Column[_], direction: OrderDirection) = order((column, direction))
- def order(columnAndDirection: (query.table.Column[_], OrderDirection)) = GetQuery(query, cols, Some(columnAndDirection))
+ def order(column: query.table.Column[_], direction: OrderDirection): GetQuery[A, T] = order((column, direction))
+ def order(columnAndDirection: (query.table.Column[_], OrderDirection)): GetQuery[A, T] = GetQuery(query, cols, Some(columnAndDirection))
def single()(implicit conn: Connection): Option[A] = query.table.executor.getOne(query.table.tableName, query.filters, cols.columnNames, stringifiedOrdering).map(cols.bindFromMap(_).value)
def take(amount: Long)(implicit conn: Connection): Seq[A] = query.table.executor.getMultiple(query.table.tableName, query.filters, cols.columnNames, stringifiedOrdering, amount).map(cols.bindFromMap(_).value)

0 comments on commit 97cbf7e

Please sign in to comment.