code: def cql_encode_all_types(self, val, as_text_type=False):
          
          encoded = self.mapping.get(type(val), self.cql_encode_object)(val)
          if as_text_type and not isinstance(encoded, six.text_type):
              return encoded.decode('utf-8')
          return encoded
docs: Converts any type into a CQL string, defaulting to ``cql_encode_object``
          if :attr:`~Encoder.mapping` does not contain an entry for the type.