def METHOD_NAME(self, length=0, count_header=1, body=''):
    if length == 0:
        return
    # self.salt=self.session.salt
    self._length = length
    self._seq = count_header
    self._body = body
    self.type = Datum('int<1>')
    buffer = body
    buffer = self.type.setFromBuff(buffer)
    if self.type.value in (COMMANDS.COM_QUERY, COMMANDS.COM_STMT_PREPARE):
        self.sql = Datum('str<EOF>')
        buffer = self.sql.setFromBuff(buffer)
    elif self.type.value == COMMANDS.COM_STMT_EXECUTE:
        # https://mariadb.com/kb/en/com_stmt_execute/
        self.stmt_id = Datum('int<4>')
        buffer = self.stmt_id.setFromBuff(buffer)
        self.flags = Datum('int<1>')
        buffer = self.flags.setFromBuff(buffer)
        self.iteration_count = Datum('int<4>')
        buffer = self.iteration_count.setFromBuff(buffer)
        self.parameters = []
        prepared_stmt = self.session.prepared_stmts[self.stmt_id.value]
        num_params = len(prepared_stmt['statement'].params)
        self.read_params(buffer, num_params)
        #
        # if prepared_stmt['type'] == 'select':
        #     num_params = len(prepared_stmt['statement'].parameters)
        #
        #     self.read_params(buffer, num_params)
        #
        # elif prepared_stmt['type'] in ['insert', 'delete']:
        #     # if prepared_stmt['type'] == 'insert':
        #     #     prepared_stmt['statement'].sql
        #     #     statement = parse_sql(prepared_stmt['statement'].sql)
        #     #     num_params = 0
        #     #     for row in statement.values:
        #     #         for item in row:
        #     #             if isinstance(item, Parameter):
        #     #                 num_params = num_params + 1
        #     # elif prepared_stmt['type'] == 'delete':
        #     #     num_params = prepared_stmt['statement'].sql.count('?')
        #
        #     num_params = len(prepared_stmt['statement'].parameters)
        #     self.read_params(buffer, num_params)
    elif self.type.value == COMMANDS.COM_STMT_CLOSE:
        self.stmt_id = Datum('int<4>')
        buffer = self.stmt_id.setFromBuff(buffer)
    elif self.type.value == COMMANDS.COM_STMT_FETCH:
        self.stmt_id = Datum('int<4>')
        buffer = self.stmt_id.setFromBuff(buffer)
        self.limit = Datum('int<4>')
        buffer = self.limit.setFromBuff(buffer)
    elif self.type.value == COMMANDS.COM_INIT_DB:
        self.database = Datum('str<EOF>')
        buffer = self.database.setFromBuff(buffer)
    else:
        self.data = Datum('str<EOF>')
        buffer = self.data.setFromBuff(buffer)