MCPcopy Create free account
hub / github.com/araddon/qlbridge / projectionToPb

Function projectionToPb

rel/sql.go:546–562  ·  view source on GitHub ↗
(m *Projection)

Source from the content-addressed store, hash-verified

544 return &s
545}
546func projectionToPb(m *Projection) *ProjectionPb {
547 s := &ProjectionPb{}
548 s.Distinct = m.Distinct
549 if len(m.colNames) > 0 {
550 s.ColNames = make([]string, 0, len(m.colNames))
551 for name := range m.colNames {
552 s.ColNames = append(s.ColNames, name)
553 }
554 }
555 if len(m.Columns) > 0 {
556 s.Columns = make([]*ResultColumnPb, len(m.Columns))
557 for i, c := range m.Columns {
558 s.Columns[i] = resultColumnToPb(c)
559 }
560 }
561 return s
562}
563
564func (m *Columns) WriteDialect(w expr.DialectWriter) {
565 colCt := len(*m)

Callers 2

ToPBMethod · 0.85
sqlSelectToPbDepthFunction · 0.85

Calls 1

resultColumnToPbFunction · 0.85

Tested by

no test coverage detected