def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def anypats(self):
        """None of .always(), .isexact(), and .prefix() is true --
        optimizations will be difficult."""
        return not self.always() and not self.isexact() and not self.prefix()