Query

grackle.Query
See theQuery companion trait
object Query

Attributes

Companion
trait
Source
query.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Query.type

Members list

Type members

Classlikes

case class Binding(name: String, value: Value)

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Component[F[_]](mapping: Mapping[F], join: (Query, Cursor) => Result[Query], child: Query) extends Query

Identifies a component boundary.

Identifies a component boundary. join is applied to the current cursor and child yielding a continuation query which will be evaluated by the interpreter identified by componentId.

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class Count(child: Query) extends Query

Computes the number of top-level elements of child

Computes the number of top-level elements of child

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class Effect[F[_]](handler: EffectHandler[F], child: Query) extends Query

Embeds possibly batched effects.

Embeds possibly batched effects. handler is applied to one or more possibly batched queries and cursors yielding corresponding continuation queries and cursors which will be evaluated by the current interpreter in the next phase.

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
trait EffectHandler[F[_]]

Attributes

Source
query.scala
Supertypes
class Object
trait Matchable
class Any
case object Empty extends Query

The terminal query

The terminal query

Attributes

Source
query.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
Self type
Empty.type
case class Environment(env: Env, child: Query) extends Query

Add env to the environment for the continuation child

Add env to the environment for the continuation child

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class Filter(pred: Predicate, child: Query) extends Query

Retains only elements satisfying pred and continues with child

Retains only elements satisfying pred and continues with child

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all

Constructor/extractor for nested Filter/OrderBy/Limit/Offset patterns in the query algebra

Constructor/extractor for nested Filter/OrderBy/Limit/Offset patterns in the query algebra

Attributes

Source
query.scala
Supertypes
class Object
trait Matchable
class Any
Self type
case class Group(queries: List[Query]) extends Query

A Group of sibling queries at the same level

A Group of sibling queries at the same level

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class Introspect(schema: Schema, child: Query) extends Query

Evaluates an introspection query relative to schema

Evaluates an introspection query relative to schema

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class Limit(num: Int, child: Query) extends Query

Limits the results of list-producing continuation child to num elements

Limits the results of list-producing continuation child to num elements

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class Narrow(subtpe: TypeRef, child: Query) extends Query

The result of child if the focus is of type subtpe, Empty otherwise.

The result of child if the focus is of type subtpe, Empty otherwise.

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class Offset(num: Int, child: Query) extends Query

Drops the first num elements of list-producing continuation child.

Drops the first num elements of list-producing continuation child.

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class OrderBy(selections: OrderSelections, child: Query) extends Query

Orders the results of list-producing continuation child by fields specified by selections.

Orders the results of list-producing continuation child by fields specified by selections.

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class OrderSelection[T](term: Term[T], ascending: Boolean, nullsLast: Boolean)(implicit evidence$1: Order[T])

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class OrderSelections(selections: List[OrderSelection[_]])

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Select(name: String, alias: Option[String], child: Query) extends Query

Select field name possibly aliased, and continue with child

Select field name possibly aliased, and continue with child

Attributes

Companion
object
Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
object Select

Attributes

Companion
class
Source
query.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Select.type
case class TransformCursor(f: Cursor => Result[Cursor], child: Query) extends Query

Uses the supplied function to compute a continuation Cursor from the current Cursor.

Uses the supplied function to compute a continuation Cursor from the current Cursor.

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
object TypeCase

Extractor for grouped Narrow patterns in the query algebra

Extractor for grouped Narrow patterns in the query algebra

Attributes

Source
query.scala
Supertypes
class Object
trait Matchable
class Any
Self type
TypeCase.type
case class Unique(child: Query) extends Query

Continues with single-element-list-producing child and yields the single element

Continues with single-element-list-producing child and yields the single element

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class UntypedFragment(name: String, tpnme: String, directives: List[Directive], child: Query)

Precursor of a fragment definition before compilation

Precursor of a fragment definition before compilation

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class UntypedFragmentSpread(name: String, directives: List[Directive]) extends Query

