MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / encode

Method encode

IceFireDB-SQLite/pkg/mysql/mysql/mysql_gtid.go:231–241  ·  view source on GitHub ↗
(w io.Writer)

Source from the content-addressed store, hash-verified

229}
230
231func (s *UUIDSet) encode(w io.Writer) {
232 _, _ = w.Write(s.SID.Bytes())
233 n := int64(len(s.Intervals))
234
235 _ = binary.Write(w, binary.LittleEndian, n)
236
237 for _, i := range s.Intervals {
238 _ = binary.Write(w, binary.LittleEndian, i.Start)
239 _ = binary.Write(w, binary.LittleEndian, i.Stop)
240 }
241}
242
243func (s *UUIDSet) Encode() []byte {
244 var buf bytes.Buffer

Callers 2

EncodeMethod · 0.95
EncodeMethod · 0.45

Calls 1

BytesMethod · 0.45

Tested by

no test coverage detected