xodm is a pure Go odm for SQL or NoSQL. xodm is different from other orm or odm because it make for compatible SQL or NoSQL to simplify develop.
Five Seconds Learn
client := NewClient("postgresql", connectionConf)
db := client.Database()
// sync cols to database
db.RegisterCols(new(myDoc))
db.SyncCols()
testInsert := new(myDoc)
testInsert.Name = "haha,I get"
_, err := db.Insert(testInsert)
65%
- JSON support, You can get field in struct from database simple.
- Usual Mode.
- I will add more Features :)
xodm only support postgresql now, it may support orther database future.
- postgresql -- github.com/jackc/pgx
- fix bugs
Use reflect package. I don't think performance beautiful. but it write for develop simple.