github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/go-xorm/tidb/README.md (about) 1 tidb driver and dialect for github.com/go-xorm/xorm 2 ======== 3 4 Currently, we can support tidb for allmost all the operations. 5 6 # How to use 7 8 Just like other supports of xorm, but you should import the three packages: 9 10 ```Go 11 import ( 12 _ "github.com/pingcap/tidb" 13 _ "github.com/go-xorm/tidb" 14 "github.com/go-xorm/xorm" 15 ) 16 17 //The formate of DataSource name is store://uri/dbname 18 // for goleveldb as store 19 xorm.NewEngine("tidb", "goleveldb://./tidb/tidb") 20 // for memory as store 21 xorm.NewEngine("tidb", "memory://tidb/tidb") 22 // for boltdb as store 23 xorm.NewEngine("tidb", "boltdb://./tidb/tidb") 24 ```