greskell-core-0.1.2.6: Haskell binding for Gremlin graph query language - core data types and tools

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

Data.Greskell.GraphSON.GValue

Contents

Description

This module is for advanced use. Most users should just use Data.Greskell.GraphSON.

This module defines GValue and exposes its deconstructors.

Since: 0.1.2.0

Synopsis

GValue type

newtype GValue Source #

An Aeson Value wrapped in GraphSON wrapper type. Basically this type is the Haskell representaiton of a GraphSON-encoded document.

This type is used to parse GraphSON documents. See also FromGraphSON class.

Since: 0.1.2.0

Constructors

GValue 
Instances
Eq GValue Source # 
Instance details

Defined in Data.Greskell.GraphSON.GValue

Methods

(==) :: GValue -> GValue -> Bool #

(/=) :: GValue -> GValue -> Bool #

Show GValue Source # 
Instance details

Defined in Data.Greskell.GraphSON.GValue

Generic GValue Source # 
Instance details

Defined in Data.Greskell.GraphSON.GValue

Associated Types

type Rep GValue :: Type -> Type #

Methods

from :: GValue -> Rep GValue x #

to :: Rep GValue x -> GValue #

Hashable GValue Source # 
Instance details

Defined in Data.Greskell.GraphSON.GValue

Methods

hashWithSalt :: Int -> GValue -> Int #

hash :: GValue -> Int #

ToJSON GValue Source #

Reconstruct Value from GValue. It preserves all GraphSON wrappers.

Instance details

Defined in Data.Greskell.GraphSON.GValue

FromJSON GValue Source #

Parse GraphSON wrappers recursively in Value, making it into GValue.

Instance details

Defined in Data.Greskell.GraphSON.GValue

FromGraphSON GValue Source # 
Instance details

Defined in Data.Greskell.GraphSON

type Rep GValue Source # 
Instance details

Defined in Data.Greskell.GraphSON.GValue

type Rep GValue = D1 (MetaData "GValue" "Data.Greskell.GraphSON.GValue" "greskell-core-0.1.2.6-92DrHV9tow4E0BlfENH5Ae" True) (C1 (MetaCons "GValue" PrefixI True) (S1 (MetaSel (Just "unGValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (GraphSON GValueBody))))

data GValueBody Source #

GValue without the top-level GraphSON wrapper.

Since: 0.1.2.0

Instances
Eq GValueBody Source # 
Instance details

Defined in Data.Greskell.GraphSON.GValue

Show GValueBody Source # 
Instance details

Defined in Data.Greskell.GraphSON.GValue

Generic GValueBody Source # 
Instance details

Defined in Data.Greskell.GraphSON.GValue

Associated Types

type Rep GValueBody :: Type -> Type #

Hashable GValueBody Source # 
Instance details

Defined in Data.Greskell.GraphSON.GValue

ToJSON GValueBody Source # 
Instance details

Defined in Data.Greskell.GraphSON.GValue

type Rep GValueBody Source # 
Instance details

Defined in Data.Greskell.GraphSON.GValue

constructors

nonTypedGValue :: GValueBody -> GValue Source #

Create a GValue without "@type" field.

Since: 0.1.2.0

typedGValue' Source #

Arguments

:: Text

"@type" field.

-> GValueBody 
-> GValue 

Create a GValue with the given "@type" field.

Since: 0.1.2.0

deconstructors

In most cases, you should not use these deconstructors. That is because internal structure of GValue may vary depending on the Gremlin server instance and its serializer. You should instead use parsers based on FromGraphSON class, such as parseEither.

If you are implementing parsers for GraphSON objects described in Gremlin IO Reference (http://tinkerpop.apache.org/docs/current/dev/io/), you may use these descructors.

unwrapAll :: GValue -> Value Source #

Remove all GraphSON wrappers recursively from GValue.

Since: 0.1.2.0

unwrapOne :: GValue -> Value Source #

Remove the top-level GraphSON wrapper, but leave other wrappers as-is. The remaining wrappers are reconstructed by toJSON to make them into Value.

Since: 0.1.2.0

gValueBody :: GValue -> GValueBody Source #

Get the GValueBody from GValue.

Since: 0.1.2.0

gValueType :: GValue -> Maybe Text Source #

Get the gsonType field from GValue.

Since: 0.1.2.0