Skip to content
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

feat: implement query profile #1365

Merged
merged 19 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
fix clirr, run linter
  • Loading branch information
kolea2 committed Jan 18, 2024
commit ca6a85eb57f96621e4414d56df9e9539136553a7
27 changes: 14 additions & 13 deletions google-cloud-datastore/clirr-ignored-differences.xml
@@ -1,19 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- see http://mojo.codehaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>
<!-- renaming internal only class-->
<difference>
<className>com/google/cloud/datastore/ReadOption$QueryAndReadOptions</className>
<method>*</method>
<differenceType>8001</differenceType>
</difference>
<difference>
<className>com/google/cloud/datastore/execution/request/AggregationQueryRequestProtoPreparer</className>
<method>*QueryAndReadOptions*</method>
<to>*QueryConfig*</to>
<differenceType>7005</differenceType>
</difference>

<!-- added a default method to an interface-->
<difference>
<className>com/google/cloud/datastore/Datastore</className>
Expand Down Expand Up @@ -69,4 +56,18 @@
<method>java.lang.Object execute(com.google.cloud.datastore.Query, com.google.cloud.datastore.ReadOption[])</method>
<differenceType>7004</differenceType>
</difference>

<!-- updated internal only class and method-->
<difference>
<className>com/google/cloud/datastore/ReadOption$QueryConfig</className>
<method>*QueryConfig*</method>
<to>*com.google.datastore.v1.QueryMode*</to>
<differenceType>7005</differenceType>
</difference>
<difference>
<className>com/google/cloud/datastore/ReadOption$QueryConfig</className>
<method>com.google.cloud.datastore.ReadOption$QueryConfig create(com.google.cloud.datastore.Query)</method>
<differenceType>7004</differenceType>
</difference>

</differences>
Expand Up @@ -465,8 +465,9 @@ interface TransactionCallable<T> {
<T> QueryResults<T> run(Query<T> query, ReadOption... options);

/**
* Submits a {@link Query} with specified {@link com.google.cloud.datastore.models.QueryProfile.QueryMode} and returns its result. {@link ReadOption}s can be specified if
* desired.
* Submits a {@link Query} with specified {@link
* com.google.cloud.datastore.models.QueryProfile.QueryMode} and returns its result. {@link
* ReadOption}s can be specified if desired.
*
* <p>Example of running a query to find all entities of one kind.
*
Expand Down Expand Up @@ -535,8 +536,9 @@ default AggregationResults runAggregation(AggregationQuery query, ReadOption...
}

/**
* Submits a {@link AggregationQuery} with specified {@link com.google.cloud.datastore.models.QueryProfile.QueryMode} and returns {@link AggregationResults}. {@link ReadOption}s
* can be specified if desired.
* Submits a {@link AggregationQuery} with specified {@link
* com.google.cloud.datastore.models.QueryProfile.QueryMode} and returns {@link
* AggregationResults}. {@link ReadOption}s can be specified if desired.
*
* <p>Example of running an {@link AggregationQuery} to find the count of entities of one kind.
*
Expand All @@ -553,6 +555,7 @@ default AggregationResults runAggregation(AggregationQuery query, ReadOption...
* AggregationResults aggregationResults = datastore.runAggregation(aggregationQuery, QueryMode.EXPLAIN_ANALYZE);
* ResultSetStats aggregationStats = aggregationResults.getResultSetStats();
* }</pre>
*
* @throws DatastoreException upon failure
* @return {@link AggregationResults}
*/
Expand Down
Expand Up @@ -65,7 +65,8 @@ default AggregationResults runAggregation(AggregationQuery query) {
}

/**
* Submits a {@link AggregationQuery} with a specified {@link com.google.cloud.datastore.models.QueryProfile.QueryMode} and returns {@link
* Submits a {@link AggregationQuery} with a specified {@link
* com.google.cloud.datastore.models.QueryProfile.QueryMode} and returns {@link
* AggregationResults}.
*
* @throws DatastoreException upon failure
Expand Down