Created
May 2, 2016 22:57
-
-
Save eishay/8e3a31ffdeb5bab978d9fbc6761255ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.readOnly { implicit session => | |
val conn = session.conn | |
val st = conn.createStatement() | |
... | |
val sql = | |
s""" | |
select CONCAT(something, "-", other_thing, "-", YEAR(created_at)) | |
from some_table | |
where created_at >= ${db.dialect.day(startDate)} and | |
created_at < ${db.dialect.day(endDate)}; | |
""" | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment