'Updates values for Single type Document in `tabSingles`.'

def update_single(self, d):

    frappe.db.sql(u'delete    from    tabSingles    where    doctype=%s', self.doctype)
    for (field, value) in iteritems(d):
        if (field != u'doctype'):
            frappe.db.sql(u'insert    into    tabSingles(doctype,    field,    value)\n DCTB  DCTB  DCTB  DCTB  DCTB values    (%s,    %s,    %s)', (self.doctype, field, value))
    if (self.doctype in frappe.db.value_cache):
        del frappe.db.value_cache[self.doctype]
