Xorm dialect for github.com/pingcap/tidb, please use mysql protocol connect tidb.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
Lunny Xiao 0739f37170
Add missing licence
3 years ago
.gitignore fixed some parts of pingcap/tidb#36 6 years ago
LICENSE Add missing licence 3 years ago
README.md Change tidb datasource name format 6 years ago
tidb_dialect.go bug fixed go-xorm/tidb#6 5 years ago
tidb_driver.go *: Fix TiDB compile error 5 years ago
tidb_test.go *: Fix TiDB compile error 5 years ago


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"

//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")