hutool/hutool-db/README.md

40 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p align="center">
<a href="https://hutool.cn/"><img src="https://plus.hutool.cn/images/hutool.svg" width="45%"></a>
</p>
<p align="center">
<strong>🍬Make Java Sweet Again.</strong>
</p>
<p align="center">
👉 <a href="https://hutool.cn">https://hutool.cn/</a> 👈
</p>
## 📚Hutool-db 模块介绍
`Hutool-db`是一个在JDBC基础上封装的数据库操作工具类。通过包装使用ActiveRecord思想操作数据库。
在Hutool-db中使用Entity本质上是个Map代替Bean来使数据库操作更加灵活同时提供Bean和Entity的转换提供传统ORM的兼容支持。
-------------------------------------------------------------------------------
## 🛠️包含内容
### 数据库方言dialect
通过抽象CRUD方法针对不同数据库封装对应的查询、分页等SQL转换功能入口为`DialectFactory`
### 数据源ds
提供常用数据库连接池的门面支持,支持顺序为:
- Hikari > Druid > Tomcat > BeeCP > Dbcp > C3p0 > Hutool Pooled
### SQL相关工具sql
提供SQL相关功能包括SQL变量替换NamedSql通过对象完成SQL构建SqlBuilder等。
`SqlExecutor`提供SQL执行的静态方法。
### 数据库元信息meta
通过`MetaUtil`提供数据库表、字段等信息的读取操作。
### 增删改查Db、Session
提供增删改查的汇总方法类。
### 结果转换handler
通过封装`RsHandler`提供将ResultSet转换为需要的对象的功能。