fix: send SQL inputs as name/sql in the operator envelope

This commit is contained in:
2026-08-11 19:34:29 +02:00
parent 742c311660
commit 920642673e
@@ -122,7 +122,7 @@ func (r SuggestFksRequest) stdinEnvelope() (requestEnvelope, error) {
if totalBytes > 16<<20 { if totalBytes > 16<<20 {
return requestEnvelope{}, errors.New("SQL input total exceeds 16 MiB") return requestEnvelope{}, errors.New("SQL input total exceeds 16 MiB")
} }
envelope.SQLFiles = append(envelope.SQLFiles, inputFile{Path: path, Contents: contents}) envelope.SQLFiles = append(envelope.SQLFiles, inputFile{Name: filepath.Base(path), SQL: contents})
} }
return envelope, nil return envelope, nil
} }
@@ -164,8 +164,8 @@ type requestEnvelope struct {
} }
type inputFile struct { type inputFile struct {
Path string `json:"path"` Name string `json:"name"`
Contents string `json:"contents"` SQL string `json:"sql"`
} }
type Result struct { type Result struct {