MCPcopy Index your code
hub / github.com/bytebase/bytebase / readRow

Function readRow

backend/plugin/db/spanner/spanner.go:552–563  ·  view source on GitHub ↗
(row *spanner.Row)

Source from the content-addressed store, hash-verified

550}
551
552func readRow(row *spanner.Row) (*v1pb.QueryRow, error) {
553 result := &v1pb.QueryRow{}
554 for i := 0; i < row.Size(); i++ {
555 var col spanner.GenericColumnValue
556 if err := row.Column(i, &col); err != nil {
557 return nil, err
558 }
559 result.Values = append(result.Values, convertSpannerValue(col.Type, col.Value))
560 }
561
562 return result, nil
563}
564
565// explainStatement returns the query plan for the given statement as JSON.
566func (d *Driver) explainStatement(ctx context.Context, statement string) ([]*v1pb.QueryResult, error) {

Callers 1

queryStatementMethod · 0.85

Calls 1

convertSpannerValueFunction · 0.85

Tested by

no test coverage detected