support database sqlite

This commit is contained in:
zhuyasen
2024-02-13 12:58:45 +08:00
parent a56a20263a
commit 1d398d0659
46 changed files with 589 additions and 258 deletions

View File

@@ -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"},