예제 #1
0
 def set_execute_response_with_rows(self, is_last=True):
     self.set_execute_response(
         -1,
         [SqlColumnMetadata("name", SqlColumnType.VARCHAR, True, True)],
         _SqlPage([SqlColumnType.VARCHAR], [EXPECTED_ROWS], is_last),
         None,
     )
예제 #2
0
 def decode(msg):
     msg.next_frame()
     initial_frame = msg.next_frame()
     type = FixSizedTypesCodec.decode_int(initial_frame.buf,
                                          _TYPE_DECODE_OFFSET)
     is_nullable_exists = False
     nullable = False
     if len(initial_frame.buf
            ) >= _NULLABLE_DECODE_OFFSET + BOOLEAN_SIZE_IN_BYTES:
         nullable = FixSizedTypesCodec.decode_boolean(
             initial_frame.buf, _NULLABLE_DECODE_OFFSET)
         is_nullable_exists = True
     name = StringCodec.decode(msg)
     CodecUtil.fast_forward_to_end_frame(msg)
     return SqlColumnMetadata(name, type, is_nullable_exists, nullable)
예제 #3
0
 def _create_row_metadata():
     return SqlRowMetadata([
         SqlColumnMetadata("0", SqlColumnType.VARCHAR, True, True),
         SqlColumnMetadata("1", SqlColumnType.TINYINT, True, True),
         SqlColumnMetadata("2", SqlColumnType.OBJECT, True, True),
     ])