some data structure changes#119
Open
RichardSmedley wants to merge 1 commit into
Open
Conversation
| Data structures in Couchbase are similar in concept to data structures in Scala: | ||
|
|
||
| * *Map* is an iterable over a set of keys and values, like a https://docs.scala-lang.org/overviews/collections-2.13/maps.html[Scala Map]. | ||
| * *List* is is a finite immutable sequence. |
Contributor
There was a problem hiding this comment.
It's Buffer in Scala, and is mutable. It extends Scala's mutable.AbstractBuffer
| Values can be placed in the beginning or end of a list, and can be accessed using numeric indexes. | ||
| // or can it ? https://docs.scala-lang.org/overviews/collections-2.13/concrete-immutable-collection-classes.html#lists | ||
| * *Queue* is a First In First Out (FIFO) sequence, | ||
| like a https://docs.scala-lang.org/overviews/collections-2.13/concrete-immutable-collection-classes.html#immutable-queues[Scala Immutable Queue]. |
Contributor
There was a problem hiding this comment.
Best to link to the mutable version here too
| * *Map* is an iterable over a set of keys and values, like a https://docs.scala-lang.org/overviews/collections-2.13/maps.html[Scala Map]. | ||
| * *List* is is a finite immutable sequence. | ||
| Values can be placed in the beginning or end of a list, and can be accessed using numeric indexes. | ||
| // or can it ? https://docs.scala-lang.org/overviews/collections-2.13/concrete-immutable-collection-classes.html#lists |
Contributor
There was a problem hiding this comment.
Yes random access is allowed
| Data structures in Couchbase are similar in concept to data structures in Scala: | ||
|
|
||
| * *Map* is an iterable over a set of keys and values, like a https://docs.scala-lang.org/overviews/collections-2.13/maps.html[Scala Map]. | ||
| * *List* is is a finite immutable sequence. |
| Using the data structures API may help your application in two ways: | ||
|
|
||
| * *Simplicity*: Data structures provide high level operations by which you can deal with documents as if they were container data structures. | ||
| Adding an item to a dictionary is expressed as `MapAdd`, rather than retrieving the entire document, modifying it locally, and then saving it back to the server. |
Contributor
There was a problem hiding this comment.
MapAdd -> map.apply() maybe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.