Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 637 Bytes

README.md

File metadata and controls

18 lines (15 loc) · 637 Bytes

butterfly-go

根据此项目而用Golang实现的一个实践库,非生产环境可用的工具库

大致工作原理

graph TD
    A[Application starts] -->|default run on db mode | B{check db connection}
    A --> |standalone mode| C[construct the generator instance]
    B --> |db can not access| D[panic]
    B --> |db can be accessed| E{check the data table does exist or not}
    E -.-> |does not exist| C
    C -.-> F[initialize data table]
    C -->H[generate and insert the generated id]
    E-->|does exist|I[get the last data from the data table]
    I-->C
Loading