Ejemplo n.º 1
0
    def columns(self):
        """
        the available columns on this service
        """
        self._get_metadata()
        fields = getattr(self, '_metadata', None).get_first_table().fields

        try:
            return [TableParam.from_field(field) for field in fields]
        except AttributeError:
            return []
Ejemplo n.º 2
0
    def columns(self):
        """
        the available columns on this service
        """
        self._get_metadata()
        fields = getattr(self, '_metadata', None).get_first_table().fields

        try:
            return [
                TableParam.from_field(field) for field in fields]
        except AttributeError:
            return []
Ejemplo n.º 3
0
    def columns(self):
        """
        the available columns on this service
        """
        self._get_metadata()
        fields = filter(
            lambda field_or_param: isinstance(field_or_param, Field),
            self._metadata.iter_fields_and_params())

        try:
            return [TableParam.from_field(field) for field in fields]
        except AttributeError:
            return []
Ejemplo n.º 4
0
    def columns(self):
        """
        the available columns on this service
        """
        self._get_metadata()
        fields = filter(
            lambda field_or_param: isinstance(field_or_param, Field),
            self._metadata.iter_fields_and_params()
        )

        try:
            return [
                TableParam.from_field(field) for field in fields]
        except AttributeError:
            return []