You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.
When attempting to use the Raw SQL for the following query: select * from c order by c.id asc it does not match on the c identifier because there is a double space between the identifier and the operation (order). It seems that Github truncates the double space, but if you edit this post you can see there is a double space.
Now this is a bit of an edge case, but I found this as I was dynamically generating my order clauses and it happened to have an extra space. Ideally spacing between keywords shouldn't matter in the library since it doesn't matter to the underlying data provider.
I'm not sure about the underlying sdk, but querying via Azure Portal seems to allow this.
This is not really a big issue, since I've now fixed my issue to not provide any extra spaces (for the better). But I was not expecting this behavior 😄
EDIT: Also Azure Storage Explorer also allows this
I would check how the underlying sdk reacts. It would be too tricky to write the regex for that if it’s not supported. I might pull the sql validation out of the CosmosDB sdk. I don’t consider this high priority.
When attempting to use the Raw SQL for the following query:
select * from c order by c.id asc
it does not match on thec
identifier because there is a double space between the identifier and the operation (order
). It seems that Github truncates the double space, but if you edit this post you can see there is a double space.Now this is a bit of an edge case, but I found this as I was dynamically generating my order clauses and it happened to have an extra space. Ideally spacing between keywords shouldn't matter in the library since it doesn't matter to the underlying data provider.
There are the regular expressions I am referring to:
https://github.com/Elfocrash/Cosmonaut/blob/develop/src/Cosmonaut/Extensions/CosmosSqlQueryExtensions.cs#L14
The text was updated successfully, but these errors were encountered: