docs: def _update(self, attrname, value=None):
          """
              Updates a field in an existing tuple. This is not a datajoyous operation and should not be used
              routinely. Relational database maintain referential integrity on the level of a tuple. Therefore,
              the UPDATE operator can violate referential integrity. The datajoyous way to update information is
              to delete the entire tuple and insert the entire update tuple.
  
              Safety constraints:
                 1. self must be restricted to exactly one tuple
                 2. the update attribute must not be in primary key
  
              Example
  
              >>> (v2p.Mice() & key).update('mouse_dob',   '2011-01-01')
              >>> (v2p.Mice() & key).update( 'lens')   # set the value to NULL
  
          """
          if len(self) != 1:
              raise DataJointError('Update is only allowed on one tuple at a time')
          if attrname not in self.heading:
              raise DataJointError('Invalid attribute name')
          if attrname in self.heading.primary_key:
              raise DataJointError('Cannot update a key value.')
  
          attr = self.heading[attrname]
  
          if attr.is_blob:
              value = pack(value)
              placeholder = '%s'
          elif attr.numeric:
              if value is None or np.isnan(np.float(value)):  # nans are turned into NULLs
                  placeholder = 'NULL'
                  value = None
              else:
                  placeholder = '%s'
                  value = str(int(value) if isinstance(value, bool) else value)
          else:
              placeholder = '%s'
          command = "UPDATE {full_table_name} SET `{attrname}`={placeholder} {where_clause}".format(
              full_table_name=self.from_clause,
              attrname=attrname,
              placeholder=placeholder,
              where_clause=self.where_clause)
          self.connection.query(command, args=(value, ) if value is not None else ())