Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- class BoltValue a where
- pack :: a -> ByteString
- unpackT :: Monad m => UnpackT m a
- unpack :: Monad m => ByteString -> m a
- type UnpackT = StateT ByteString
- class ToStructure a where
- toStructure :: a -> Structure
- class FromStructure a where
- fromStructure :: Monad m => Structure -> m a
Documentation
class BoltValue a where Source #
The BoltValue
class describes values, that can be packed and unpacked for BOLT protocol.
pack :: a -> ByteString Source #
Packs a value to ByteString
unpackT :: Monad m => UnpackT m a Source #
Unpacks in a State monad to get values from single ByteString
unpack :: Monad m => ByteString -> m a Source #
Unpacks a ByteString
to selected value
Instances
BoltValue Bool Source # | |
BoltValue Double Source # | |
BoltValue Int Source # | |
BoltValue () Source # | |
Defined in Database.Bolt.Value.Instances | |
BoltValue Text Source # | |
BoltValue Value Source # | |
BoltValue Structure Source # | |
BoltValue a => BoltValue [a] Source # | |
Defined in Database.Bolt.Value.Instances | |
BoltValue a => BoltValue (Map Text a) Source # | |
type UnpackT = StateT ByteString Source #
The UnpackT
transformer helps to unpack a set of values from one ByteString
class ToStructure a where Source #
Generalizes all datatypes that can be serialized to Structure
s.
toStructure :: a -> Structure Source #
class FromStructure a where Source #
Generalizes all datatypes that can be deserialized from Structure
s.
fromStructure :: Monad m => Structure -> m a Source #
Instances
FromStructure Path Source # | |
Defined in Database.Bolt.Value.Structure | |
FromStructure URelationship Source # | |
Defined in Database.Bolt.Value.Structure fromStructure :: Monad m => Structure -> m URelationship Source # | |
FromStructure Relationship Source # | |
Defined in Database.Bolt.Value.Structure fromStructure :: Monad m => Structure -> m Relationship Source # | |
FromStructure Node Source # | |
Defined in Database.Bolt.Value.Structure |