Details
-
Task
-
Resolution: Duplicate
-
Major
-
None
-
None
-
None
-
1
Description
Seen implementing snippets for NCBC-2719
await userCluster.QueryIndexes.CreatePrimaryIndexAsync(
|
$"`{bucketName}`", |
new CreatePrimaryQueryIndexOptions().IgnoreIfExists(true)); |
Note I've had to escape bucketName myself.
If I simply pass bucketName then I'd get the following error:
Couchbase.Core.Exceptions.ParsingFailureException: syntax error - at - [3000] |
at Couchbase.Query.QueryResultExtensions.ThrowExceptionOnError[T](IQueryResult`1 result, QueryErrorContext context) |
at Couchbase.Query.QueryClient.ExecuteQuery[T](QueryOptions options, ITypeSerializer serializer, IRequestSpan span)
|
at Couchbase.Query.QueryClient.QueryAsync[T](String statement, QueryOptions options)
|
at Couchbase.Management.Query.QueryIndexManager.CreatePrimaryIndexAsync(String bucketName, CreatePrimaryQueryIndexOptions options)
|
at Submission#0.UserManagementExample.Example3() in /Users/hakimcassimally/couchbase/docs-sdk-dotnet/modules/howtos/examples/UserManagementExample.csx:line 91 |
at Submission#0.UserManagementExample.ExampleAsync() in /Users/hakimcassimally/couchbase/docs-sdk-dotnet/modules/howtos/examples/UserManagementExample.csx:line 33 |
at Submission#0.<<Initialize>>d__0.MoveNext() in /Users/hakimcassimally/couchbase/docs-sdk-dotnet/modules/howtos/examples/UserManagementExample.csx:line 16 |
--- End of stack trace from previous location ---
|
at Dotnet.Script.Core.ScriptRunner.Execute[TReturn](String dllPath, IEnumerable`1 commandLineArgs) in /private/var/folders/6j/4hkjjhd50fg27s933nctz0480000gn/T/tmp3iI6tV/Dotnet.Script.Core/ScriptRunner.cs:line 52 |
-----------------------Context Info---------------------------
|
{"Statement":"[{\"statement\":\"CREATE PRIMARY INDEX ON travel-sample USING GSI WITH {\\\"defer_build\\\":False};\",\"client_context_id\":\"d3169dbd-3774-404b-ae89-2caf172c3c3a\"}]","ClientContextId":"d3169dbd-3774-404b-ae89-2caf172c3c3a","Parameters":"{\"Named\":{},\"Raw\":{},\"Positional\":[]}","HttpStatus":400,"QueryStatus":6,"Errors":[{"msg":"syntax error - at -","Code":3000,"Name":null,"Severity":0,"Temp":false}],"Message":"syntax error - at - [3000]"} |
Attachments
Issue Links
- blocks
-
NCBC-2719 User Management quick snippets are missing in .NET
- Resolved
-
NCBC-2957 Update User Management quick snippets after bugfixes
- Closed
- duplicates
-
NCBC-3107 IQueryIndexManager doesn't accept bucket names already in backticks
- Resolved
- relates to
-
NCBC-2543 QueryIndexManager fails to create indexes in Linq2Couchbase integration tests
- Resolved