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

Function convertStoreTessellationConfig

backend/api/v1/database_converter.go:795–812  ·  view source on GitHub ↗
(tessellation *storepb.TessellationConfig)

Source from the content-addressed store, hash-verified

793}
794
795func convertStoreTessellationConfig(tessellation *storepb.TessellationConfig) *v1pb.TessellationConfig {
796 if tessellation == nil {
797 return nil
798 }
799 gridLevels := make([]*v1pb.GridLevel, len(tessellation.GridLevels))
800 for i, level := range tessellation.GridLevels {
801 gridLevels[i] = &v1pb.GridLevel{
802 Level: level.Level,
803 Density: level.Density,
804 }
805 }
806 return &v1pb.TessellationConfig{
807 Scheme: tessellation.Scheme,
808 GridLevels: gridLevels,
809 CellsPerObject: tessellation.CellsPerObject,
810 BoundingBox: convertStoreBoundingBox(tessellation.BoundingBox),
811 }
812}
813
814func convertV1TessellationConfig(tessellation *v1pb.TessellationConfig) *storepb.TessellationConfig {
815 if tessellation == nil {

Callers 1

Calls 1

convertStoreBoundingBoxFunction · 0.85

Tested by

no test coverage detected