Beispiel #1
0
//
// serializeDocument writes the classname and the serialized record
// (header and data sections) of the ODocument to the obuf.WriteBuf.
//
// Because this method writes the classname but NOT the serialization
// version, this method is safe for recursive calls for EMBEDDED types.
//
func (serde ORecordSerializerV0) serializeDocument(wbuf *obuf.WriteBuf, doc *oschema.ODocument) error {
	err := varint.WriteString(wbuf, doc.Classname)
	if err != nil {
		return oerror.NewTrace(err)
	}
	ogl.Debugf("serdebuf A: %v\n", wbuf.Bytes()) // DEBUG
	ogl.Debugf("doc A: %v\n", doc)               // DEBUG

	return serde.writeSerializedRecord(wbuf, doc)
}