code: def update(self, table, kwargs, condition=None):
          
          sql = "update {} set {}"
          equations = []
          values = []
          for k, v in kwargs.iteritems():
              if k == '$inc' and isinstance(v, dict):
                  for ik, iv in v.iteritems():
                      equations.append("{field}={field}+{value}".format(field=ik, value=iv))
              else:
                  equations.append("{}=%s".format(k))
                  values.append(v)
  
          sql = sql.format(table, ', '.join(equations))
          sql += self.parse_condition(condition) + ";"
          super(PGWrapper, self).execute(sql, values, result=False)
docs: .. :py:method:: update
  
              All module update can user this function.
              condition only support string and dictionary.
  
          Usage::
  
              >>> update('dept', {'name': 'design', 'quantity': 3}, {'id': 'we4d'})
              update dept set name='design', quantity=3 where id='we4d';
  
              >>> update('dept', {'name': 'design', 'quantity': 3}, 'introduction is null')
              update dept set name='design', quantity=3 where introduction is null;
  
              >>> update('physician', {'$inc': {'status': -10}, 'present': 0}, {'id': 'someid'})
              update physician set status=status+-10, present=0 where id='someid';