-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates for Sets and GSets support. #8
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,7 +165,7 @@ Let's create a Riak gset stored in the key `2019-11-17` in the bucket `account-1 | |
// before you perform operations on them: | ||
|
||
Location citiesSet = | ||
new Location(new Namespace("sets", "travel"), "cities"); | ||
new Location(new Namespace("gsets", "account-12345678"), "2019-11-17"); | ||
``` | ||
|
||
```ruby | ||
|
@@ -322,7 +322,7 @@ But let's say that a pair of transactions occurred today. Let's add them to our | |
```java | ||
// Using our "cities" Location from above: | ||
|
||
SetUpdate su = new SetUpdate() | ||
GSetUpdate su = new GSetUpdate() | ||
.add("Toronto") | ||
.add("Montreal"); | ||
UpdateSet update = new UpdateSet.Builder(citiesSet, su) | ||
|
@@ -519,8 +519,13 @@ Or we can see whether our gset includes a specific member: | |
```java | ||
// Using our "citiesSet" from above: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is "citiesSet" still correct? Or should this now be "citiesGSet"? |
||
|
||
System.out.println(citiesSet.contains(("Vancouver")); | ||
System.out.println(citiesSet.contains("Ottawa")); | ||
FetchSet fetch = new FetchSet.Builder(citiesSet) | ||
.build(); | ||
FetchSet.Response response = client.execute(fetch); | ||
Set<BinaryValue> binarySet = response.getDatatype().view(); | ||
|
||
System.out.println(binarySet.contains(BinaryValue.createFromUtf8("Vancouver"))); | ||
System.out.println(binarySet.contains(BinaryValue.createFromUtf8("Ottawa"))); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Really requires a BinaryValue conversion for a string? Also, does it no longer work offline? Now requires a server fetch? |
||
``` | ||
|
||
```ruby | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd keep the gsets/travel/cities thing the same as from sets, as we add cities to it below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daniel020403 Can you see this?