You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: api_v2_sql.go
    path of file: ./repos/cockroach/pkg/server
    
    the code of the file until where you have to start completion: // Copyright 2022 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in acc
    
func (cd columnsDefinition) MarshalJSON() ([]byte, error) {
	var jbuf bytes.Buffer
	jbuf.WriteByte('[')
	for colIdx, c := range cd {
		if colIdx > 0 {
			jbuf.WriteByte(',')
		}
		jbuf.WriteString("{\"name\":")
		json.FromString(c.Name).Format(&jbuf)
		jbuf.WriteString(",\"type\":")
		json.FromString(c.Typ.SQLString()).Format(&jbuf)
		jbuf.WriteString(",\"oid\":")
		// NB: JSON integers have to be 53 bits or less. We don't
		// need to do anything here because Oid is 32-bit.
		fmt.Fprintf(&jbuf, "%d", c.Typ.Oid())
		jbuf.WriteByte('}')
	}
	jbuf.WriteByte(']')
	return jbuf.Bytes(), nil
}