-
Notifications
You must be signed in to change notification settings - Fork 228
Query State Preview API implementation. #697
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6be47a8
Query State Preview API implementation.
mukundansundar 83304f0
Use latest dapr ref and fix grpc query state api
mukundansundar 6dbaa5b
fix service invocation automatic unesacpe
mukundansundar 89a7dbd
Merge branch 'master' into query_state_api
mukundansundar 6060eb3
add more unit tests
mukundansundar 14f389b
Merge branch 'master' into query_state_api
mukundansundar d97d330
Add query state API docs
mukundansundar 793f9b1
Merge branch 'master' into query_state_api
mukundansundar d3c9253
Merge branch 'master' into query_state_api
mukundansundar e413bce
Merge branch 'master' into query_state_api
artursouza b2d133d
Fix example to be user friendly
mukundansundar 0ea8d80
Fix example in docs
mukundansundar 499949d
make pagination immutable
mukundansundar 8138a7e
Merge branch 'master' into query_state_api
artursouza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| apiVersion: dapr.io/v1alpha1 | ||
| kind: Component | ||
| metadata: | ||
| name: mongo-statestore | ||
| spec: | ||
| type: state.mongodb | ||
| version: v1 | ||
| metadata: | ||
| - name: host | ||
| value: localhost:27017 | ||
| - name: databaseName | ||
| value: local | ||
| - name: collectionName | ||
| value: propertyCollection |
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
98 changes: 98 additions & 0 deletions
98
examples/src/main/java/io/dapr/examples/querystate/Listing.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| /* | ||
| * Copyright 2021 The Dapr Authors | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| package io.dapr.examples.querystate; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
|
||
| import java.util.Objects; | ||
|
|
||
| public class Listing { | ||
|
|
||
| @JsonProperty | ||
| private String propertyType; | ||
|
|
||
| @JsonProperty | ||
| private String id; | ||
|
|
||
| @JsonProperty | ||
| private String city; | ||
|
|
||
| @JsonProperty | ||
| private String state; | ||
|
|
||
| public Listing() { | ||
| } | ||
|
|
||
| public String getPropertyType() { | ||
| return propertyType; | ||
| } | ||
|
|
||
| public void setPropertyType(String propertyType) { | ||
| this.propertyType = propertyType; | ||
| } | ||
|
|
||
| public String getId() { | ||
| return id; | ||
| } | ||
|
|
||
| public void setId(String id) { | ||
| this.id = id; | ||
| } | ||
|
|
||
| public String getCity() { | ||
| return city; | ||
| } | ||
|
|
||
| public void setCity(String city) { | ||
| this.city = city; | ||
| } | ||
|
|
||
| public String getState() { | ||
| return state; | ||
| } | ||
|
|
||
| public void setState(String state) { | ||
| this.state = state; | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return "Listing{" | ||
| + "propertyType='" + propertyType + '\'' | ||
| + ", id=" + id | ||
| + ", city='" + city + '\'' | ||
| + ", state='" + state + '\'' | ||
| + '}'; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean equals(Object o) { | ||
| if (this == o) { | ||
| return true; | ||
| } | ||
| if (o == null || getClass() != o.getClass()) { | ||
| return false; | ||
| } | ||
| Listing listing = (Listing) o; | ||
| return id == listing.id | ||
| && propertyType.equals(listing.propertyType) | ||
| && Objects.equals(city, listing.city) | ||
| && Objects.equals(state, listing.state); | ||
| } | ||
|
|
||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hash(propertyType, id, city, state); | ||
| } | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.