MCPcopy
hub / github.com/pingcap/tidb / encodeString

Function encodeString

pkg/util/codec/codec.go:215–220  ·  view source on GitHub ↗
(b []byte, val types.Datum, comparable1 bool)

Source from the content-addressed store, hash-verified

213}
214
215func encodeString(b []byte, val types.Datum, comparable1 bool) []byte {
216 if collate.NewCollationEnabled() && comparable1 {
217 return encodeBytes(b, collate.GetCollator(val.Collation()).Key(val.GetString()), true)
218 }
219 return encodeBytes(b, val.GetBytes(), comparable1)
220}
221
222func encodeBytes(b []byte, v []byte, comparable1 bool) []byte {
223 if comparable1 {

Callers 2

encodeFunction · 0.85
HashCodeFunction · 0.85

Calls 7

NewCollationEnabledFunction · 0.92
GetCollatorFunction · 0.92
CollationMethod · 0.80
encodeBytesFunction · 0.70
KeyMethod · 0.65
GetStringMethod · 0.65
GetBytesMethod · 0.45

Tested by

no test coverage detected