Maintainer | Toshio Ito <debug.ito@gmail.com> |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This modules defines types and functions for utility classes in Gremlin.
Synopsis
- class Predicate p where
- newtype PredicateA a = PredicateA {
- unPredicateA :: a -> Bool
- data P a
- class ToGreskell (PParameter p) => PLike p where
- type PParameter p
- pNot :: PLike p => Greskell p -> Greskell p
- pEq :: PLike p => PParameter p -> Greskell p
- pNeq :: PLike p => PParameter p -> Greskell p
- pLt :: PLike p => PParameter p -> Greskell p
- pLte :: PLike p => PParameter p -> Greskell p
- pGt :: PLike p => PParameter p -> Greskell p
- pGte :: PLike p => PParameter p -> Greskell p
- pInside :: PLike p => PParameter p -> PParameter p -> Greskell p
- pOutside :: PLike p => PParameter p -> PParameter p -> Greskell p
- pBetween :: PLike p => PParameter p -> PParameter p -> Greskell p
- pWithin :: PLike p => [PParameter p] -> Greskell p
- pWithout :: PLike p => [PParameter p] -> Greskell p
- class Comparator c where
- type CompareArg c
- cCompare :: Greskell c -> Greskell (CompareArg c) -> Greskell (CompareArg c) -> Greskell Int
- cReversed :: Greskell c -> Greskell c
- cThenComparing :: Greskell c -> Greskell c -> Greskell c
- newtype ComparatorA a = ComparatorA {
- unComparatorA :: a -> a -> Int
- data Order a
- oDesc :: Greskell (Order a)
- oAsc :: Greskell (Order a)
- oDecr :: Greskell (Order a)
- oIncr :: Greskell (Order a)
- oShuffle :: Greskell (Order a)
- examples :: [(Text, Text)]
Predicate
class Predicate p where Source #
java.util.function.Predicate
interface.
A Predicate
p
is a function that takes PredicateArg
p
and
returns Bool
.
Nothing
type PredicateArg p Source #
pAnd :: Greskell p -> Greskell p -> Greskell p Source #
.and
method.
pOr :: Greskell p -> Greskell p -> Greskell p Source #
.or
method.
pTest :: Greskell p -> Greskell (PredicateArg p) -> Greskell Bool Source #
.test
method.
pNegate :: Greskell p -> Greskell p Source #
.nagate
method.
Instances
Predicate (P a) Source # | |
Defined in Data.Greskell.Gremlin type PredicateArg (P a) Source # | |
Predicate (PredicateA a) Source # | |
Defined in Data.Greskell.Gremlin type PredicateArg (PredicateA a) Source # pAnd :: Greskell (PredicateA a) -> Greskell (PredicateA a) -> Greskell (PredicateA a) Source # pOr :: Greskell (PredicateA a) -> Greskell (PredicateA a) -> Greskell (PredicateA a) Source # pTest :: Greskell (PredicateA a) -> Greskell (PredicateArg (PredicateA a)) -> Greskell Bool Source # pNegate :: Greskell (PredicateA a) -> Greskell (PredicateA a) Source # |
newtype PredicateA a Source #
Type for anonymous class of Predicate
interface.
PredicateA | |
|
Instances
Predicate (PredicateA a) Source # | |
Defined in Data.Greskell.Gremlin type PredicateArg (PredicateA a) Source # pAnd :: Greskell (PredicateA a) -> Greskell (PredicateA a) -> Greskell (PredicateA a) Source # pOr :: Greskell (PredicateA a) -> Greskell (PredicateA a) -> Greskell (PredicateA a) Source # pTest :: Greskell (PredicateA a) -> Greskell (PredicateArg (PredicateA a)) -> Greskell Bool Source # pNegate :: Greskell (PredicateA a) -> Greskell (PredicateA a) Source # | |
type PredicateArg (PredicateA a) Source # | |
Defined in Data.Greskell.Gremlin |
P class
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
PLike (P a) Source # | You can construct |
Defined in Data.Greskell.Gremlin type PParameter (P a) Source # | |
Predicate (P a) Source # | |
Defined in Data.Greskell.Gremlin type PredicateArg (P a) Source # | |
GraphSONTyped (P a) Source # | |
Defined in Data.Greskell.Gremlin gsonTypeFor :: P a -> Text # | |
type PParameter (P a) Source # | |
Defined in Data.Greskell.Gremlin | |
type PredicateArg (P a) Source # | |
Defined in Data.Greskell.Gremlin |
class ToGreskell (PParameter p) => PLike p Source #
Type that is compatible with P
. You can construct a value of
type Greskell p
using values of PParameter p
.
Note that the type of constuctor arguments (i.e. GreskellReturn (PParameter p)
)
should implement Java's Comparable
interface. This is true for most types,
so greskell doesn't have any explicit constraint about it.
Since: 1.2.0.0
type PParameter p Source #
Instances
PLike (LabeledP a) Source # | You can construct |
Defined in Data.Greskell.AsLabel type PParameter (LabeledP a) Source # | |
PLike (P a) Source # | You can construct |
Defined in Data.Greskell.Gremlin type PParameter (P a) Source # |
pInside :: PLike p => PParameter p -> PParameter p -> Greskell p Source #
P.inside
static method.
pOutside :: PLike p => PParameter p -> PParameter p -> Greskell p Source #
P.outside
static method.
pBetween :: PLike p => PParameter p -> PParameter p -> Greskell p Source #
P.between
static method.
Comparator
class Comparator c where Source #
java.util.Comparator
interface.
Comparator
compares two data of type CompareArg
c
.
Nothing
type CompareArg c Source #
cCompare :: Greskell c -> Greskell (CompareArg c) -> Greskell (CompareArg c) -> Greskell Int Source #
.compare
method.
cReversed :: Greskell c -> Greskell c Source #
.reversed
method.
cThenComparing :: Greskell c -> Greskell c -> Greskell c Source #
.thenComparing
method.
Instances
Comparator (ComparatorA a) Source # | |
Defined in Data.Greskell.Gremlin type CompareArg (ComparatorA a) Source # cCompare :: Greskell (ComparatorA a) -> Greskell (CompareArg (ComparatorA a)) -> Greskell (CompareArg (ComparatorA a)) -> Greskell Int Source # cReversed :: Greskell (ComparatorA a) -> Greskell (ComparatorA a) Source # cThenComparing :: Greskell (ComparatorA a) -> Greskell (ComparatorA a) -> Greskell (ComparatorA a) Source # | |
Comparator (Order a) Source # |
|
Defined in Data.Greskell.Gremlin type CompareArg (Order a) Source # |
newtype ComparatorA a Source #
Type for anonymous class of Comparator
interface.
ComparatorA | |
|
Instances
Comparator (ComparatorA a) Source # | |
Defined in Data.Greskell.Gremlin type CompareArg (ComparatorA a) Source # cCompare :: Greskell (ComparatorA a) -> Greskell (CompareArg (ComparatorA a)) -> Greskell (CompareArg (ComparatorA a)) -> Greskell Int Source # cReversed :: Greskell (ComparatorA a) -> Greskell (ComparatorA a) Source # cThenComparing :: Greskell (ComparatorA a) -> Greskell (ComparatorA a) -> Greskell (ComparatorA a) Source # | |
type CompareArg (ComparatorA a) Source # | |
Defined in Data.Greskell.Gremlin |
Order enum
org.apache.tinkerpop.gremlin.process.traversal.Order
enum.
Instances
Comparator (Order a) Source # |
|
Defined in Data.Greskell.Gremlin type CompareArg (Order a) Source # | |
GraphSONTyped (Order a) Source # | |
Defined in Data.Greskell.Gremlin gsonTypeFor :: Order a -> Text # | |
type CompareArg (Order a) Source # | |
Defined in Data.Greskell.Gremlin |
oDecr :: Greskell (Order a) Source #
decr
order.
Note that decr
was removed in TinkerPop 3.5.0. Use oDesc
instead.
oIncr :: Greskell (Order a) Source #
incr
order.
Note that incr
was removed in TinkerPop 3.5.0. Use oAsc
instead.