All Projects → go-xorm → tidb

go-xorm / tidb

Licence: BSD-3-Clause license
Xorm dialect for github.com/pingcap/tidb

Programming Languages

go
31211 projects - #10 most used programming language

tidb driver and dialect for github.com/go-xorm/xorm

Currently, we can support tidb for allmost all the operations.

How to use

Just like other supports of xorm, but you should import the three packages:

import (
    _ "github.com/pingcap/tidb"
    _ "github.com/go-xorm/tidb"
    "github.com/go-xorm/xorm"
)

//The formate of DataSource name is store://uri/dbname
// for goleveldb as store
xorm.NewEngine("tidb", "goleveldb://./tidb/tidb")
// for memory as store
xorm.NewEngine("tidb", "memory://tidb/tidb")
// for boltdb as store
xorm.NewEngine("tidb", "boltdb://./tidb/tidb")
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].