Cool Graphics
April 24, 2013
Leave a comment
Better Grep
April 24, 2013
Leave a comment
Interesting I like the way it highlights and also puts line numbers.
Elevation Gain
April 21, 2013
Leave a comment
So today when I went out riding I had just one goal in my mind to go over my previous max elevation gained (1800 feet) and I am glad to say I made it to 2332 feet.
Using In Clause with MyBatis and Scala
January 4, 2013
Leave a comment
Had a bit of struggle to get this to work, logging the solution here so that it will be helpful to someone else. I am using Scala 2.9.1 and mybatis-scala-core 1.0.0.
val findOpenGroups = new SelectListBy[GroupIds,Group] {
def xsql = SELECT h.xxxxxx AS id,
h.xxxxxx AS launchedDate
FROM USA_xxxx_xxxx_xxxx h
WHERE h.new_status = 'Open'
AND h.id IN
<foreach item="item" collection="ids" open="(" separator="," close=")">
{"#{item}"}
</foreach>
}
GroupIds is a simple class, just make sure you are using the java.util.List.
class GroupIds(val ids:java.util.List[Int]){}
UPDATE
Frank Martínez pointed out to me that you can also do {"item" ?} instead of {"#{item}"} but you will need to import org.mybatis.scala.mapping.Binding._ Thanks Frank.