Couchbase server 6.6 Community. Linq2Couchbase 1.4.2
A simple test includes
.Where(obj=>obj.Data == @"data\")
Couchbase log: I did my best to make data\ and data\\
look correct . Do not know how to post raw text.
SELECT RAW META(Extent1
).id
FROM BUCKET-test
as Extent1
WHERE (Extent1
.Data
=’data\'
) |Couchbase.Linq.QueryGeneration.QueryPartsAggregator|
Generated query: SELECT RAW META(Extent1
).id
FROM BUCKET-test
as Extent1
WHERE (Extent1
.Data
= ‘data\
’) |Couchbase.Linq.Execution.BucketQueryExecutor|
Gettting Query Uri cid3::0 |Couchbase.N1QL.QueryClient|
Applying creds cid3::0: http://192.168.0.6:8093/query |Couchbase.N1QL.QueryClient|
Removing brackets cid3::0: http://192.168.0.6:8093/query |Couchbase.N1QL.QueryClient|
http://192.168.0.6:8093/query[“statement”:“SELECT RAW META(Extent1
).id
FROM BUCKET-test
as Extent1
WHERE (Extent1
.Data
= ‘data\\
’)”,“timeout”:“75000ms”,“creds”:[REDUCTED] |Couchbase.N1QL.QueryClient|
Buildspan cid3::0: http://192.168.0.6:8093/query |Couchbase.N1QL.QueryClient|
Getting content cid3::4: http://192.168.0.6:8093/query |Couchbase.N1QL.QueryClient|
Sending query cid3::4: http://192.168.0.6:8093/query |Couchbase.N1QL.QueryClient|
Handling response cid3::4: http://192.168.0.6:8093/query |Couchbase.N1QL.QueryClient|
Mapping cid3::4: http://192.168.0.6:8093/query |Couchbase.N1QL.QueryClient|
In GetDatamapper cid3::4 |Couchbase.N1QL.QueryClient|
It is IQueryRequestWithDataMapper cid3::4 |Couchbase.N1QL.QueryClient|
The log stops here
The test outcome:
Message:
Test method Logic.Test.UnitTestDbManager.TestMethodEscape threw exception:
Couchbase.Linq.CouchbaseQueryException: syntax error: invalid quoted string - at 'data\'
Stack Trace:
BucketQueryExecutor.ParseResult[T](IQueryResult1 result) BucketQueryExecutor.ExecuteCollectionAsync[T](LinqQueryRequest queryRequest, CancellationToken cancellationToken) QueryExtensions.ExecuteAsync[T](IQueryable
1 source, CancellationToken cancellationToken)
QueryManager.GetKeysAdHoc[T](IEnumerable`1 searchCriteria) line 183
UnitTestDbManager.TestMethodEscape() line 473