greskell-0.2.0.2: Haskell binding for Gremlin graph query language

MaintainerToshio Ito <debug.ito@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Data.Greskell.Gremlin

Contents

Description

This modules defines types and functions for utility classes in Gremlin.

Synopsis

Predicate

class Predicate p where #

java.util.function.Predicate interface.

A Predicate p is a function that takes PredicateArg p and returns Bool.

Associated Types

type PredicateArg p #

Methods

pAnd :: Greskell p -> Greskell p -> Greskell p #

.and method.

pOr :: Greskell p -> Greskell p -> Greskell p #

.or method.

pTest :: Greskell p -> Greskell (PredicateArg p) -> Greskell Bool #

.test method.

pNegate :: Greskell p -> Greskell p #

.nagate method.

Instances
Predicate (P a) # 
Instance details

Defined in Data.Greskell.Gremlin

Associated Types

type PredicateArg (P a) :: * #

Methods

pAnd :: Greskell (P a) -> Greskell (P a) -> Greskell (P a) #

pOr :: Greskell (P a) -> Greskell (P a) -> Greskell (P a) #

pTest :: Greskell (P a) -> Greskell (PredicateArg (P a)) -> Greskell Bool #

pNegate :: Greskell (P a) -> Greskell (P a) #

Predicate (PredicateA a) # 
Instance details

Defined in Data.Greskell.Gremlin

Associated Types

type PredicateArg (PredicateA a) :: * #

newtype PredicateA a #

Type for anonymous class of Predicate interface.

Constructors

PredicateA 

Fields

Instances
Predicate (PredicateA a) # 
Instance details

Defined in Data.Greskell.Gremlin

Associated Types

type PredicateArg (PredicateA a) :: * #

type PredicateArg (PredicateA a) # 
Instance details

Defined in Data.Greskell.Gremlin

P class

data P a #

org.apache.tinkerpop.gremlin.process.traversal.P class.

P a keeps data of type a and compares it with data of type a given as the Predicate argument.

Instances
GraphSONTyped (P a) # 
Instance details

Defined in Data.Greskell.Gremlin

Methods

gsonTypeFor :: P a -> Text #

Predicate (P a) # 
Instance details

Defined in Data.Greskell.Gremlin

Associated Types

type PredicateArg (P a) :: * #

Methods

pAnd :: Greskell (P a) -> Greskell (P a) -> Greskell (P a) #

pOr :: Greskell (P a) -> Greskell (P a) -> Greskell (P a) #

pTest :: Greskell (P a) -> Greskell (PredicateArg (P a)) -> Greskell Bool #

pNegate :: Greskell (P a) -> Greskell (P a) #

type PredicateArg (P a) # 
Instance details

Defined in Data.Greskell.Gremlin

type PredicateArg (P a) = a

pNot :: Greskell (P a) -> Greskell (P a) #

P.not static method.

>>> toGremlin $ pNot $ pEq $ number 10
"P.not(P.eq(10.0))"

pEq :: Greskell a -> Greskell (P a) #

P.eq static method.

>>> toGremlin $ pEq $ string "hoge"
"P.eq(\"hoge\")"

pNeq :: Greskell a -> Greskell (P a) #

P.neq static method.

pLt :: Greskell a -> Greskell (P a) #

P.lt static method.

pLte :: Greskell a -> Greskell (P a) #

P.lte static method.

pGt :: Greskell a -> Greskell (P a) #

P.gt static method.

pGte :: Greskell a -> Greskell (P a) #

P.gte static method.

pInside :: Greskell a -> Greskell a -> Greskell (P a) #

P.inside static method.

>>> toGremlin $ pInside (number 10) (number 20)
"P.inside(10.0,20.0)"

pOutside :: Greskell a -> Greskell a -> Greskell (P a) #

P.outside static method.

pBetween :: Greskell a -> Greskell a -> Greskell (P a) #

P.between static method.

pWithin :: [Greskell a] -> Greskell (P a) #

P.within static method.

>>> toGremlin $ pWithin (["foo", "bar", "hoge"] :: [Greskell String])
"P.within(\"foo\",\"bar\",\"hoge\")"

pWithout :: [Greskell a] -> Greskell (P a) #

P.without static method.

Comparator

class Comparator c where #

java.util.Comparator interface.

Comparator compares two data of type CompareArg c.

Associated Types

type CompareArg c #

Methods

cCompare :: Greskell c -> Greskell (CompareArg c) -> Greskell (CompareArg c) -> Greskell Int #

.compare method.

cReversed :: Greskell c -> Greskell c #

.reverse method.

cThenComparing :: Greskell c -> Greskell c -> Greskell c #

.thenComparing method.

Instances
Comparator (Order a) #

Order a compares the type a.

Instance details

Defined in Data.Greskell.Gremlin

Associated Types

type CompareArg (Order a) :: * #

Comparator (ComparatorA a) # 
Instance details

Defined in Data.Greskell.Gremlin

Associated Types

type CompareArg (ComparatorA a) :: * #

newtype ComparatorA a #

Type for anonymous class of Comparator interface.

Constructors

ComparatorA 

Fields

Order enum

data Order a #

org.apache.tinkerpop.gremlin.process.traversal.Order enum.

Instances
GraphSONTyped (Order a) # 
Instance details

Defined in Data.Greskell.Gremlin

Methods

gsonTypeFor :: Order a -> Text #

Comparator (Order a) #

Order a compares the type a.

Instance details

Defined in Data.Greskell.Gremlin

Associated Types

type CompareArg (Order a) :: * #

type CompareArg (Order a) # 
Instance details

Defined in Data.Greskell.Gremlin

type CompareArg (Order a) = a

oDecr :: Greskell (Order a) #

decr order.

>>> toGremlin oDecr
"Order.decr"

oIncr :: Greskell (Order a) #

incr order.

oShuffle :: Greskell (Order a) #

shuffle order.