This commit is contained in:
qsc
2026-07-12 19:18:26 +08:00
parent dd588b5daa
commit 34ec65c8b5
52 changed files with 10859 additions and 0 deletions
@@ -0,0 +1,18 @@
package tdengine
import (
"github.com/google/uuid"
"testing"
)
func TestTableName(t *testing.T) {
id := uuid.MustParse("a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d")
if got := TableName(id); got != "p_a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d" {
t.Fatalf("unexpected table: %s", got)
}
}
func TestSQLStringEscapesQuote(t *testing.T) {
if got := sqlString("a'b"); got != "'a''b'" {
t.Fatalf("unexpected literal: %s", got)
}
}