Orm: Support TiDB

This commit is contained in:
ngaut
2015-09-10 16:31:53 +08:00
parent c6448727de
commit c73e0395ed
6 changed files with 236 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ const (
DRSqlite // sqlite
DROracle // oracle
DRPostgres // pgsql
DRTiDB // TiDB
)
// database driver string.
@@ -57,12 +58,14 @@ var (
"mysql": DRMySQL,
"postgres": DRPostgres,
"sqlite3": DRSqlite,
"tidb": DRTiDB,
}
dbBasers = map[DriverType]dbBaser{
DRMySQL: newdbBaseMysql(),
DRSqlite: newdbBaseSqlite(),
DROracle: newdbBaseMysql(),
DRPostgres: newdbBasePostgres(),
DRTiDB: newdbBaseTidb(),
}
)