You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 602B

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