Skip to content

Conversation

@xiaoyekanren
Copy link
Contributor

No description provided.

xiaoyekanren and others added 6 commits June 4, 2025 14:29
try (SqlSession session = sqlSessionFactory.openSession(true)) {
MixMapper mapper = session.getMapper(MixMapper.class);

Date now = new Date();

Check notice

Code scanning / CodeQL

Unread local variable Note

Variable 'Date now' is never read.
@CritasWang CritasWang requested a review from Copilot June 4, 2025 09:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a complete MyBatis Generator example under examples/mybatis-generator, updates the example project’s POM and resource includes, and corrects markdown fences in the primary README files to use XML highlighting.

  • Reformatted code fences in mybatis-generator/README.md and mybatis-generator/README-zh.md from java to xml.
  • Introduced example MyBatis config files, mapper XML, Java model & mapper interfaces, and a Main.java demo.
  • Updated examples/mybatis-generator/pom.xml with needed dependencies and resource settings, and improved example README to reflect the new setup.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
mybatis-generator/README.md Changed snippet fences to XML for pom configuration
mybatis-generator/README-zh.md Same fence fix for Chinese README
examples/mybatis-generator/src/main/resources/mybatis-config.xml Added core MyBatis configuration
examples/mybatis-generator/src/main/resources/generatorConfigByExample.xml Added “by example” generator configuration
examples/mybatis-generator/src/main/resources/generatorConfig.xml Updated classPathEntry placeholder and added table flag
examples/mybatis-generator/src/main/java/org/apache/iotdb/mybatis/plugin/xml/MixMapper.xml Added mapper XML for Mix entity
examples/mybatis-generator/src/main/java/org/apache/iotdb/mybatis/plugin/model/Mix.java Added Mix model class with Swagger schema annotations
examples/mybatis-generator/src/main/java/org/apache/iotdb/mybatis/plugin/mapper/MixMapper.java Added mapper interface for Mix
examples/mybatis-generator/src/main/java/org/apache/iotdb/mybatis/Main.java Demo application for insert/select/delete/batch
examples/mybatis-generator/pom.xml Added MyBatis, Lombok, Springdoc, IoTDB-JDBC dependencies and resources
examples/mybatis-generator/README.md Updated SQL snippet, generator instructions, and output file list
Comments suppressed due to low confidence (3)

examples/mybatis-generator/README.md:110

  • The README lists MixExample.java as an output, but that file isn't included in this example. Consider removing it or clarifying that it's generated at runtime.
org/apache/iotdb/mybatis/plugin/model/MixExample.java

examples/mybatis-generator/src/main/resources/generatorConfig.xml:21

  • This placeholder path needs to be replaced by the actual JAR location in user projects. Please document that /path/to/iotdb-jdbc.jar is meant as an example.
<classPathEntry location="/path/to/iotdb-jdbc.jar"/>

examples/mybatis-generator/README.md:64

  • [nitpick] Consider labeling the SQL block with ```sql for syntax highlighting clarity instead of a generic code fence.
</details>

@CritasWang CritasWang merged commit 253faa0 into apache:master Jun 4, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants