how to get complete sql before execute query??

Visto 35 veces
Saltar al primer mensaje no leído

ldy ldy

no leída,
29 dic 2020, 3:49:2529/12/20
a mybatis-user
I want to know how to get complete sql before execute find or other methods,
it is better to get complete sql and  take it as cache key

Guy Rouillier

no leída,
30 dic 2020, 3:06:1530/12/20
a MyBatis User
Found an example here:


Briefly, you want to call getBoundSql() on the statement. In that page, ignore the suggestion to use ${param} instead of #{param}.  The former does text substitution instead of SQL parameters, which is not secure - SQL injection - and not advisable.

--
Guy Rouillier

On 12/29/2020 3:49:25 AM, "ldy ldy" <qq1098...@gmail.com> wrote:

I want to know how to get complete sql before execute find or other methods,
it is better to get complete sql and  take it as cache key

--
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/ba929b4f-79a5-49bb-906c-17867699bb96n%40googlegroups.com.
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos