public class RowCountFetcher extends Object implements graphql.schema.DataFetcher
| Modifier and Type | Class and Description |
|---|---|
static class |
RowCountFetcher.GroupCount
The convenience object corresponding to the groupCountType GraphQL type.
|
| Modifier and Type | Field and Description |
|---|---|
static graphql.schema.GraphQLObjectType |
groupCountType
This is very similar to an
GraphQLGtfsSchema.errorCountType, but is used for
counts of entities grouped by some column. |
static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
RowCountFetcher(String tableName) |
RowCountFetcher(String tableName,
String filterField) |
RowCountFetcher(String tableName,
String filterField,
String groupByField) |
| Modifier and Type | Method and Description |
|---|---|
static graphql.schema.GraphQLFieldDefinition |
field(String tableName)
For cases where the GraphQL field name is the same as the table name itself.
|
static graphql.schema.GraphQLFieldDefinition |
field(String fieldName,
String tableName)
Convenience method to create a field in a GraphQL schema that fetches the number of rows in a table.
|
static graphql.schema.GraphQLFieldDefinition |
field(String fieldName,
String tableName,
String filterField)
Convenience method to create a field in a GraphQL schema that fetches the number of rows in a table with a filter
or where clause.
|
Object |
get(graphql.schema.DataFetchingEnvironment environment) |
static graphql.schema.GraphQLFieldDefinition |
groupedField(String tableName,
String groupByColumn)
A GraphQL field used to deliver lists of group counts.
|
public static final org.slf4j.Logger LOG
public static graphql.schema.GraphQLObjectType groupCountType
GraphQLGtfsSchema.errorCountType, but is used for
counts of entities grouped by some column. It is defined here to ensure that it is statically
initialized before its use below.public RowCountFetcher(String tableName)
public Object get(graphql.schema.DataFetchingEnvironment environment)
get in interface graphql.schema.DataFetcherpublic static graphql.schema.GraphQLFieldDefinition field(String fieldName, String tableName)
public static graphql.schema.GraphQLFieldDefinition field(String fieldName, String tableName, String filterField)
public static graphql.schema.GraphQLFieldDefinition field(String tableName)
public static graphql.schema.GraphQLFieldDefinition groupedField(String tableName, String groupByColumn)
Copyright © 2019. All rights reserved.