Maintainer | Toshio Ito <debug.ito@gmail.com> |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module defines types and functions about TinkerPop graph structure API.
Synopsis
- class ElementData e => Element e where
- type ElementProperty e :: Type -> Type
- type ElementPropertyContainer e :: Type -> Type
- class ElementData e where
- elementId :: e -> ElementID e
- elementLabel :: e -> Text
- newtype ElementID e = ElementID {}
- unsafeCastElementID :: ElementID a -> ElementID b
- class Element v => Vertex v
- class Element e => Edge e
- class Property p where
- propertyKey :: p v -> Text
- propertyValue :: p v -> v
- data T a b
- tId :: Element a => Greskell (T a (ElementID a))
- tKey :: (Element (p v), Property p) => Greskell (T (p v) Text)
- tLabel :: Element a => Greskell (T a Text)
- tValue :: (Element (p v), Property p) => Greskell (T (p v) v)
- data Cardinality
- cList :: Greskell Cardinality
- cSet :: Greskell Cardinality
- cSingle :: Greskell Cardinality
- newtype Key a b = Key {}
- key :: Text -> Key a b
- unsafeCastKey :: Key a1 b1 -> Key a2 b2
- data KeyValue a where
- (=:) :: Key a b -> Greskell b -> KeyValue a
- data Keys a where
- singletonKeys :: Key a b -> Keys a
- toGremlinKeys :: Keys a -> [Text]
- (-:) :: Key a b -> Keys a -> Keys a
- newtype Path a = Path {}
- data PathEntry a = PathEntry {}
- pathToPMap :: Path a -> PMap Multi a
- makePathEntry :: [AsLabel a] -> a -> PathEntry a
- data AVertex = AVertex {}
- data AEdge = AEdge {}
- data AVertexProperty v = AVertexProperty {}
- data AProperty v = AProperty {}
- examples :: [(Text, Text)]
Element
class ElementData e => Element e Source #
org.apache.tinkerpop.gremlin.structure.Element
interface in a
TinkerPop graph.
Since greskell-1.0.0.0, ElementData
is a super-class of
Element
.
type ElementProperty e :: Type -> Type Source #
type ElementPropertyContainer e :: Type -> Type Source #
Container type of the properties of the Element
. It should be
of NonEmptyLike
class.
Since: 1.0.0.0
Instances
Element AEdge Source # | |
Defined in Data.Greskell.Graph | |
Element AVertex Source # | |
Defined in Data.Greskell.Graph | |
Element (AVertexProperty v) Source # | |
Defined in Data.Greskell.Graph type ElementProperty (AVertexProperty v) :: Type -> Type Source # type ElementPropertyContainer (AVertexProperty v) :: Type -> Type Source # |
class ElementData e where Source #
Types that keep reference to TinkerPop graph Elements.
Since: 1.0.0.0
elementId :: e -> ElementID e Source #
ID of this Element.
elementLabel :: e -> Text Source #
Label of this Element.
Instances
ElementData AEdge Source # | Since: 1.0.0.0 |
ElementData AVertex Source # | Since: 1.0.0.0 |
ElementData (AVertexProperty v) Source # | Since: 1.0.0.0 |
Defined in Data.Greskell.Graph elementId :: AVertexProperty v -> ElementID (AVertexProperty v) Source # elementLabel :: AVertexProperty v -> Text Source # |
ID of a graph element e
(vertex, edge and vertex property).
Although the internal of ElementID
is exposed, you should treat it as an opaque value. That's
because it depends on graph implementation.
Since: 1.0.0.0
Instances
Functor ElementID Source # | Unsafely convert the element type. |
FromJSON (ElementID e) Source # | |
ToJSON (ElementID e) Source # | |
Defined in Data.Greskell.Graph | |
Generic (ElementID e) Source # | |
Show (ElementID e) Source # | |
Eq (ElementID e) Source # | |
FromGraphSON (ElementID e) Source # | |
Defined in Data.Greskell.Graph parseGraphSON :: GValue -> Parser (ElementID e) # | |
Hashable (ElementID e) Source # | |
Defined in Data.Greskell.Graph | |
type Rep (ElementID e) Source # | |
Defined in Data.Greskell.Graph |
unsafeCastElementID :: ElementID a -> ElementID b Source #
Unsafely cast the phantom type of ElementID
.
Since: 1.0.0.0
class Element v => Vertex v Source #
org.apache.tinkerpop.gremlin.structure.Vertex
interface in a
TinkerPop graph.
Instances
Vertex AVertex Source # | |
Defined in Data.Greskell.Graph |
class Element e => Edge e Source #
org.apache.tinkerpop.gremlin.structure.Edge
interface in a
TinkerPop graph.
Instances
Edge AEdge Source # | |
Defined in Data.Greskell.Graph |
Property
class Property p where Source #
org.apache.tinkerpop.gremlin.structure.Property
interface in a
TinkerPop graph.
propertyKey :: p v -> Text Source #
Get key of this property.
propertyValue :: p v -> v Source #
Get value of this property.
Instances
Property AProperty Source # | |
Defined in Data.Greskell.Graph propertyKey :: AProperty v -> Text Source # propertyValue :: AProperty v -> v Source # | |
Property AVertexProperty Source # | |
Defined in Data.Greskell.Graph propertyKey :: AVertexProperty v -> Text Source # propertyValue :: AVertexProperty v -> v Source # |
T Enum
org.apache.tinkerpop.gremlin.structure.T
enum.
T
is a token to get data b
from an Element a
.
Instances
ProjectionLike (Greskell (T s e)) Source # | |
Defined in Data.Greskell.GTraversal type ProjectionLikeStart (Greskell (T s e)) Source # type ProjectionLikeEnd (Greskell (T s e)) Source # | |
GraphSONTyped (T a b) Source # | |
Defined in Data.Greskell.Graph gsonTypeFor :: T a b -> Text # | |
type ProjectionLikeEnd (Greskell (T s e)) Source # | |
Defined in Data.Greskell.GTraversal | |
type ProjectionLikeStart (Greskell (T s e)) Source # | |
Defined in Data.Greskell.GTraversal |
Cardinality Enum
data Cardinality Source #
org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality
enum.
Since: 0.2.0.0
cList :: Greskell Cardinality Source #
list
Cardinality.
Since: 0.2.0.0
cSet :: Greskell Cardinality Source #
set
Cardinality.
Since: 0.2.0.0
cSingle :: Greskell Cardinality Source #
single
Cardinality.
Since: 0.2.0.0
Typed Key (accessor of a Property)
A property key accessing value b
in an Element a
. In Gremlin,
it's just a String type.
Since greskell-1.0.0.0, Key
is newtype of Text
. Before that, it
was newtype of Greskell
Text
.
Instances
Functor (Key a) Source # | Unsafely convert the value type |
IsString (Key a b) Source # | |
Defined in Data.Greskell.Graph fromString :: String -> Key a b # | |
Show (Key a b) Source # | |
Eq (Key a b) Source # | |
ProjectionLike (Key s e) Source # | |
Defined in Data.Greskell.GTraversal type ProjectionLikeStart (Key s e) Source # type ProjectionLikeEnd (Key s e) Source # | |
PMapKey (Key a b) Source # | Since: 1.0.0.0 |
ToGreskell (Key a b) Source # | Return Gremlin String literal. |
Defined in Data.Greskell.Graph type GreskellReturn (Key a b) # toGreskell :: Key a b -> Greskell (GreskellReturn (Key a b)) # | |
type ProjectionLikeEnd (Key s e) Source # | |
Defined in Data.Greskell.GTraversal | |
type ProjectionLikeStart (Key s e) Source # | |
Defined in Data.Greskell.GTraversal | |
type PMapValue (Key a b) Source # | |
Defined in Data.Greskell.Graph | |
type GreskellReturn (Key a b) Source # | |
Defined in Data.Greskell.Graph |
unsafeCastKey :: Key a1 b1 -> Key a2 b2 Source #
Unsafely cast the type signature of the Key
.
Since: 1.0.0.0
Key-value pair
Heterogeneous list of keys
Heterogeneous list of Key
s. It keeps the parent type a
, but
discards the value type b
.
Since: 1.0.0.0
Path
org.apache.tinkerpop.gremlin.process.traversal.Path
interface.
Since: 1.1.0.0
Instances
Foldable Path Source # | |
Defined in Data.Greskell.Graph fold :: Monoid m => Path m -> m # foldMap :: Monoid m => (a -> m) -> Path a -> m # foldMap' :: Monoid m => (a -> m) -> Path a -> m # foldr :: (a -> b -> b) -> b -> Path a -> b # foldr' :: (a -> b -> b) -> b -> Path a -> b # foldl :: (b -> a -> b) -> b -> Path a -> b # foldl' :: (b -> a -> b) -> b -> Path a -> b # foldr1 :: (a -> a -> a) -> Path a -> a # foldl1 :: (a -> a -> a) -> Path a -> a # elem :: Eq a => a -> Path a -> Bool # maximum :: Ord a => Path a -> a # | |
Traversable Path Source # | |
Functor Path Source # | |
FromGraphSON a => FromJSON (Path a) Source # | |
Monoid (Path a) Source # | |
Semigroup (Path a) Source # | |
Show a => Show (Path a) Source # | |
Eq a => Eq (Path a) Source # | |
Ord a => Ord (Path a) Source # | |
AsIterator (Path a) Source # |
|
Defined in Data.Greskell.Graph type IteratorItem (Path a) # | |
FromGraphSON a => FromGraphSON (Path a) Source # | |
Defined in Data.Greskell.Graph parseGraphSON :: GValue -> Parser (Path a) # | |
GraphSONTyped (Path a) Source # | |
Defined in Data.Greskell.Graph gsonTypeFor :: Path a -> Text # | |
type IteratorItem (Path a) Source # | |
Defined in Data.Greskell.Graph |
An entry in a Path
.
Since: 1.1.0.0
Instances
Foldable PathEntry Source # | |
Defined in Data.Greskell.Graph fold :: Monoid m => PathEntry m -> m # foldMap :: Monoid m => (a -> m) -> PathEntry a -> m # foldMap' :: Monoid m => (a -> m) -> PathEntry a -> m # foldr :: (a -> b -> b) -> b -> PathEntry a -> b # foldr' :: (a -> b -> b) -> b -> PathEntry a -> b # foldl :: (b -> a -> b) -> b -> PathEntry a -> b # foldl' :: (b -> a -> b) -> b -> PathEntry a -> b # foldr1 :: (a -> a -> a) -> PathEntry a -> a # foldl1 :: (a -> a -> a) -> PathEntry a -> a # toList :: PathEntry a -> [a] # length :: PathEntry a -> Int # elem :: Eq a => a -> PathEntry a -> Bool # maximum :: Ord a => PathEntry a -> a # minimum :: Ord a => PathEntry a -> a # | |
Traversable PathEntry Source # | |
Functor PathEntry Source # | |
Show a => Show (PathEntry a) Source # | |
Eq a => Eq (PathEntry a) Source # | |
Ord a => Ord (PathEntry a) Source # | |
Defined in Data.Greskell.Graph |
Concrete data types
Graph structure data types based on Aeson.
You can use those types directly in your programs. You can also
define your own graph types by wrapping those with newtype
. See
README.md
for detail.
Historical note:
General vertex type you can use for Vertex
class.
Instances
FromJSON AVertex Source # | |
Show AVertex Source # | |
Eq AVertex Source # | |
Element AVertex Source # | |
Defined in Data.Greskell.Graph | |
ElementData AVertex Source # | Since: 1.0.0.0 |
Vertex AVertex Source # | |
Defined in Data.Greskell.Graph | |
FromGraphSON AVertex Source # | |
Defined in Data.Greskell.Graph parseGraphSON :: GValue -> Parser AVertex # | |
GraphSONTyped AVertex Source # | |
Defined in Data.Greskell.Graph gsonTypeFor :: AVertex -> Text # | |
type ElementProperty AVertex Source # | |
Defined in Data.Greskell.Graph | |
type ElementPropertyContainer AVertex Source # | |
Defined in Data.Greskell.Graph |
Edge
General edge type you can use for Edge
class.
Instances
FromJSON AEdge Source # | |
Show AEdge Source # | |
Eq AEdge Source # | |
Edge AEdge Source # | |
Defined in Data.Greskell.Graph | |
Element AEdge Source # | |
Defined in Data.Greskell.Graph | |
ElementData AEdge Source # | Since: 1.0.0.0 |
FromGraphSON AEdge Source # | |
Defined in Data.Greskell.Graph parseGraphSON :: GValue -> Parser AEdge # | |
GraphSONTyped AEdge Source # | |
Defined in Data.Greskell.Graph gsonTypeFor :: AEdge -> Text # | |
type ElementProperty AEdge Source # | |
Defined in Data.Greskell.Graph | |
type ElementPropertyContainer AEdge Source # | |
Defined in Data.Greskell.Graph |
VertexProperty
data AVertexProperty v Source #
General vertex property type you can use for VertexProperty.
If you are not sure about the type v
, just use GValue
.
Instances
Property
General simple property type you can use for Property
class.
If you are not sure about the type v
, just use GValue
.