feat: i18n

This commit is contained in:
meilin.huang
2024-11-20 22:43:53 +08:00
parent 74ae031853
commit 99a746085b
308 changed files with 8177 additions and 3880 deletions

View File

@@ -0,0 +1,28 @@
package base
import (
"fmt"
"testing"
)
func TestParserSql(t *testing.T) {
sql := `-- selectByCond
Select * from tdb where id > 10;
-- another comment
Select * from another_table where name = 'test'
and age = ?;
-- multi-line comment
-- continues here
Select * from yet_another_table
Where id = ?;`
statements, err := parseSQL(sql)
if err != nil {
fmt.Println("Error:", err)
return
}
for _, stmt := range statements {
fmt.Printf("Comment: %s\nSQL: %s\n\n", stmt.Comment, stmt.SQL)
}
}