I thought I was commenting on one that was commented out -- the original version of getResult.

Byron

On 2013-05-09, at 2:18 PM, hj7park <notifications@github.com> wrote:

> In app/models/persist/OatMapper.scala:
> 
> > +
> > +  def getQuery(qid: Int): Query = DB.withConnection(dbname) { implicit conn =>
> > +    val records = SQL("""
> > +        SELECT q.*, p.*
> > +    		FROM _oat.qry_query AS q
> > +   			LEFT JOIN _oat.qry_parameter AS p USING (query_id)
> > +    		WHERE q.query_id = {qid}
> > +    		""").on{"qid" -> qid.underlying}.as(QryQuery.parser("qry_query") ~ (QryParameter.parser("qry_parameter")?) map (flatten) *)
> > +    val queries = records.groupBy(r => r._1.queryId)
> > +    (for ((q, rec) <- queries) yield {
> > +      val parameters = rec.filter(_._2 != None).map(p => new QueryParameter(p._2.get))
> > +      new Query(rec.head._1, parameters)
> > +    }).toList(0)
> > +  }
> > +  
> > +  /*def getResult(q:Query, term:String, subject:String, catalogue:String):List[List[String]] = DB.withConnection(dbname) { implicit conn =>
> unless if we change the getQueries to order by ASC Quoting bwbecker <notifications@github.com>:
> …
> —
> Reply to this email directly or view it on GitHub.
> 


---------------------------------------------
Byron Weber Becker
School of Computer Science
University of Waterloo, Waterloo, Ontario  N2L 3G1
Email: bwbecker@uwaterloo.ca
Phone:  519-888-4567 x34661
Fax:  519-885-1208

Advising FAQ:  www.cs.uwaterloo.ca/current/faq