File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
sql/src/main/scala/app/softnetwork/elastic/sql Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -447,7 +447,7 @@ package object time {
447447
448448 def includeTimeZone : Boolean = false
449449
450- protected def param : String = s " DateTimeFormatter.ofPattern( \" ${ convert()} \" ) "
450+ protected def param : String = " DateTimeFormatter.ofPattern(\" " + convert() + " \" )"
451451
452452 val sqlToJava : Map [String , String ] = Map (
453453 " %Y" -> " yyyy" ,
Original file line number Diff line number Diff line change @@ -193,26 +193,30 @@ object SQLTypeUtils {
193193 context match {
194194 case Some (ctx) =>
195195 ctx.addParam(
196- LiteralParam (s " LocalDate.parse( $expr, DateTimeFormatter.ofPattern( \" yyyy-MM-dd \" )) " )
196+ LiteralParam (
197+ " LocalDate.parse(" + expr + " , DateTimeFormatter.ofPattern(\" yyyy-MM-dd\" ))"
198+ )
197199 ) match {
198200 case Some (p) => return p
199201 case None => // continue
200202 }
201203 case None => // continue
202204 }
203- s " LocalDate.parse( $ expr, DateTimeFormatter.ofPattern( \" yyyy-MM-dd \" )) "
205+ " LocalDate.parse(" + expr + " , DateTimeFormatter.ofPattern(\" yyyy-MM-dd\" ))"
204206 case (SQLTypes .Varchar , SQLTypes .Time ) =>
205207 context match {
206208 case Some (ctx) =>
207209 ctx.addParam(
208- LiteralParam (s " LocalTime.parse( $expr, DateTimeFormatter.ofPattern( \" HH:mm:ss \" )) " )
210+ LiteralParam (
211+ " LocalTime.parse(" + expr + " , DateTimeFormatter.ofPattern(\" HH:mm:ss\" ))"
212+ )
209213 ) match {
210214 case Some (p) => return p
211215 case None => // continue
212216 }
213217 case None => // continue
214218 }
215- s " LocalTime.parse( $ expr, DateTimeFormatter.ofPattern( \" HH:mm:ss \" )) "
219+ " LocalTime.parse(" + expr + " , DateTimeFormatter.ofPattern(\" HH:mm:ss\" ))"
216220 case (SQLTypes .Varchar , SQLTypes .DateTime ) =>
217221 context match {
218222 case Some (ctx) =>
You can’t perform that action at this time.
0 commit comments