MyBatis-Flex: An elegant MyBatis enhancement framework
feature
1. Very lightweight
The entire MyBatis-Flex framework only relies on MyBatis and has no other third-party dependencies.
2. Only enhance
MyBatis-Flex supports CRUD, paging queries, multi-table queries, and batch operations without losing any of MyBatis' original functions.
3. High performance
MyBatis-Flex adopts a unique technical architecture. Compared with many similar frameworks, MyBatis-Flex's performance in terms of addition, deletion, modification, and query is 5 to 10 times or more higher than that of many similar frameworks.
4. More flexible
MyBatis-Flex supports multiple primary keys, multi-table queries, logical deletions, optimistic locking, data desensitization, data encryption, multiple data sources, sub-databases and sub-tables, field permissions, field encryption, multi-tenants, transaction management, SQL audit... Etc., etc. All this, free and flexible.
In MyBatis-Flex v1.7.3, new functions related to multi-table association deletion are added, such as:
QueryWrapper qw = QueryWrapper.create()
.from(ACCOUNT).leftJoin(ARTICLE).on(ACCOUNT.ID.eq(ARTICLE.ACCOUNT_ID))
.where(ACCOUNT.USER_NAME.eq("x"));
The SQL executed is as follows:
DELETE `tb_account` FROM `tb_account`
LEFT JOIN `tb_article` ON `tb_account`.`id` = `tb_article`.`account_id` " +
WHERE `tb_account`.`user_name` = 'x'
MyBatis-Flex v1.7.3 update details are as follows:
- New: Added support for Delete SQL multi-table association query deletion
- New: Add methods to the code generator to facilitate obtaining all table information in certain scenarios
Generator.getTables()
- Optimization: Rewrite the CommonsDialectImpl.wrapColumnAlias method so that SQL does not keyword wrap the as keyword
- Optimization: Code generator optimizes IDialect, adds AbstractJdbcDialect.java
- Optimization: Add @SafeVarargs to some generic methods of QueryModel to eliminate IDE warnings. Thanks @Guan Mengyuan
- Repair: Fix the situation where fieldMapping basic type query is null, thank @Guan Mengyuan
- Fix: Multi-global Listener configuration may be missing, thanks @Ice-samll
- Fix: Configure the schema of the secondary table associated with the table, and the schema is lost when querying the secondary table. Thanks to @Font_C
- Test: Add related code test of filedMapping, thank @Guan Mengyuan
- Test: Add global Listener missing fixed database insertion test, thanks to @Ice-samll
For code contributors, please refer to: https://mybatis-flex.com/zh/intro/what-is-mybatisflex.html#%E8%B4%A1%E7%8C%AE%E8%80%85
To learn more about the MyBatis-Flex framework, please refer to the link:
- 1. Quick start: https://mybatis-flex.com/zh/intro/getting-started.html
- 2. Multi-table related query: https://mybatis-flex.com/zh/base/query.html
- 3. One-to-many, many-to-one: https://mybatis-flex.com/zh/base/relations-query.html
- 4. Flexible QueryWrapper: https://mybatis-flex.com/zh/base/querywrapper.html
- 5. Logical deletion: https://mybatis-flex.com/zh/core/logic-delete.html
- 6. Optimistic locking: https://mybatis-flex.com/zh/core/version.html
- 7. Data filling: https://mybatis-flex.com/zh/core/fill.html
- 6. Data desensitization: https://mybatis-flex.com/zh/core/mask.html
- 7. SQL audit: https://mybatis-flex.com/zh/core/audit.html
- 8. Multiple data sources: https://mybatis-flex.com/zh/core/multi-datasource.htm
- 9. Data source encryption: https://mybatis-flex.com/zh/core/datasource-encryption.html
- 10. Dynamic table name: https://mybatis-flex.com/zh/core/dynamic-table.html
- 11. Transaction management: https://mybatis-flex.com/zh/core/tx.html
- 12. Data permission: https://mybatis-flex.com/zh/core/data-permission.html
- 13. Field permissions: https://mybatis-flex.com/zh/core/columns-permission.html
- 14. Field encryption: https://mybatis-flex.com/zh/core/columns-encrypt.html
- 15. Dictionary write-back: https://mybatis-flex.com/zh/core/columns-dict.html
- 16. Enumeration properties: https://mybatis-flex.com/zh/core/enum-property.html
- 17. Multi-tenancy: https://mybatis-flex.com/zh/core/multi-tenancy.html
- 18. Code generator: https://mybatis-flex.com/zh/others/codegen.html
- 19. QQ communication group: https://mybatis-flex.com/zh/intro/qq-group.html
- 20. Better features are on the way: https://mybatis-flex.com
bilibili video tutorial (free):
Course 1: "MyBatis-Flex Video Tutorial"
Course Introduction: This course is recorded and lectured by Teacher Wang Shuai . Teacher Wang Shuai is also the committer who has contributed the most to the MyBatis-Flex code besides the author. He has a very in-depth understanding of both MyBatis and MyBatis-Flex.
Course address:
https://www.bilibili.com/video/BV11h411A7cU
Course 2: "MyBatis-Flex is easy to master, a complete tutorial from zero basics to advanced applications!" Continuously updating~》
Course Introduction: This course is recorded by Teacher Zhou You. Teacher Zhou You has many years of development experience and rich teaching experience. He can explain many principles of MyBatis-Flex in an easy-to-understand and simple way.
Course address:
https://www.bilibili.com/video/BV1kF411r7ky
In addition, the MyBatis-Flex team has open sourced two other advanced React components. Students who use them can also pay attention to them:
- Antd-bpmn : a high-level workflow component written based on React + Ant.design + bpmn.js, open source URL: https://gitee.com/antdadmin/antd-bpmn
- Antd-crud : a high-quality React [add, delete, modify, check] high-level component, based on Ant.Design. Open source URL: https://gitee.com/antdadmin/antd-crud