Skip to content

Delete unused Datastore region tags / samples. #1138

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 1 commit into from
Jun 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions datastore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@
</dependencies>
<build>
<plugins>
<!-- // [START datastore_maven]-->

<!-- // [END datastore_maven]-->
<!-- // [START datastore_exec] -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand All @@ -69,7 +65,6 @@
<mainClass>com.google.datastore.snippets.TaskList</mainClass>
</configuration>
</plugin>
<!-- // [END datastore_exec] -->
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ void deleteTask(long id) {
}
// [END datastore_delete_entity]

// [START datastore_format_results]
/**
* Converts a list of task entities to a list of formatted task strings.
*
Expand All @@ -135,7 +134,6 @@ static List<String> formatTasks(Iterator<Entity> tasks) {
}
return strings;
}
// [END datastore_format_results]

/**
* Handles a single command.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,31 +540,6 @@ public void testKeysOnlyQuery() {
assertValidQuery(query);
}

@Test
public void testRunKeysOnlyQuery() {
setUpQueryTests();
Query<Key> query = Query.newKeyQueryBuilder().setKind("Task").build();
// [START datastore_run_keys_only_query]
QueryResults<Key> taskKeys = datastore.run(query);
// [END datastore_run_keys_only_query]
assertNotNull(taskKeys.next());
assertFalse(taskKeys.hasNext());
}

@Test
public void testDistinctQuery() {
setUpQueryTests();
// [START datastore_distinct_query]
Query<ProjectionEntity> query = Query.newProjectionEntityQueryBuilder()
.setKind("Task")
.setProjection("category", "priority")
.setDistinctOn("category", "priority")
.setOrderBy(OrderBy.asc("category"), OrderBy.asc("priority"))
.build();
// [END datastore_distinct_query]
assertValidQuery(query);
}

@Test
public void testDistinctOnQuery() {
setUpQueryTests();
Expand Down Expand Up @@ -998,54 +973,4 @@ public void testPropertyFilteringRunQuery() {
ImmutableMap.of("Task", ImmutableSet.of("priority", "tag"));
assertEquals(expected, propertiesByKind);
}

@Test
public void testGqlRunQuery() {
setUpQueryTests();
// [START datastore_gql_run_query]
Query<Entity> query = Query.newGqlQueryBuilder(
ResultType.ENTITY, "select * from Task order by created asc").build();
// [END datastore_gql_run_query]
assertValidQuery(query);
}

@Test
public void testGqlNamedBindingQuery() {
setUpQueryTests();
// [START datastore_gql_named_binding_query]
Query<Entity> query =
Query.newGqlQueryBuilder(
ResultType.ENTITY,
"select * from Task where completed = @completed and priority = @priority")
.setBinding("completed", false)
.setBinding("priority", 4)
.build();
// [END datastore_gql_named_binding_query]
assertValidQuery(query);
}

@Test
public void testGqlPositionalBindingQuery() {
setUpQueryTests();
// [START datastore_gql_positional_binding_query]
Query<Entity> query = Query.newGqlQueryBuilder(
ResultType.ENTITY, "select * from Task where completed = @1 and priority = @2")
.addBinding(false)
.addBinding(4)
.build();
// [END datastore_gql_positional_binding_query]
assertValidQuery(query);
}

@Test
public void testGqlLiteralQuery() {
setUpQueryTests();
// [START datastore_gql_literal_query]
Query<Entity> query = Query.newGqlQueryBuilder(
ResultType.ENTITY, "select * from Task where completed = false and priority = 4")
.setAllowLiteral(true)
.build();
// [END datastore_gql_literal_query]
assertValidQuery(query);
}
}