Configuration is the centralized management center of the entire MyBatis configuration system. Most of the components learned above, such as Executor, StatementHandler, Cache, MappedStatement, are created and managed directly or indirectly by it. In addition, it affects the behavior of these components ..
SqlNode (dynamic SQL script) Dynamic SQL xml elements will eventually be resolved into an executable script. MyBatis generates dynamic SQL by passing parameters to this script and executing script calculations. The script is embodied in MyBatis as SqlNode. First Mybatis
Nested mapping is in Mybatis. The so-called nested mapping is that the bean returned in ResultMap has a List attribute of other beans. This is set to save duplicate attributes, because the data returned from relational data is two-dimensional, that is, the List in the bean is ..
Delayed loading When a nested query occurs, the first level return value BeanA has the attribute BeanB, while the second level return value BeanB has the attribute BeanA, which may lead to an endless loop, that is, circular dependency. Mybatis solves the circular dependency of nested queries ..
/*** Default {@ link ResultSetHandler} implementation class * * @ author Clinton Begin * @ author Eduardo Macarron * @ author Iwao AVE! * @author Kazuki Shimizu */ public class DefaultResultSetHa...
ParameterHandler ParameterHandler is translated into a parameter processor, which is responsible for dynamically assigning values to the SQL statement parameters of PreparedStatement. /** * A parameter handler sets the parameters of the {@code PreparedStatemen...
StatementHandler JDBC processor, builds JDBC Statement based on JDBC, sets parameters, and then executes Sql. Each time SQl is called in the session, there will be a corresponding and unique Statement instance. Use ParameterHandler for parameter configuration ..
Basic functions of Executor: modify and check. The reason why there are no additions or deletions is that all additions and deletions can be attributed to modifications. It will delegate database related operations to StatementHandler. Cache maintenance: level 1 cache and level 2 cache. The functions include creating cache keys and clearing ..
No more
Loading failed, please refresh the page
Load more