Esempio n. 1
0
 def read(self,
          client: TableClient,
          filter_query=None,
          parameters=None) -> Iterable:
     if filter_query is None:
         return client.list_entities()
     else:
         return client.query_entities(
             filter=filter_query,
             results_per_page=constants.results_per_page)
Esempio n. 2
0
    def sample_query_entities(self):

        from azure.data.tables import TableClient
        from azure.core.exceptions import HttpResponseError

        table_client = TableClient(account_url=self.account_url, credential=self.access_key, table_name=self.table_name)
        try:
            queried_entities = table_client.query_entities(filter=self.name_filter, select="brand,color")

            # queried_entities type is ItemPaged
            for entity_chosen in queried_entities:
                # create a list of the entities and iterate through them to print each one out
                # calls to the service to get more entities are made without user knowledge
                print(entity_chosen)
        except HttpResponseError as e:
            print(e.message)
Esempio n. 3
0
 def query_entities(client: TableClient) -> ItemPaged:
     queried_entities = client.query_entities(filter='')
     return queried_entities