Beispiel #1
0
func (bag *sbTreeRidBag) serializeDelegate(bw *rw.Writer) error {
	if bag.collectionPtr == nil {
		bw.WriteLong(-1)
		bw.WriteLong(-1)
		bw.WriteInt(-1)
	} else {
		bw.WriteLong(bag.collectionPtr.fileId)
		bw.WriteLong(bag.collectionPtr.pageIndex)
		bw.WriteInt(int32(bag.collectionPtr.pageOffset))
	}
	bw.WriteInt(-1) // TODO: cached size; need a real value for compatibility with <= 1.7.5
	bw.WriteInt(0)  // TODO: support changes in sbTreeRidBag
	return bw.Err()
}