Browse Source

feat: update README

master
vran 3 years ago
parent
commit
1c909cbeda
  1. 76
      README.md
  2. BIN
      README/group-member-add.jpg
  3. BIN
      README/group-member-list.jpg
  4. BIN
      README/group-project-create.jpg
  5. BIN
      README/group-project-document.jpg
  6. BIN
      README/group-projects.jpg
  7. BIN
      README/home.jpg
  8. BIN
      README/sys-mail.jpg
  9. BIN
      README/user-profile.jpg
  10. BIN
      README/user.jpg

76
README.md

@ -1,67 +1,47 @@
# Databasir
## 规划
项目目前还属于 MVP (可行性验证)阶段,功能、文档等尚未完备,功能也处于随时调整的阶段
Database document generator
以下功能尚在开发中
you could use `databasir` to generate database meta model, or render it as markdown / pdf (TODO) / html (TODO)
- [ ] 定时文档同步
- [ ] 表字段协同注释
- [ ] 操作审计日志
- [x] 容器化部署
# How to use
## 简介
## Database Meta to Java Model
**Databasir** 是一款在线数据库文档管理工具,为企业开发中最核心的数据库结构提供文档化管理支撑能力
```java
java.sql.Connection connection=...;
DatabaseMeta meta=Databasir.of().get(connection,"user").orElseThrow();
```
1. 自动化:定时、手动同步数据库结构并生成文档
2. 版本化:历史变更版本皆可查看
3. 精细化:团队成员可以协同为文档做更精细化的注释
4. 扁平化:权限管理扁平,减少冗余流程,价值最大化
## Render as Markdown
## 部署 TODO
```java
try(FileOutputStream out=new FileOutputStream("user.md")){
java.sql.Connection connection=...;
Databasir databasir=Databasir.of();
DatabaseMeta meta=databasir.get(connection,"user").orElseThrow();
databasir.renderAsMarkdown(doc,out);
}catch(IOException e){
throw new IllegalStateException(e);
}
```
Databasir 采用了前后端分离的模式进行开发和部署,前端和后端需要独立部署
- Markdown Example
- 后端应用: https://github.com/vran-dev/databasir
- 前端应用: https://github.com/vran-dev/databasir-frontend
![](README/table-doc.png)
## 展示
## Ignore tables or columns
![](README/home.jpg)
support regex pattern to ignore table or column
![](README/group-projects.jpg)
```java
java.sql.Connection connection=...;
DatabasirConfig config=new DatabasirConfig();
config.ignoreColumn("id*");
config.ignoreTable("flyway.*");
DatabaseMeta meta=Databasir.of(config).get(connection,"user").orElseThrow();
```
![](README/group-project-create.jpg)
## Extension
![](README/group-project-document.jpg)
Custom configuration
![](README/group-member-list.jpg)
```java
java.sql.Connection connection=...;
DatabasirConfig config=new DatabasirConfig();
config.setDatabaseMetaRepository(...); // your custom repository
config.setTableMetaRepository(...); // your custom repository
config.setColumnMetaRepository(...); // your custom repository
config.setTriggerMetaRepository(...); // your custom repository
config.setIndexMetaRepository(...); // your custom repository
DatabaseMeta meta=Databasir.of().get(connection,"user").orElseThrow();
```
![](README/group-member-add.jpg)
Default Repository Is
![](README/user.jpg)
- com.databasir.core.meta.repository.impl.jdbc.JdbcDatabaseMetaRepository
- com.databasir.core.meta.repository.impl.jdbc.JdbcTableMetaRepository
- com.databasir.core.meta.repository.impl.jdbc.JdbcColumnMetaRepository
- com.databasir.core.meta.repository.impl.jdbc.JdbcIndexMetaRepository
- com.databasir.core.meta.repository.impl.jdbc.JdbcTriggerMetaRepository
![](README/user-profile.jpg)
![](README/sys-mail.jpg)

BIN
README/group-member-add.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
README/group-member-list.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
README/group-project-create.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
README/group-project-document.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
README/group-projects.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
README/home.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
README/sys-mail.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
README/user-profile.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
README/user.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Loading…
Cancel
Save