MCPcopy Index your code
hub / github.com/dropbox/godropbox / EncodeAscii

Method EncodeAscii

database/sqltypes/sqltypes.go:106–114  ·  view source on GitHub ↗

EncodeAscii encodes the value using 7-bit clean ascii bytes.

(b encoding2.BinaryWriter)

Source from the content-addressed store, hash-verified

104
105// EncodeAscii encodes the value using 7-bit clean ascii bytes.
106func (v Value) EncodeAscii(b encoding2.BinaryWriter) {
107 if v.Inner == nil {
108 if _, err := b.Write(nullstr); err != nil {
109 panic(err)
110 }
111 } else {
112 v.Inner.encodeAscii(b)
113 }
114}
115
116// MarshalBinary helps implement BinaryMarshaler interface for Value.
117func (v Value) MarshalBinary() ([]byte, error) {

Callers 3

TestNullMethod · 0.95
TestNumericFunction · 0.95
TestStringFunction · 0.80

Calls 2

encodeAsciiMethod · 0.65
WriteMethod · 0.45

Tested by 3

TestNullMethod · 0.76
TestNumericFunction · 0.76
TestStringFunction · 0.64