带你学习Mybatis之MappedStatement

2024-06-21  本文已影响0人  墨线宝

mybatis之MappedStatement

MappedStatement是保存mapper.xml的一个节点(select|insert|delete|update),包括许多配置的sql、sql的id、缓存信息、resultMap、parameterType、resultType、languageDriver等重要配置内容

public final class MappedStatement {

  private String resource;
  private Configuration configuration;
  private String id;
  private Integer fetchSize;
  private Integer timeout;
  private StatementType statementType;
  private ResultSetType resultSetType;
  // 保存BoundSql对象
  private SqlSource sqlSource;
  private Cache cache;
  private ParameterMap parameterMap;
  private List<ResultMap> resultMaps;
  private boolean flushCacheRequired;
  private boolean useCache;
  private boolean resultOrdered;
  private SqlCommandType sqlCommandType;
  private KeyGenerator keyGenerator;
  private String[] keyProperties;
  private String[] keyColumns;
  private boolean hasNestedResultMaps;
  private String databaseId;
  private Log statementLog;
  private LanguageDriver lang;
  private String[] resultSets;
}

https://zhhll.icu/2021/框架/mybatis/组件分析/13.mybatis之MappedStatement/

本文由mdnice多平台发布

上一篇下一篇

猜你喜欢

热点阅读