Skip to content

Conversation

@Pallavi-Janardhan
Copy link

@Pallavi-Janardhan Pallavi-Janardhan commented Jan 6, 2026

Docs Issue: DOC-13875

PR to compare the Node.js SDK Doc Operations page and make it similar to the Java SDK doc.

Preview URL: Doc Team Credentials (https://confluence.issues.couchbase.com/wiki/spaces/DOCS/pages/1971224949/Docs+Team+demo+site+passwords)

Copy link
Contributor

@RichardSmedley RichardSmedley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Pallavi-Janardhan - please address individual comments, and then we'll iterate over any further improvements. 👍


// Once we create the document-operations.adoc, like in Java SDK, we can uncomment these lines to share aliases across multiple pages
// :page-aliases: ROOT:document-operations.adoc,ROOT:documents-creating.adoc,ROOT:documents-updating.adoc,ROOT:documents-retrieving.adoc,ROOT:documents-deleting.adoc
// :example-source: 3.8@java-sdk:devguide:example$java/Queries.java -- may be Queries.js?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused and therefore unnecessary.

{description}
Here we cover CRUD operations, document expiration, and optimistic locking with CAS -- as well as KV Range scan, for querying without an index.

The complete code sample used on this page can be downloaded from https://github.com/couchbase/docs-sdk-nodejs/blob/release/{sdk_dot_minor}/modules/devguide/examples/nodejs/KvOperations.js[here].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check this link? It's broken - look again at both the branch and at the filename.

// include::project-docs:partial$attributes.adoc[]

// Once we create the document-operations.adoc, like in Java SDK, we can uncomment these lines to share aliases across multiple pages
// :page-aliases: ROOT:document-operations.adoc,ROOT:documents-creating.adoc,ROOT:documents-updating.adoc,ROOT:documents-retrieving.adoc,ROOT:documents-deleting.adoc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are aliases for old pages about the Java SDK.
To look for anything similar to check if it's relevant, or should be different, look at the earlier JS pages on the data service.

e.g. https://docs-archive.couchbase.com/nodejs-sdk/2.1/updating.html

////
// include::project-docs:partial$attributes.adoc[]

// Once we create the document-operations.adoc, like in Java SDK, we can uncomment these lines to share aliases across multiple pages
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What document-operations file?
What does this mean for aliases and why?

NOTE: Increment & Decrement are considered part of the 'binary' API and as such may still be subject to change

See the https://docs.couchbase.com/sdk-api/couchbase-java-client/com/couchbase/client/java/kv/Increment.html[API Reference] for full details.
// what is the path where we can find the Node.js SDK API reference? Need to update the above link accordingly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIP: Setting the document expiry time only works when a document is created, and it is not possible to update the expiry time of an existing counter document with the Increment method -- to do this during an increment, use with the `Touch()` method.

// Atomicity Across Data Centers
=== Atomicity Across Data Centers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the comment - the page worked before, and in the Java version - https://github.com/couchbase/docs-sdk-java/blob/release/3.10/modules/howtos/pages/kv-operations.adoc?plain=1#L305

Please look at the included file if you're not sure what is happening: https://github.com/couchbase/docs-sdk-common/blob/release/8.0/modules/shared/partials/atomic.adoc?plain=1#L4


include::{version-common}@sdk:shared:partial$atomic.adoc[tag=xdcr]

== Scoped KV Operations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this section (here, or in Java)?


[#kv-range-scan-only-ids]
=== Get IDs instead of full documents
=== Get IDs instead of full document
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

(revert, and then correct the error that this title does contain)

Working on just a specific path within a JSON document will reduce network bandwidth requirements - see the xref:subdocument-operations.adoc[Sub-Document] pages.

Another way of increasing network performance is to _pipeline_ operations with xref:concurrent-async-apis.adoc#batching[Batching Operations].
// We need to add the Node JS SDK/Best Practices/Async and Reactive APIs doc and the link to it here when it's ready. Tried looking for it but couldn't find it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants