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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Lei Xue
I've been trying for dozens of hours ,have no idea,anyone can give me a simple example?

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/ff346ceb-bbd1-4bb4-be30-6cc9931e8a92n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

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

Lei Xue
length(column)=int?

在2020年11月29日星期日 UTC+8 下午8:45:35<Lei Xue> 写道:
I've been trying for dozens of hours ,have no idea,anyone can give me a simple example?

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/bbe51197-3317-40af-8279-1aae00c1fd6cn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

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

Jeff Butler
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


On Sun, Nov 29, 2020 at 7:46 AM Lei Xue <[hidden email]> wrote:
length(column)=int?

在2020年11月29日星期日 UTC+8 下午8:45:35<Lei Xue> 写道:
I've been trying for dozens of hours ,have no idea,anyone can give me a simple example?

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/bbe51197-3317-40af-8279-1aae00c1fd6cn%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CAKpaNj6%2BP--%2Bws2b-iuDj66kM%2BNgMxr2-jcC1acgyeHLj_BQxg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

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

Jeff Butler
On second thought, "length" is probably a type converting function. Here's an example implementation:


Jeff Butler


On Sun, Nov 29, 2020 at 8:45 AM Jeff Butler <[hidden email]> wrote:
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


On Sun, Nov 29, 2020 at 7:46 AM Lei Xue <[hidden email]> wrote:
length(column)=int?

在2020年11月29日星期日 UTC+8 下午8:45:35<Lei Xue> 写道:
I've been trying for dozens of hours ,have no idea,anyone can give me a simple example?

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/bbe51197-3317-40af-8279-1aae00c1fd6cn%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CAKpaNj4VAaLJx_uL0qn_V1aPTKcWbnJdUxQvFfhe5oHdtUf%2BrQ%40mail.gmail.com.