-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ParsingFailureExceptions thrown when creating brewery_id index in Couchbase.Linq.IntegrationTests #348
Comments
I was waiting to fix this on the resolution to this issue since the consensus was that the SDK should be doing the backtick wrapping. I didn't want to come back and undo the change later. |
I guess I dropped the ball on this one - looks like this one should have been in the queue and released long ago. I'll assign the ticket to 3.2.1 and get it resolved. -Jeff |
brantburnett
added a commit
that referenced
this issue
Aug 3, 2021
Motivation ---------- The current approach to string escaping causes problems if a backslash is included, and also can't handle special characters like tab or CR. Modifications ------------- Serialize string and character constants to the N1QL query using a JSON serializer. Also change some other locations rendering strings to use double quotes for consistency. Results ------- String and character constant expressions now support the full set of characters supported by JSON. Strings now appear on the query wrapped in double quotes instead of single quotes. Fixes #348
brantburnett
added a commit
that referenced
this issue
Aug 3, 2021
Motivation ---------- The current approach to string escaping causes problems if a backslash is included, and also can't handle special characters like tab or CR. Modifications ------------- Serialize string and character constants to the N1QL query using a JSON serializer. Also change some other locations rendering strings to use double quotes for consistency. Results ------- String and character constant expressions now support the full set of characters supported by JSON. Strings now appear on the query wrapped in double quotes instead of single quotes. Fixes #348
jeffrymorris
pushed a commit
that referenced
this issue
Aug 9, 2021
Motivation ---------- The current approach to string escaping causes problems if a backslash is included, and also can't handle special characters like tab or CR. Modifications ------------- Serialize string and character constants to the N1QL query using a JSON serializer. Also change some other locations rendering strings to use double quotes for consistency. Results ------- String and character constant expressions now support the full set of characters supported by JSON. Strings now appear on the query wrapped in double quotes instead of single quotes. Fixes #348
Linked to wrong issue, reopening |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While upgrading the CouchbaseNetClient dependency to 3.2.0, a number of integration tests (JoinTests_InnerJoin_IndexJoin, JoinTests_LeftJoin_IndexJoin, etc) are failing with ParsingFailureExceptions. For example the request:
Fails with the following response:
The issue appears to be that the bucket name is not being escaped with back ticks: "beer-sample" should be
"`beer-sample`"
. This can be confirmed by running the query in the request in the query console in CB.Note this happens for 3.0.7 and for 3.2.0 versions and I suspect all 3.X versions.
@brantburnett shouldn't this escaping be happening by the
N1QlHelpers.EscapeIdentifier
: https://github.com/couchbaselabs/Linq2Couchbase/blob/master/Src/Couchbase.Linq/QueryGeneration/N1QLQueryModelVisitor.cs#L137Note that you may have to drop brewer_id index first: DROP INDEX brewery_id on `beer-sample
Jeff
The text was updated successfully, but these errors were encountered: