def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def __str__(self):
        return "(%s,%s)/%d" % (self.saddr, self.gaddr, self.glen)