Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: result can be nil (#10377)

p0ny70762c971316
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.go
index e48642054d..aadf429c2e 100644
--- a/backend/api/v1/sql_service.go
+++ b/backend/api/v1/sql_service.go
@@ -1107,8 +1107,8 @@ func (s *SQLService) doQuery(ctx context.Context, request *v1pb.QueryRequest, in
// sanitizeResults sanitizes the strings in the results by replacing all the invalid UTF-8 characters with its hexadecimal representation.
func sanitizeResults(results []*v1pb.QueryResult) {
for _, result := range results {
- for _, row := range result.Rows {
- for _, value := range row.Values {
+ for _, row := range result.GetRows() {
+ for _, value := range row.GetValues() {
if value, ok := value.Kind.(*v1pb.RowValue_StringValue); ok {
value.StringValue = common.SanitizeUTF8String(value.StringValue)
}