Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

WIP: Query Tables #163

Closed
wants to merge 5 commits into from

Conversation

tomasaschan
Copy link

@tomasaschan tomasaschan commented Mar 8, 2018

This is an attempt at impementing GET http://localhost:10002/defaultstorage1/Tables, which would close #162 and #133.

It doesn't really do anything yet (the response body is an empty object), but I'm thinking this is something you can give feedback on and help me improve :)

To start with; is it my querying of tables that is wrong, or how I wrap and/or serialize the result?

TODO here:

  • Fix the response so it returns a correctly formatted correct list of tables
  • Write some more extensive tests (currently just tests that the response code is 200)
  • Include whatever metadata is requested (? or is this handled by some generic OData framework?)
  • Handle query parameters (? or is this handled by some generic OData framework?)

@arafato
Copy link
Owner

arafato commented Mar 9, 2018

Hi @tlycken ! Thanks so much for your effort here! I'm currently working on this myself on my local branch as well. The skeleton is almost identical. The hardest part of this feature is actually to implement and support the query syntax correctly as specified at https://docs.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities.
Note that QueryTables also needs to support calls like https://myaccount.table.core.windows.net/Tables?$filter=TableName%20ge%20'prefix' and TableName%20le%20'prefix'. Also the $top operator needs to be supported. Last but least, for QueryEntities the filter expressions can be way more complex.

If this is something you want to do and are willing to commit to finish until end of next week, go for it! If that's not possible I will merge the last two commits from this PR since they contain two bugfixes I wasn't aware of :-) Also, the clean task will be merged, this is really great! Thanks!

@tomasaschan
Copy link
Author

@arafato I'm not sure how long it would take me to build a complete implementation, so I can't commit to doing it this week. Feel free to pick whatever parts you need from this PR (one key reason I made sure to separate the skeleton code from the other small improvements was to make sure you could pick whatever you wanted from it) :)

arafato added a commit that referenced this pull request Mar 13, 2018
@arafato arafato closed this Mar 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot query table storage against Docker image - what am I doing wrong?
2 participants