(t *testing.T)
| 128 | } |
| 129 | |
| 130 | func TestParseSQLInternal_SingleStatement(t *testing.T) { |
| 131 | data, err := parseSQLInternal("SELECT id FROM users") |
| 132 | if err != nil { |
| 133 | t.Fatalf("unexpected error: %v", err) |
| 134 | } |
| 135 | if data["statement_count"] != 1 { |
| 136 | t.Errorf("expected 1 statement, got %v", data["statement_count"]) |
| 137 | } |
| 138 | types, ok := data["statement_types"].([]string) |
| 139 | if !ok { |
| 140 | t.Fatal("expected statement_types to be []string") |
| 141 | } |
| 142 | if len(types) != 1 { |
| 143 | t.Errorf("expected 1 type, got %d", len(types)) |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | func TestParseSQLInternal_MultipleStatements(t *testing.T) { |
| 148 | data, err := parseSQLInternal("SELECT 1; INSERT INTO t VALUES (1); DELETE FROM t") |
nothing calls this directly
no test coverage detected