mirror of
https://github.com/zhufuyi/sponge.git
synced 2025-10-06 01:07:08 +08:00
support database sqlite
This commit is contained in:
@@ -172,7 +172,7 @@ func Test_initTemplate(t *testing.T) {
|
||||
initTemplate()
|
||||
}
|
||||
|
||||
func TestGetTableInfo(t *testing.T) {
|
||||
func TestGetMysqlTableInfo(t *testing.T) {
|
||||
info, err := GetMysqlTableInfo("root:123456@(192.168.3.37:3306)/test", "user")
|
||||
t.Log(err, info)
|
||||
}
|
||||
@@ -184,6 +184,11 @@ func TestGetPostgresqlTableInfo(t *testing.T) {
|
||||
t.Log(sql, fieldTypes)
|
||||
}
|
||||
|
||||
func TestGetSqliteTableInfo(t *testing.T) {
|
||||
info, err := GetSqliteTableInfo("..\\..\\..\\test\\sql\\sqlite\\sponge.db", "user_example")
|
||||
t.Log(err, info)
|
||||
}
|
||||
|
||||
func TestConvertToMysqlTable(t *testing.T) {
|
||||
fields := []*PGField{
|
||||
{Name: "id", Type: "smallint"},
|
||||
|
Reference in New Issue
Block a user