diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..db4fd8e2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM mcr.microsoft.com/dotnet/sdk:6.0 + +LABEL org.opencontainers.image.authors="Hakim Cassimally " + +RUN apt-get update -y \ + && \ + apt-get install -y \ + curl vim git + +# edit these variables as required +ENV PRE_RELEASE_VERSION 3.2.8-pre +ENV PRE_RELEASE_BUILD r5705 +ENV PRE_RELEASE_SOURCE http://sdk.jenkins.couchbase.com/job/dotnet/job/sdk/job/couchbase-net-client-scripted-build-pipeline/lastSuccessfulBuild/artifact/couchbase-net-client-${PRE_RELEASE_VERSION}-${PRE_RELEASE_BUILD}.zip + +RUN mkdir -p /app/nuget-sources/ +WORKDIR /app/nuget-sources/ +RUN curl -O ${PRE_RELEASE_SOURCE} +RUN dotnet nuget add source /app/nuget-sources/ + +WORKDIR /app +RUN dotnet new console +RUN dotnet add package CouchbaseNetClient -v ${PRE_RELEASE_VERSION} + +RUN dotnet tool install -g dotnet-script +RUN export PATH="$PATH:/root/.dotnet/tools" + +# RUN git clone https://github.com/couchbase/docs-sdk-dotnet.git +# NB: instead we will mount working directory in docker-compose.yml + +ENTRYPOINT ["/bin/bash", "-l", "-c"] +CMD ["/bin/bash"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..532fb4fb --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,27 @@ +version: "3.9" + +# USAGE: docker-compose run cb-dotnet-sdk bash + +services: + cb-dotnet-sdk: + build: . + depends_on: + - db + container_name: cb-dotnet-sdk + entrypoint: [ "/bin/bash", "-l", "-c" ] + volumes: + - .:/app/docs-sdk-dotnet + + db: + image: build-docker.couchbase.com:443/couchbase/server-internal:7.1.0-2549 + ports: + - "8091-8095:8091-8095" + - "11210:11210" + expose: # expose ports 8091 & 8094 to other containers (mainly for backend) + - "8091" + - "8092" + - "8093" + - "8094" + - "8095" + - "11210" + container_name: couchbase-db diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index ac58f145..642a45cc 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -3,7 +3,7 @@ .Getting Started * xref:hello-world:start-using-sdk.adoc[Start Using the .NET SDK] -// ** xref:hello-world:platform-help.adoc[Platform Introduction] +** xref:hello-world:platform-help.adoc[Platform Introduction] * xref:hello-world:sample-application.adoc[Sample Application] .Working with Data diff --git a/modules/concept-docs/pages/analytics-for-sdk-users.adoc b/modules/concept-docs/pages/analytics-for-sdk-users.adoc index a5251c92..1d447372 100644 --- a/modules/concept-docs/pages/analytics-for-sdk-users.adoc +++ b/modules/concept-docs/pages/analytics-for-sdk-users.adoc @@ -23,5 +23,5 @@ For complex and long-running queries, involving large ad hoc join, set, aggregat == Additional Resources -* Start with our xref:{version-server}@server:analytics:primer-beer.adoc[introductory primer]. +* Start with our xref:7.0@server:analytics:primer-beer.adoc[introductory primer]. * Read the practical introduction xref:howtos:analytics-using-sdk.adoc[using analytics from the SDK]. diff --git a/modules/concept-docs/pages/collections.adoc b/modules/concept-docs/pages/collections.adoc index c029d5b0..c9d003f8 100644 --- a/modules/concept-docs/pages/collections.adoc +++ b/modules/concept-docs/pages/collections.adoc @@ -10,7 +10,7 @@ include::project-docs:partial$attributes.adoc[] The Collections feature in Couchbase Server is fully implemented in the 3.2 API version of the Couchbase SDK. -Information on _Collections_ can be found in the xref:{version-server}@server:learn:data:scopes-and-collections.adoc[server docs]. +Information on _Collections_ can be found in the xref:7.0@server:learn:data:scopes-and-collections.adoc[server docs]. == Using Collections & Scopes diff --git a/modules/concept-docs/pages/compression.adoc b/modules/concept-docs/pages/compression.adoc index 9badd52f..d98d79b3 100644 --- a/modules/concept-docs/pages/compression.adoc +++ b/modules/concept-docs/pages/compression.adoc @@ -12,7 +12,7 @@ However, stable Snappy support is not yet available in .NET. -Couchbase Server (in the Enterprise Edition) stores documents in compressed form, xref:{version-server}@server:learn:buckets-memory-and-storage/compression.adoc#compression-modes[when it is enabled in the server for a particular bucket], using Snappy Compression. +Couchbase Server (in the Enterprise Edition) stores documents in compressed form, xref:7.0@server:learn:buckets-memory-and-storage/compression.adoc#compression-modes[when it is enabled in the server for a particular bucket], using Snappy Compression. As the Snappy compression library is not available for .NET, the server will automatically uncompress any compressed documents before sending them to the .NET client. If compression is set to _active_ on the server, documents will be stored there in compressed form, even though the .NET client has sent them uncompressed, thus saving storage space (but not network bandwidth). diff --git a/modules/concept-docs/pages/documents.adoc b/modules/concept-docs/pages/documents.adoc index ef51fd74..38de729b 100644 --- a/modules/concept-docs/pages/documents.adoc +++ b/modules/concept-docs/pages/documents.adoc @@ -42,7 +42,7 @@ await collection.MutateInAsync("customer123", new List }); ---- -or xref:{version-server}@server:n1ql:n1ql-language-reference/update.adoc[N1QL UPDATE] to update documents based on specific query criteria: +or xref:7.0@server:n1ql:n1ql-language-reference/update.adoc[N1QL UPDATE] to update documents based on specific query criteria: [source,sql] ---- @@ -126,5 +126,5 @@ include::{version-server}@sdk:shared:partial$documents.adoc[tag=expiration] IMPORTANT: If you are using the overloads that take `IDocument`, note that the `IDocument.Expiry` property assumes ms (milli-seconds), and is converted to seconds before being sent to the server. All other overloads take a `TimeSpan` or an `uint`, and assume an expiry in seconds A time of zero will set the document to never expire -(a negative number will set expiry to immediate -- creating a xref:{version-server}@server:learn:buckets-memory-and-storage/storage.adoc#tombstones[tombstone]). +(a negative number will set expiry to immediate -- creating a xref:7.0@server:learn:buckets-memory-and-storage/storage.adoc#tombstones[tombstone]). Values above 0ms but below 1000ms are rounded up to one second before being sent to the server -- _if you are using .NET SDK 3.0.4 or later_. diff --git a/modules/concept-docs/pages/n1ql-query.adoc b/modules/concept-docs/pages/n1ql-query.adoc index 438db185..79afe4e7 100644 --- a/modules/concept-docs/pages/n1ql-query.adoc +++ b/modules/concept-docs/pages/n1ql-query.adoc @@ -29,15 +29,15 @@ var result = await cluster.QueryAsync( ); ---- -CAUTION: *When running an application using Prepared Statements through the .NET SDK* -- if you plan to upgrade Couchbase Server from 6.0.x or earlier to 6.5.0 or later, and are running a version of the .NET SDK prior to xref:project-docs:sdk-release-notes.adoc#version-3-0-1-13-may-2020[3.0.1], you will need to xref:{version-server}@server:install:upgrade-strategy-for-features.adoc#prepared-statements[restart the app or otherwise work around] a change in the Server's behaviour. +CAUTION: *When running an application using Prepared Statements through the .NET SDK* -- if you plan to upgrade Couchbase Server from 6.0.x or earlier to 6.5.0 or later, and are running a version of the .NET SDK prior to xref:project-docs:sdk-release-notes.adoc#version-3-0-1-13-may-2020[3.0.1], you will need to xref:7.0@server:install:upgrade-strategy-for-features.adoc#prepared-statements[restart the app or otherwise work around] a change in the Server's behaviour. == Indexes -The Couchbase query service makes use of xref:{version-server}@server:learn:services-and-indexes/indexes/indexes.adoc[_indexes_] in order to do its work. +The Couchbase query service makes use of xref:7.0@server:learn:services-and-indexes/indexes/indexes.adoc[_indexes_] in order to do its work. Indexes replicate subsets of documents from data nodes over to index nodes, allowing specific data (for example, specific document properties) to be retrieved quickly, -and to distribute load away from data nodes in xref:{version-server}@server:learn:services-and-indexes/services/services.adoc[MDS] topologies. +and to distribute load away from data nodes in xref:7.0@server:learn:services-and-indexes/services/services.adoc[MDS] topologies. [IMPORTANT] In order to make a bucket queryable, it must have at least one index defined. @@ -82,7 +82,7 @@ Indexes help improve the performance of a query. When an index includes the actual values of all the fields specified in the query, the index _covers_ the query, and eliminates the need to fetch the actual values from the Data Service. An index, in this case, is called a _covering index_, and the query is called a _covered_ query. -For more information, see xref:{version-server}@server:n1ql:n1ql-language-reference/covering-indexes.adoc[Covering Indexes]. +For more information, see xref:7.0@server:n1ql:n1ql-language-reference/covering-indexes.adoc[Covering Indexes]. You can also create and define indexes in the SDK using: @@ -131,7 +131,7 @@ include::{version-server}@sdk:shared:partial$n1ql-queries.adoc[tag=index-consist The following options are available: -include::{version-server}@server:learn:page$services-and-indexes/indexes/index-replication.adoc[tag=scan_consistency] +include::7.0@server:learn:page$services-and-indexes/indexes/index-replication.adoc[tag=scan_consistency] //// * `not_bounded`: Executes the query immediately, without requiring any consistency for the query. If index-maintenance is running behind, out-of-date results may be returned. diff --git a/modules/devguide/examples/dotnet/Cloud.cs b/modules/devguide/examples/dotnet/Cloud.cs deleted file mode 100644 index fdf29971..00000000 --- a/modules/devguide/examples/dotnet/Cloud.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Threading.Tasks; -using Couchbase; -using Couchbase.Query; -using Couchbase.Management.Query; -// using Microsoft.Extensions.DependencyInjection; -// using Microsoft.Extensions.Logging; -// using Serilog; -// using Serilog.Extensions.Logging; - -namespace net3 -{ - class Program - { - static async Task Main(string[] args) - { - // Update this to your cluster - var endpoint = "cb.13d1a4bc-31a8-49c6-9ade-74073df0799f.dp.cloud.couchbase.com"; - var bucketName = "couchbasecloudbucket"; - var username = "user"; - var password = "password"; - // User Input ends here. - - // IServiceCollection serviceCollection = new ServiceCollection(); - // serviceCollection.AddLogging(builder => builder.AddFilter(level => level >= LogLevel.Trace)); - - // var loggerFactory = serviceCollection.BuildServiceProvider().GetService(); - // loggerFactory.AddFile("Logs/myapp-{Date}.txt", LogLevel.Debug); - - // Initialize the Connection - var opts = new ClusterOptions().WithCredentials(username, password); - // opts = opts.WithLogging(loggerFactory); - opts.IgnoreRemoteCertificateNameMismatch = true; - - var cluster = await Cluster.ConnectAsync("couchbases://"+endpoint, opts); - var bucket = await cluster.BucketAsync(bucketName); - var collection = bucket.DefaultCollection(); - - // Store a Document - var upsertResult = await collection.UpsertAsync("king_arthur", new { - Name = "Arthur", - Email = "kingarthur@couchbase.com", - Interests = new[] { "Holy Grail", "African Swallows" } - }); - - // Load the Document and print it - var getResult = await collection.GetAsync("king_arthur"); - Console.WriteLine(getResult.ContentAs()); - - // Perform a N1QL Query - var queryResult = await cluster.QueryAsync( - String.Format("SELECT name FROM `{0}` WHERE $1 IN interests", bucketName), - new QueryOptions().Parameter("African Swallows") - ); - - // Print each found Row - await foreach (var row in queryResult) - { - Console.WriteLine(row); - } - } - } -} \ No newline at end of file diff --git a/modules/devguide/examples/dotnet/Cloud/Cloud.cs b/modules/devguide/examples/dotnet/Cloud/Cloud.cs new file mode 100644 index 00000000..c6913b00 --- /dev/null +++ b/modules/devguide/examples/dotnet/Cloud/Cloud.cs @@ -0,0 +1,54 @@ +using System; +// #tag::using[] +using System.Threading.Tasks; +using Couchbase; +// #end::using[] + +await new CloudExample().Main(); + +class CloudExample +{ + public async Task Main() + { + // #tag::connect[] + var cluster = await Cluster.ConnectAsync( + // Update these credentials for your Capella instance! + "couchbases://cb.njg8j7mwqnvwjqah.cloud.couchbase.com", + new ClusterOptions + { + UserName = "username", + Password = "Password!123", + KvTimeout = TimeSpan.FromSeconds(10) + }); + // #end::connect[] + + // #tag::bucket[] + // get a bucket reference + var bucket = await cluster.BucketAsync("travel-sample"); + // #end::bucket[] + + // #tag::collection[] + // get a user-defined collection reference + var scope = await bucket.ScopeAsync("tenant_agent_00"); + var collection = await scope.CollectionAsync("users"); + // #end::collection[] + + // #tag::upsert-get[] + // Upsert Document + var upsertResult = await collection.UpsertAsync("my-document-key", new { Name = "Ted", Age = 31 }); + var getResult = await collection.GetAsync("my-document-key"); + + Console.WriteLine(getResult.ContentAs()); + // #end::upsert-get[] + + // tag::n1ql-query[] + // Call the QueryAsync() function on the cluster object and store the result. + var queryResult = await cluster.QueryAsync("select \"Hello World\" as greeting"); + + // Iterate over the rows to access result data and print to the terminal. + await foreach (var row in queryResult) { + Console.WriteLine(row); + } + // end::n1ql-query[] + } +} diff --git a/modules/devguide/examples/dotnet/Cloud/Cloud.csproj b/modules/devguide/examples/dotnet/Cloud/Cloud.csproj new file mode 100644 index 00000000..7705fad9 --- /dev/null +++ b/modules/devguide/examples/dotnet/Cloud/Cloud.csproj @@ -0,0 +1,16 @@ + + + + Exe + net6.0 + latest + + + + + + + + + + diff --git a/modules/hello-world/examples/StartUsing.cs b/modules/hello-world/examples/StartUsing.cs index 8e7d8c2c..2bc0267e 100644 --- a/modules/hello-world/examples/StartUsing.cs +++ b/modules/hello-world/examples/StartUsing.cs @@ -12,10 +12,13 @@ static async Task Main(string[] args) { // #tag::connect[] - var cluster = await Cluster.ConnectAsync("couchbase://localhost", "username", "password"); + var cluster = await Cluster.ConnectAsync( + // Update these credentials for your Local Couchbase instance! + "couchbase://localhost", + "username", + "password"); // #end::connect[] - // #tag::bucket[] // get a bucket reference var bucket = await cluster.BucketAsync("travel-sample"); diff --git a/modules/hello-world/pages/start-using-sdk.adoc b/modules/hello-world/pages/start-using-sdk.adoc index a951e06b..fe242769 100644 --- a/modules/hello-world/pages/start-using-sdk.adoc +++ b/modules/hello-world/pages/start-using-sdk.adoc @@ -25,12 +25,14 @@ We will go through the code sample step by step, but for those in a hurry to see Couchbase Capella Sample:: + -- -If you are connecting to https://docs.couchbase.com/cloud/index.html[Couchbase Capella], be sure to get the correct endpoint as well as user, password, and `couchbasecloudbucket` -- and see the <>, below. +If you are connecting to https://docs.couchbase.com/cloud/index.html[Couchbase Capella], be sure to get the correct endpoint as well as user, password -- and see the <>, below. [source,csharp] ---- -include::devguide:example$dotnet/Cloud.cs[] +include::devguide:example$dotnet/Cloud/Cloud.cs[tags=**] ---- + +The Couchbase Capella free trial version comes with the Travel Sample Bucket, and its Query indexes, loaded and ready. -- Local Couchbase Server:: @@ -41,6 +43,10 @@ Local Couchbase Server:: include::example$StartUsing.cs[tags=**] ---- -- + +As well as the .NET SDK (see below), and a running instance of Couchbase Server, you will need to load up the Travel Sample Bucket +using either the xref:7.0@server:manage:manage-settings/install-sample-buckets.adoc#install-sample-buckets-with-the-ui[Web interface] +or the xref:7.0@server:manage:manage-settings/install-sample-buckets.adoc#install-sample-buckets-with-the-cli[command line]. ==== @@ -52,7 +58,7 @@ include::partial$supported.adoc[] See the xref:project-docs:compatibility.adoc#dotnet-compatibility[Compatibility] section for more details. -=== Quick Install +=== Quick Installation The quickest way to get up and running is with NuGet, from the Package Manager Console, within your project: @@ -63,7 +69,7 @@ The quickest way to get up and running is with NuGet, from the Package Manager C [source,console] ---- - Install-Package CouchbaseNetClient +Install-Package CouchbaseNetClient ---- All other installation methods can be found in our xref:project-docs:sdk-full-installation.adoc[full installation guide]. @@ -81,11 +87,12 @@ Install the latest 3.3 https://www.nuget.org/packages/CouchbaseNetClient/[Couchb The following code samples assume: * Couchbase xref:cloud:ROOT:index.adoc[Capella] cluster, or Couchbase Server is installed and accessible locally (xref:server:getting-started:do-a-quick-install.adoc[Do a Quick Install] if you don't already have Couchbase Server installed). -* You have create a bucket (perhaps using the xref:{version-server}@server:manage:manage-settings/install-sample-buckets.adoc[travel-sample dataset], or by creating a new bucket). +* You have create a bucket (perhaps using the xref:7.0@server:manage:manage-settings/install-sample-buckets.adoc[travel-sample dataset], or by creating a new bucket). Note, the Travel Sample bucket is installed automatically by the Capella free trial. * You have created a Couchbase user named "username" [change as appropriate] with permissions to access the cluster (at least Application Access permissions). Firstly, you will need to have a few `using` statements at the top of *Program.cs* in your console program: + [source,csharp] ---- include::example$StartUsing.cs[tag=using,indent=0] @@ -97,27 +104,34 @@ Then you can connect to the cluster: [{tabs}] ==== -Capella:: +Capella Connection:: + -- [source,csharp] ---- -// TODO +include::devguide:example$dotnet/Cloud/Cloud.cs[tag=connect,indent=0] ---- --- -Local Server:: +From 3.3, the .NET SDK includes Capella's standard certificates by default, so you do not need to additional configuration. +You do need to enable TLS, which can be done by simply using `couchbases:` in the Connection String as in this example. +-- +Local Server Connection:: + -- [source,csharp] ---- include::example$StartUsing.cs[tag=connect,indent=0] ---- + +For developing locally on the same machine as the Couchbase Server, your URI can be _couchbase://localhost_ as here. But for Production deployments, you will want to use a secure server, +with `couchbases://`. -- ==== +See xref:howtos:managing-connections.adoc[Managing Connections] for full configuration details. + Couchbase uses xref:server:learn:security/roles.adoc[Role Based Access Control (RBAC)] to control access to resources. -If you're developing client code on the same machine as the Couchbase Server, your URI can be _couchbase://localhost_. + === Bucket, Scopes, and Collections @@ -127,7 +141,7 @@ Open the bucket: include::example$StartUsing.cs[tag=bucket,indent=0] ---- -Collections allowi Documents to be grouped by purpose or theme, according to specified _Scope_. +Collections allow Documents to be grouped by purpose or theme, according to specified _Scope_. Our Travel Sample bucket has separate scopes for inventory (flights, etc.), and for tenants (different travel agents). [source,csharp] @@ -157,8 +171,6 @@ include::example$StartUsing.cs[tag=n1ql-query,indent=0] You can learn more about N1QL queries on the xref:howtos:n1ql-queries-with-sdk.adoc[Query page]. - - == Next Steps Now you're up and running, try one of the following: @@ -179,8 +191,8 @@ Older API references are linked from their respective sections in the xref:proje xref:project-docs:migrating-sdk-code-to-3.n.adoc[The Migrating from SDK2 to 3 page] highlights the main differences to be aware of when migrating your code from our earlier 2.x .NET SDK. -// Couchbase welcomes community contributions to the Python SDK. -// The Python SDK source code is available on https://github.com/couchbase/couchbase-python-client[GitHub]. +// Couchbase welcomes community contributions to the .NET SDK. +// The .NET SDK source code is available on https://github.com/couchbase/couchbase-net-client[GitHub]. === Troubleshooting diff --git a/modules/hello-world/pages/webui-cli-access.adoc b/modules/hello-world/pages/webui-cli-access.adoc index 7b6e33ff..0720bea0 100644 --- a/modules/hello-world/pages/webui-cli-access.adoc +++ b/modules/hello-world/pages/webui-cli-access.adoc @@ -18,7 +18,7 @@ You can access individual documents using the _command line_ and _web console_. == Command-Line You can access documents in Couchbase using command line interfaces. -You can use the `cbc` tool for simple document lookups by their IDs (or _keys_) and the xref:{version-server}@server:n1ql:n1ql-intro/cbq.adoc[cbq] tool to issue N1QL queries. +You can use the `cbc` tool for simple document lookups by their IDs (or _keys_) and the xref:7.0@server:n1ql:n1ql-intro/cbq.adoc[cbq] tool to issue N1QL queries. This section will discuss the installation and usage of the `cbc` tool, and is targeted towards Linux and Mac OS X users. NOTE: You can also use `cbc` on Windows by extracting the archive with libcouchbase. diff --git a/modules/howtos/pages/analytics-using-sdk.adoc b/modules/howtos/pages/analytics-using-sdk.adoc index 9aae3fdc..1f8cea92 100644 --- a/modules/howtos/pages/analytics-using-sdk.adoc +++ b/modules/howtos/pages/analytics-using-sdk.adoc @@ -10,14 +10,14 @@ include::project-docs:partial$attributes.adoc[] -For complex and long-running queries, involving large ad hoc join, set, aggregation, and grouping operations, Couchbase Data Platform offers the xref:{version-server}@server:analytics:introduction.adoc[Couchbase Analytics Service (CBAS)]. +For complex and long-running queries, involving large ad hoc join, set, aggregation, and grouping operations, Couchbase Data Platform offers the xref:7.0@server:analytics:introduction.adoc[Couchbase Analytics Service (CBAS)]. This is the analytic counterpart to our xref:n1ql-queries-with-sdk.adoc[operational data focussed Query Service]. The analytics service is available in Couchbase Data Platform 6.0 and later (developer preview in 5.5). == Getting Started -After familiarizing yourself with our xref:{version-server}@server:analytics:primer-beer.adoc[introductory primer], +After familiarizing yourself with our xref:7.0@server:analytics:primer-beer.adoc[introductory primer], in particular creating a dataset and linking it to a bucket to shadow the operational data, try Couchbase Analytics using the .NET SDK. Intentionally, the API for analytics is very similar to that of the query service. @@ -99,7 +99,7 @@ var result = await cluster.AnalyticsQueryAsync("select airportname, cou After checking that `QueryStatus` is success, we iterate over the rows. These rows may contain various sorts of data and metadata, depending upon the nature of the query, -as you will have seen when working through our xref:{version-server}@server:analytics:primer-beer.adoc[introductory primer]. +as you will have seen when working through our xref:7.0@server:analytics:primer-beer.adoc[introductory primer]. [source,csharp] ---- diff --git a/modules/howtos/pages/distributed-acid-transactions-from-the-sdk.adoc b/modules/howtos/pages/distributed-acid-transactions-from-the-sdk.adoc index 826cad6c..828f00c9 100644 --- a/modules/howtos/pages/distributed-acid-transactions-from-the-sdk.adoc +++ b/modules/howtos/pages/distributed-acid-transactions-from-the-sdk.adoc @@ -455,5 +455,5 @@ include::{version-server}@sdk:shared:partial$acid-transactions.adoc[tag=custom-m == Further Reading -* There's plenty of explanation about how Transactions work in Couchbase in our xref:{version-server}@server:learn:data/transactions.adoc[Transactions documentation]. +* There's plenty of explanation about how Transactions work in Couchbase in our xref:7.0@server:learn:data/transactions.adoc[Transactions documentation]. * You can find further code examples on our https://github.com/couchbaselabs/couchbase-transactions-dotnet-examples[transactions examples repository]. diff --git a/modules/howtos/pages/full-text-searching-with-sdk.adoc b/modules/howtos/pages/full-text-searching-with-sdk.adoc index 49f0f31e..f4451552 100644 --- a/modules/howtos/pages/full-text-searching-with-sdk.adoc +++ b/modules/howtos/pages/full-text-searching-with-sdk.adoc @@ -35,7 +35,7 @@ var result = cluster.SearchQuery( ---- All simple query types are created in the same manner, some have additional properties, which can be seen in common query type descriptions. -Couchbase FTS's xref:{version-server}@server:fts:fts-query-types.adoc[range of query types] enable powerful searching using multiple options, to ensure results are just within the range wanted. +Couchbase FTS's xref:7.0@server:fts:fts-query-types.adoc[range of query types] enable powerful searching using multiple options, to ensure results are just within the range wanted. Here is a date range query that looks for dates between 1st January 2021 and 31st January: [source,csharp] diff --git a/modules/howtos/pages/kv-operations.adoc b/modules/howtos/pages/kv-operations.adoc index fe3f1302..7c2b3736 100644 --- a/modules/howtos/pages/kv-operations.adoc +++ b/modules/howtos/pages/kv-operations.adoc @@ -57,7 +57,7 @@ include::example$Couchbase.Examples/KvOperations.cs[tag=replacewithcas,indent=0] Expiration sets an explicit time to live (TTL) for a document. We'll discuss modifying `Expiration` in more details xref:#expiration-ttl[below]. For a discussion of item (Document) _vs_ Bucket expiration, see the -xref:{version-server}@server:learn:buckets-memory-and-storage/expiration.adoc#expiration-ttl[Expiration Overview page]. +xref:7.0@server:learn:buckets-memory-and-storage/expiration.adoc#expiration-ttl[Expiration Overview page]. [source,csharp] ---- @@ -160,7 +160,7 @@ include::{version-server}@sdk:shared:partial$documents.adoc[tag=exp-note] IMPORTANT: If you are using the overloads that take `IDocument`, note that the `IDocument.Expiry` property assumes ms (milli-seconds), and is converted to seconds before being sent to the server. All other overloads take a `TimeSpan` or an `uint`, and assume an expiry in seconds A time of zero will set the document to never expire -(a negative number will set expiry to immediate -- creating a xref:{version-server}@server:learn:buckets-memory-and-storage/storage.adoc#tombstones[tombstone]). +(a negative number will set expiry to immediate -- creating a xref:7.0@server:learn:buckets-memory-and-storage/storage.adoc#tombstones[tombstone]). Values above 0ms but below 1000ms are rounded up to one second before being sent to the server -- _if you are using .NET SDK 3.0.4 or later_. @@ -196,7 +196,7 @@ NOTE: Increment & Decrement are considered part of the ‘binary’ API and as s == Scoped KV Operations -It is possible to perform scoped key value operations on named xref:{version-server}@server:learn:data/scopes-and-collections.adoc[`Collections`] _with Couchbase Server release, 7.0_. +It is possible to perform scoped key value operations on named xref:7.0@server:learn:data/scopes-and-collections.adoc[`Collections`] _with Couchbase Server release, 7.0_. Here is an example showing an upsert in the `users` collection, which lives in the `travel-sample.tenant_agent_00` keyspace: diff --git a/modules/howtos/pages/n1ql-queries-with-sdk.adoc b/modules/howtos/pages/n1ql-queries-with-sdk.adoc index bade84ed..d97bf916 100644 --- a/modules/howtos/pages/n1ql-queries-with-sdk.adoc +++ b/modules/howtos/pages/n1ql-queries-with-sdk.adoc @@ -185,7 +185,7 @@ This decreases pressure on CLR Garbage Collection and helps to prevent an `OutOf == Querying at Scope Level -From version 3.0.5 of the .NET SDK, it is possible to query off the xref:{version-server}@server:learn:data/scopes-and-collections.adoc[`Scope` level] _with the Couchbase Server release 7.0_, +From version 3.0.5 of the .NET SDK, it is possible to query off the xref:7.0@server:learn:data/scopes-and-collections.adoc[`Scope` level] _with the Couchbase Server release 7.0_, using the `QueryOptions() {QueryContext = "namespace:bucket:scope:collection"}` method. The code snippet below shows how to run a simple query to fetch 10 random rows from travel-sample and print the results, @@ -205,8 +205,8 @@ NOTE: N1QL is not the only query option in Couchbase. Be sure to check that xref:concept-docs:data-services.adoc[your use case fits your selection of query service]. * For a deeper dive into N1QL from the SDK, refer to our xref:concept-docs:n1ql-query.adoc[N1QL SDK concept doc]. -* The xref:{version-server}@server:n1ql:n1ql-language-reference/index.adoc[Server doc N1QL intro] introduces a complete guide to the N1QL language, including all of the latest additions. +* The xref:7.0@server:n1ql:n1ql-language-reference/index.adoc[Server doc N1QL intro] introduces a complete guide to the N1QL language, including all of the latest additions. * The http://query.pub.couchbase.com/tutorial/#1[N1QL interactive tutorial] is a good introduction to the basics of N1QL use. -* For scaling up queries, be sure to xref:{version-server}@server:learn:services-and-indexes/indexes/index-replication.adoc[read up on Indexes]. +* For scaling up queries, be sure to xref:7.0@server:learn:services-and-indexes/indexes/index-replication.adoc[read up on Indexes]. * N1QL is for operational queries; for analytical workloads, read more on xref:concept-docs:http-services.adoc#long-running-queries-big-data[when to choose Analytics], our implementation of SQL++ available in the Enterprise Edition. diff --git a/modules/howtos/pages/sdk-authentication.adoc b/modules/howtos/pages/sdk-authentication.adoc index 4e246a01..b407a961 100644 --- a/modules/howtos/pages/sdk-authentication.adoc +++ b/modules/howtos/pages/sdk-authentication.adoc @@ -30,7 +30,7 @@ include::{version-server}@sdk:shared:partial$auth-overview.adoc[tag=cert-auth] == Authenticating a .NET Client by Certificate -For sample procedures whereby certificates can be generated and deployed, see xref:{version-server}@server:manage:manage-security/manage-certificates.adoc[Manage Certificates]. +For sample procedures whereby certificates can be generated and deployed, see xref:7.0@server:manage:manage-security/manage-certificates.adoc[Manage Certificates]. The rest of this document assumes that the processes there, or something similar, have been followed. That is, a cluster certificate has been created and installed on the server, a client certificate has been created, and it is stored in a keystore along with the cluster's certificate. diff --git a/modules/howtos/pages/subdocument-operations.adoc b/modules/howtos/pages/subdocument-operations.adoc index af5826af..2b1906a6 100644 --- a/modules/howtos/pages/subdocument-operations.adoc +++ b/modules/howtos/pages/subdocument-operations.adoc @@ -301,7 +301,7 @@ await collection.MutateIn("key", ---- In Couchbase Server 6.5 and up, this is built upon with xref:concept-docs:durability-replication-failure-considerations.adoc#durable-writes[Durable Writes], -which uses the concept of xref:{version-server}@server:learn:data/durability.adoc#majority[majority] to indicate the number of configured Data Service nodes to which commitment is required: +which uses the concept of xref:7.0@server:learn:data/durability.adoc#majority[majority] to indicate the number of configured Data Service nodes to which commitment is required: [source,csharp] ---- diff --git a/modules/project-docs/pages/compatibility.adoc b/modules/project-docs/pages/compatibility.adoc index d1d6bbc0..df238ddd 100644 --- a/modules/project-docs/pages/compatibility.adoc +++ b/modules/project-docs/pages/compatibility.adoc @@ -54,6 +54,11 @@ It is best to upgrade either the SDK or the Couchbase version you are using. Note the https://www.couchbase.com/support-policy[End of Life dates^] for Couchbase Server and SDK versions. See the notes there for Support details. +=== Capella Compatibility + +At time of release, the Couchbase 3£ .NET SDK is fully compatible with Couchbase Capella, our fully-hosted database-as-a-service. +To make development easier, the 3.3 SDK includes the Capella client certificate ready installed. + == Platform Compatibility @@ -88,7 +93,7 @@ Although installable or compilable on many other platforms, we cannot provide su === ARM Processor Support -.NET 3.3 SDK supports AWS Amazon Graviton2 and Apple M1 ARM processors. +The .NET 3.3 SDK supports AWS Amazon Graviton2 and Apple M1 ARM processors. == Couchbase New Feature Availability Matrix diff --git a/modules/project-docs/pages/distributed-transactions-dotnet-release-notes.adoc b/modules/project-docs/pages/distributed-transactions-dotnet-release-notes.adoc index 51fbe394..9ffe661c 100644 --- a/modules/project-docs/pages/distributed-transactions-dotnet-release-notes.adoc +++ b/modules/project-docs/pages/distributed-transactions-dotnet-release-notes.adoc @@ -11,7 +11,7 @@ This page features the release notes for that library -- for release notes, down == Using Distributed Transactions -See the xref:{version-server}@server:learn:data/transactions.adoc[Distributed ACID Transactions concept doc] in the server documentation for details of how Couchbase implements transactions. +See the xref:7.0@server:learn:data/transactions.adoc[Distributed ACID Transactions concept doc] in the server documentation for details of how Couchbase implements transactions. The xref:howtos:distributed-acid-transactions-from-the-sdk.adoc[Distributed Transactions HOWTO doc] walks you through all aspects of working with Distributed Transactions. == Version 1.1.0 (29 Oct 2021) diff --git a/modules/project-docs/pages/sdk-release-notes.adoc b/modules/project-docs/pages/sdk-release-notes.adoc index d595e29a..ddfd3eb0 100644 --- a/modules/project-docs/pages/sdk-release-notes.adoc +++ b/modules/project-docs/pages/sdk-release-notes.adoc @@ -15,14 +15,37 @@ For release notes, download links, and installation methods for 2.7 and earlier The full installation instructions that were previously on this page can now be found xref:sdk-full-installation.adoc[here]. +== Version 3.3.1 (29 April 2022) + +Version 3.3.1 is the second release of the 3.3 series. It contains a single ticket (NCBC-3192) and is a re-release of 3.3.0 with (NCBC-3192). + +https://packages.couchbase.com/clients/net/3.3/Couchbase-Net-Client-3.3.1.zip[Download] | +https://docs.couchbase.com/sdk-api/couchbase-net-client-3.3.1[API Reference] | +https://www.nuget.org/packages/CouchbaseNetClient/3.3.1[Nuget] + +=== Special Note + +* During a rebalance upgrade from 6.x (or any earlier version) to 7x, in mixed mode (where you are communicating with Couchbase Server whilst some but not all nodes are upgraded), there is a known issue where data may be written to the wrong location. +The solution is to either upgrade to 3.2.9 or greater, or to quiesce application processing so there are no writes until you have upgraded all nodes. +If you encounter a similar situation during migration and need help with mitigation, please contact our support team. + +=== Fixed Issues + +* https://issues.couchbase.com/browse/NCBC-2543[NCBC-3192]: Erroneous InvalidArgumentException with default TLS settings + == Version 3.3.0 (27 April 2022) -Version 3.3.0 is the first release of the 3.3 series. +Version 3.3.0 is the first release of the 3.3 series (delisted from NuGet 4/28/2022). https://packages.couchbase.com/clients/net/3.3/Couchbase-Net-Client-3.3.0.zip[Download] | https://docs.couchbase.com/sdk-api/couchbase-net-client-3.3.0[API Reference] | https://www.nuget.org/packages/CouchbaseNetClient/3.3.0[Nuget] +=== Special Note + +* During a rebalance upgrade from 6.x (or any earlier version) to 7x, in mixed mode (where you are communicating with Couchbase Server whilst some but not all nodes are upgraded), there is a known issue where data may be written to the wrong location. +The solution is to either upgrade to 3.2.9 or greater, or to quiesce application processing so there are no writes until you have upgraded all nodes. +If you encounter a similar situation during migration and need help with mitigation, please contact our support team. === Fixed Issues