unless if we change the
getQueries to
order by ASC
Quoting bwbecker <notifications@github.com>:

>> +
>> +  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 =>
>
> Is there a continuing need for this definition?  If not, please remove it.
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/bwbecker/oat/pull/1/files#r4156824
>