Representation of a fragment spread prior to comilation.

Representation of a fragment spread prior to comilation.

During compilation this node will be replaced by its definition, guarded by a Narrow corresponding to the type condition of the fragment.

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class UntypedInlineFragment(tpnme: Option[String], directives: List[Directive], child: Query) extends Query

Representation of an inline fragment prior to comilation.

Representation of an inline fragment prior to comilation.

During compilation this node will be replaced by its child, guarded by a Narrow corresponding to the type condition of the fragment, if any.

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class UntypedSelect(name: String, alias: Option[String], args: List[Binding], directives: List[Directive], child: Query) extends Query

Precursor of a Select node, containing uncompiled field arguments and directives.

Precursor of a Select node, containing uncompiled field arguments and directives.

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Query
class Object
trait Matchable
class Any
Show all
case class UntypedVarDef(name: String, tpe: Type, default: Option[Value], directives: List[Directive])

Precursor of a variable definition before compilation

Precursor of a variable definition before compilation

Attributes

Source
query.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Types

Attributes

Source
query.scala

Attributes

Source
query.scala
type Vars = Map[String, (Type, Value)]

Attributes

Source
query.scala

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def alignResultName(source: Query, target: Query): Option[Query]

Renames the root of target to match source if possible.

Renames the root of target to match source if possible.

Attributes

Source
query.scala

Attributes

Source
query.scala
def children(q: Query): List[Query]

Yields the top-level field selections of the supplied query.

Yields the top-level field selections of the supplied query.

Attributes

Source
query.scala
def extractChild(query: Query): Option[Query]

Yields the top-level field selection of the supplied Query if it is unique, None otherwise.

Yields the top-level field selection of the supplied Query if it is unique, None otherwise.

Attributes

Source
query.scala
def fieldAlias(query: Query, fieldName: String): Option[String]

Returns the alias, if any, of the top-level field fieldName in the supplied query.

Returns the alias, if any, of the top-level field fieldName in the supplied query.

Attributes

Source
query.scala
def hasField(query: Query, fieldName: String): Boolean

True if fieldName is a top-level selection of the supplied query, false otherwise.

True if fieldName is a top-level selection of the supplied query, false otherwise.

Attributes

Source
query.scala
def mapFields(query: Query)(f: Query => Query): Query

Tranform the children of query using the supplied function.

Tranform the children of query using the supplied function.

Attributes

Source
query.scala
def mapFieldsR(query: Query)(f: Query => Result[Query]): Result[Query]

Tranform the children of query using the supplied function.

Tranform the children of query using the supplied function.

Attributes

Source
query.scala

Merge the given queries as a single query

Merge the given queries as a single query

Attributes

Source
query.scala
def mkPathQuery(paths: List[List[String]]): List[Query]

Construct a query which yields all the supplied paths

Construct a query which yields all the supplied paths

Attributes

Source
query.scala
def renameRoot(q: Query, rootName: String): Option[Query]

Attributes

Source
query.scala

Computes the possibly aliased result name of the supplied query if it is unique, None otherwise.

Computes the possibly aliased result name of the supplied query if it is unique, None otherwise.

Attributes

Source
query.scala

Computes the root name and optional alias of the supplied query if it is unique, None otherwise.

Computes the root name and optional alias of the supplied query if it is unique, None otherwise.

Attributes

Source
query.scala
def substChild(query: Query, newChild: Query): Option[Query]

Yields the supplied query with its the top-level field selection of the supplied replaced with newChild if it is unique, None otherwise.

Yields the supplied query with its the top-level field selection of the supplied replaced with newChild if it is unique, None otherwise.

Attributes

Source
query.scala
def ungroup(query: Query): List[Query]

Yields a list of the top level queries of the supplied, possibly grouped query.

Yields a list of the top level queries of the supplied, possibly grouped query.

Attributes

Source
query.scala