(self)
return doc
Get the SON document representation of this DBRef.

        Generally not needed by application developers
Get the SON document representation of this DBRef.
Get the SON document representation of this DBRef .
def as_doc(self):
        """Get the SON document representation of this DBRef.

        Generally not needed by application developers
        """
        doc = SON([("$ref", self.collection),
                   ("$id", self.id)])
        if self.database is not None:
            doc["$db"] = self.database
        doc.update(self.__kwargs)
        return doc
def as_doc ( self ) : doc = SON ( [ ( "$ref" , self . collection ) , ( "$id" , self . id ) ] ) if self . database is not None : doc [ "$db" ] = self . database doc . update ( self . __kwargs ) return doc