Golang is a lightweight ORM that supports Dameng (dm) and Kingbase databases.
Source address: https://gitee.com/chunanyong/zorm
go get gitee.com/chunanyong/zorm
- Based on native SQL statements, it is a streamlining and optimization of springrain .
- Built-in code generator
- The code is streamlined, with a total of about 2000 lines, detailed comments, convenient for customization and modification.
- Support transaction propagation, which is the main reason for the birth of zorm
- Support mysql, postgresql, oracle, mssql, sqlite, dm (Da Meng), kingbase (Ren Da Jincang)
- Support database read and write separation
- The update performance of zorm, gorm, and xorm is equivalent. The read performance of zorm is twice as fast as that of gorm and xorm
- The test case is the document: https://gitee.com/chunanyong/readygo/blob/master/test/testzorm/BaseDao_test.go
Production use reference UserStructService.go
The update content is as follows:
- Improve annotation documents
- When the compatible processing database is null, the basic type takes the default value, thanks to @fastabler's pr
- Fix a bug in the batch save method: if the length of the slice is 1, an exception will occur in pgsql and oracle
- Other code details are optimized.