You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`insert` and `upsert` both creates a new document.
337
-
The difference between the two is that if the document key already exists, the `insert` operation fails and displays the `DocumentExistsException` error.
336
+
`insert` and `upsert` both create a new document.
337
+
The difference is that if the document key already exists, the `insert` operation fails and displays the `DocumentExistsException` error.
338
338
However, the `upsert` operation succeeds and replaces the content.
339
339
340
-
Always provide a unique ID as the key, and use a UUID here:
340
+
Always provide a unique ID as the key, and use a UUID as shown below.
The `get` method reads a document from a collection.
351
351
// If the collection does not have a document with this ID, the `get` method also throws `DocumentNotFoundException`.
352
352
353
-
Wrapping the method in a `Try` / `Catch` is a good way to handle exceptions:
353
+
Wrapping the method in a `Try` / `Catch` is a good way to handle exceptions.
354
354
355
355
[source,java]
356
356
----
@@ -437,19 +437,19 @@ Like `replace`, `remove` also optionally takes the CAS value if you want to make
437
437
== Data Modeling
438
438
439
439
Documents are organized into collections -- collections of documents that belong together.
440
-
You get to decide what it means to "belong."
440
+
You get to decide what it means to "belong".
441
441
Developers usually put documents of the same type in the same collection.
442
442
443
443
For example, consider you have two types of documents: customers and invoices.
444
-
You could put the customer documents in a collection called `customers`, and the invoice documents in a collection called `invoices`.
444
+
You can put the customer documents in a collection named `customers`, and the invoice documents in a collection named `invoices`.
445
445
446
446
Each document belongs to one collection.
447
447
A document's ID is unique _within_ the collection.
448
448
449
449
Different scopes hold collections with different names.
450
450
There is no relationship between collections in different scopes.
451
451
Each collection belongs to just one scope and
452
-
a collection's name is unique within the scope.
452
+
the collection name is unique within the scope.
453
453
454
454
455
455
More details can be found on the xref:concept-docs:data-model.adoc[Data Model page].
@@ -485,7 +485,7 @@ both
485
485
486
486
== Next Steps
487
487
488
-
Now you're up and running, try one of the following:
488
+
Now that your setup is up and running, try one of the following:
489
489
490
490
* Our xref:hello-world:sample-application.adoc[Travel Sample Application] demonstrates all the basics you need to know.
491
491
* Explore xref:howtos:kv-operations.adoc[Key Value Operations] (CRUD) against a document database.
@@ -498,7 +498,7 @@ Now you're up and running, try one of the following:
498
498
499
499
////
500
500
The Scala SDK includes three APIs.
501
-
The examples above show the simple blocking API, for simplicity. However, you can also perform all operations in an async style using Scala `Future`, and a reactive style using Project Reactor `SMono` and `SFlux`.
501
+
The examples above show the simple blocking API, for simplicity. However, you can also perform all the operations in an async style using Scala `Future`, and a reactive style using Project Reactor `SMono` and `SFlux`.
502
502
For more information, see xref:howtos:concurrent-async-apis.adoc[Choosing an API].
0 commit comments