【问题标题】:OrientDB Network Binary Protocol - What is returned when creating a CLASS?OrientDB 网络二进制协议 - 创建 CLASS 时返回什么?
【发布时间】:2016-08-09 21:15:01
【问题描述】:

创建类时输出的最后两个字节(一部分是包装记录,一部分不是)是什么意思?

我发出了命令“CREATE CLASS Foo EXTENDS V”。这是输出(带有我对协议的理解的注释):

Writing byte (1 byte): 0 [OChannelBinaryServer] # success
Writing int (4 bytes): 43 [OChannelBinaryServer] # session id 43
Writing byte (1 byte): 119 [OChannelBinaryServer] # w - this is a wrapped record
Writing short (2 bytes): 0 [OChannelBinaryServer] # this is a full record
Writing byte (1 byte): 100 [OChannelBinaryServer] # d - record is a document
Writing short (2 bytes): -1 [OChannelBinaryServer] # cluster id null
Writing long (8 bytes): -1 [OChannelBinaryServer] # cluster position null
Writing int (4 bytes): 0 [OChannelBinaryServer] # version 0
Writing bytes (4+16=20 bytes): [0, 0, 12, 114, 101, 115, 117, 108, 116, 0, 0, 0,
  15, 1, 0, 84] [OChannelBinaryServer] # the record, what is 84?
Writing byte (1 byte): 0 [OChannelBinaryServer] # what is this?

记录本身解码为名为“结果”的字段。 result 的值是一个整数,编码为 varint 84,解码为 42。然后有一个尾随字节 0。

结果值 42 是什么意思? 后面的 0 是什么意思?

请注意,我使用的是协议版本 36。

谢谢!

【问题讨论】:

    标签: orientdb orientdb2.2


    【解决方案1】:

    CREATE CLASS 返回的数字是数据库中的类数。至于最后的0,我不知道。

    斯科特

    【讨论】:

      猜你喜欢
      • 2022-11-26
      • 2020-02-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多