Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the daily grammar of mybatis?

Shulou Source: shulou.com Published: 2022-06-02 02:05:38 10月03日 Update

What are the daily grammars of mybatis? I believe many inexperienced people are at a loss about this. Therefore, this paper summarizes the causes and solutions of the problems. Through this article, I hope you can solve this problem.

What is the difference between # and $in mybatis?

# mode can prevent sql injection to a great extent. Parameters have''

The $method cannot prevent Sql injection. No''as-is assignment; commonly used to pass in database objects, such as table names. Field name, sql statement, etc.

Key label

It is marked as plain text, without which

< >

The & characters cannot be directly stored in XML and need to be escaped, while with this tag these symbols are stored in XML documents without escaping.

XML parsing errors caused by unexpected special symbols can be avoided.

Sql statement block select * from t where name like # {name} dynamic sql tag / / TODO something # {item, jdbcType=TINYINT} insert into t_role (role_name,note) values (# {roleName}, # {note}) select * from a u.username LIKE CONCAT (CONCAT ('%', # {username, jdbcType=VARCHAR}),'%') update a read through the above Have you mastered the daily grammar of mybatis? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Grammar content way method more tags symbols statements escaping problems large special helpless for this key dynamic cause as is parameters fields Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Huawei MySQL Docker NVidia