Someone can help me that how to use length() function with MyBatis3DynamicSql

37 views
Skip to first unread message

Lei Xue

unread,
Nov 29, 2020, 7:45:35 AM11/29/20
to mybatis-user
I've been trying for dozens of hours ,have no idea,anyone can give me a simple example?

Lei Xue

unread,
Nov 29, 2020, 7:46:52 AM11/29/20
to mybatis-user
length(column)=int?

Jeff Butler

unread,
Nov 29, 2020, 8:45:57 AM11/29/20
to mybati...@googlegroups.com
MyBatisDynamicSql doesn't have a built-in "length" function, but it is easy to create your own. You can use the the built-in "lower" function as a good example:


Jeff Butler


--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/bbe51197-3317-40af-8279-1aae00c1fd6cn%40googlegroups.com.

Jeff Butler

unread,
Nov 29, 2020, 1:33:04 PM11/29/20
to mybati...@googlegroups.com
On second thought, "length" is probably a type converting function. Here's an example implementation:


Jeff Butler

Reply all
Reply to author
Forward
0 new messages