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

Function NewShortFieldDescriptor

database/binlog/numeric_fields.go:41–47  ·  view source on GitHub ↗

This returns a field descriptor for FieldType_SHORT (i.e., Field_shart)

(nullable NullableColumn)

Source from the content-addressed store, hash-verified

39
40// This returns a field descriptor for FieldType_SHORT (i.e., Field_shart)
41func NewShortFieldDescriptor(nullable NullableColumn) FieldDescriptor {
42 return newFixedLengthFieldDescriptor(
43 mysql_proto.FieldType_SHORT,
44 nullable,
45 2,
46 func(b []byte) interface{} { return uint64(LittleEndian.Uint16(b)) })
47}
48
49// This returns a field descriptor for FieldType_INT24 (i.e., Field_medium)
50func NewInt24FieldDescriptor(nullable NullableColumn) FieldDescriptor {

Callers 5

TestShortBasicMethod · 0.85
TestShortParseValueMethod · 0.85
parseColumnsMethod · 0.85
newTestTableContextFunction · 0.85

Calls 1

Tested by 4

TestShortBasicMethod · 0.68
TestShortParseValueMethod · 0.68
newTestTableContextFunction · 0.68