Пример #1
0
    def loadFromPacket(packet):
        obj = Column()
        proto = Proto(packet, 3)

        obj.sequenceId = proto.get_fixed_int(1)
        obj.catalog = proto.get_lenenc_str()
        obj.schema = proto.get_lenenc_str()
        obj.table = proto.get_lenenc_str()
        obj.org_table = proto.get_lenenc_str()
        obj.name = proto.get_lenenc_str()
        obj.org_name = proto.get_lenenc_str()
        proto.get_filler(1)
        obj.characterSet = proto.get_fixed_int(2)
        obj.columnLength = proto.get_fixed_int(4)
        obj.type = proto.get_fixed_int(1)
        obj.flags = proto.get_fixed_int(2)
        obj.decimals = proto.get_fixed_int(1)
        proto.get_filler(2)

        return obj