MCPcopy
hub / github.com/dropbox/godropbox / EncodeSql

Method EncodeSql

database/sqltypes/sqltypes.go:95–103  ·  view source on GitHub ↗

EncodeSql encodes the value into an SQL statement. Can be binary.

(b encoding2.BinaryWriter)

Source from the content-addressed store, hash-verified

93
94// EncodeSql encodes the value into an SQL statement. Can be binary.
95func (v Value) EncodeSql(b encoding2.BinaryWriter) {
96 if v.Inner == nil {
97 if _, err := b.Write(nullstr); err != nil {
98 panic(err)
99 }
100 } else {
101 v.Inner.encodeSql(b)
102 }
103}
104
105// EncodeAscii encodes the value using 7-bit clean ascii bytes.
106func (v Value) EncodeAscii(b encoding2.BinaryWriter) {

Callers 6

TestNullMethod · 0.95
TestNumericFunction · 0.95
SerializeSqlMethod · 0.80
Uint64EncodeSqlFunction · 0.80
TestTimeFunction · 0.80
TestStringFunction · 0.80

Calls 2

encodeSqlMethod · 0.65
WriteMethod · 0.45

Tested by 4

TestNullMethod · 0.76
TestNumericFunction · 0.76
TestTimeFunction · 0.64
TestStringFunction · 0.64