haskell-neo4j-client-0.3.0.15: A Haskell neo4j client

Safe HaskellNone
LanguageHaskell98

Database.Neo4j.Types

Synopsis

Documentation

(<>) :: Monoid a => a -> a -> a Source

data Val Source

Type for a single value of a Neo4j property

Instances

Eq Val 
Show Val 
ToJSON Val

Specifying how to convert property single values to JSON

FromJSON Val

JSON to single property values

data PropertyValue Source

Wrapping type for a Neo4j single property or array of properties Using these types allows type checking for only correct properties that is int, double, string, boolean and single typed arrays of these, also nulls are not allowed

Instances

Eq PropertyValue 
Show PropertyValue 
ToJSON PropertyValue

Specifying how to convert property values to JSON

FromJSON PropertyValue

JSON to property values

(|:) :: PropertyValueConstructor a => Text -> a -> (Text, PropertyValue) Source

This operator allows easy construction of property value types from literals

type Properties = HashMap Text PropertyValue Source

We use hashmaps to represent Neo4j properties

emptyProperties :: HashMap Text PropertyValue Source

Shortcut for emtpy properties

urlPath :: Text -> Text Source

Tries to get the path from a URL, we try our best otherwise return the url as is

urlMinPath :: Text -> Text Source

Path without the dbdata part, useful for batch paths and such

class Entity a where Source

Class for top-level Neo4j entities (nodes and relationships) useful to have generic property management code

data Node Source

Representation of a Neo4j node, has a location URI and a set of properties

Constructors

Node 

getNodeProperties :: Node -> Properties Source

Get the properties of a node

type RelationshipType = Text Source

Type for a relationship type description

data Direction Source

Relationship direction

Constructors

Outgoing 
Incoming 
Any 

getRelProperties :: Relationship -> Properties Source

Get the properties of a relationship

getRelType :: Relationship -> RelationshipType Source

Get the type of a relationship

type Label = Text Source

Type for a label

data Index Source

Type for an index

Constructors

Index 

Instances

Eq Index 
Show Index 
FromJSON Index

JSON to Index

data Connection Source

Type for a connection

Constructors

Connection 

type Port = Int Source

newtype Neo4j a Source

Neo4j monadic type to be able to sequence neo4j commands in a connection

Constructors

Neo4j 

Fields

runNeo4j :: Connection -> IO a