MCPcopy Create free account
hub / github.com/bytebase/bytebase / convertExportFormat

Function convertExportFormat

backend/api/v1/common.go:386–399  ·  view source on GitHub ↗
(format storepb.ExportFormat)

Source from the content-addressed store, hash-verified

384}
385
386func convertExportFormat(format storepb.ExportFormat) v1pb.ExportFormat {
387 switch format {
388 case storepb.ExportFormat_CSV:
389 return v1pb.ExportFormat_CSV
390 case storepb.ExportFormat_JSON:
391 return v1pb.ExportFormat_JSON
392 case storepb.ExportFormat_SQL:
393 return v1pb.ExportFormat_SQL
394 case storepb.ExportFormat_XLSX:
395 return v1pb.ExportFormat_XLSX
396 default:
397 }
398 return v1pb.ExportFormat_FORMAT_UNSPECIFIED
399}
400
401func convertToExportFormat(format v1pb.ExportFormat) storepb.ExportFormat {
402 switch format {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected