def update(self, data, pk_fields=None):
    if (not pk_fields):
        pk_fields = self._get_pk()
        if (not pk_fields):
            raise Exception('Need Keys to perform UPDATE!')
        t_fields = [x.lower() for x in data[0]._fields]
        for f in pk_fields:
            if (not (f.lower() in t_fields)):
                raise Exception("Value of  PK field '{}' must be provided to perform UPDATE!".format(f))
    self.conn.update(self.table_obj, data, pk_fields, echo=False)
def update(self, data, pk_fields=None):
    if (not pk_fields):
        pk_fields = self._get_pk()
        if (not pk_fields):
            raise Exception('Need Keys to perform UPDATE!')
        t_fields = [x.lower() for x in data[0]._fields]
        for f in pk_fields:
            if (not (f.lower() in t_fields)):
                raise Exception("Value of  PK field '{}' must be provided to perform UPDATE!".format(f))
    self.conn.update(self.table_obj, data, pk_fields, echo=False)