Safe Haskell | None |
---|---|
Language | Haskell98 |
- (<>) :: Monoid a => a -> a -> a
- data Val
- data PropertyValue
- = ValueProperty Val
- | ArrayProperty [Val]
- class PropertyValueConstructor a where
- newval :: a -> PropertyValue
- (|:) :: PropertyValueConstructor a => Text -> a -> (Text, PropertyValue)
- type Properties = HashMap Text PropertyValue
- emptyProperties :: HashMap Text PropertyValue
- urlPath :: Text -> Text
- urlMinPath :: Text -> Text
- data EntityObj
- class Entity a where
- entityPath :: a -> ByteString
- propertyPath :: a -> ByteString
- getEntityProperties :: a -> Properties
- setEntityProperties :: a -> Properties -> a
- entityObj :: a -> EntityObj
- newtype NodeUrl = NodeUrl {
- runNodeUrl :: Text
- data Node = Node {}
- getNodeProperties :: Node -> Properties
- nodeAPI :: ByteString
- nodeAPITxt :: Text
- newtype NodePath = NodePath {
- runNodePath :: Text
- class NodeIdentifier a where
- getNodePath :: a -> NodePath
- runNodeIdentifier :: NodeIdentifier a => a -> ByteString
- type RelationshipType = Text
- data Direction
- newtype RelUrl = RelUrl {}
- data Relationship = Relationship {}
- getRelProperties :: Relationship -> Properties
- getRelType :: Relationship -> RelationshipType
- relationshipAPI :: ByteString
- relationshipAPITxt :: Text
- newtype RelPath = RelPath {
- runRelPath :: Text
- class RelIdentifier a where
- getRelPath :: a -> RelPath
- runRelIdentifier :: RelIdentifier a => a -> ByteString
- data EntityPath
- class EntityIdentifier a where
- getEntityPath :: a -> EntityPath
- type Label = Text
- data Index = Index {
- indexLabel :: Label
- indexProperties :: [Text]
- data Neo4jException
- data Connection = Connection {}
- type Hostname = ByteString
- type Port = Int
- newtype Neo4j a = Neo4j {
- runNeo4j :: Connection -> IO a
Documentation
Type for a single value of a Neo4j property
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
Eq PropertyValue | |
Show PropertyValue | |
ToJSON PropertyValue | Specifying how to convert property values to JSON |
FromJSON PropertyValue | JSON to property values |
class PropertyValueConstructor a where Source
This class allows easy construction of property value types from literals
newval :: a -> PropertyValue Source
(|:) :: 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 for top-level Neo4j entities (nodes and relationships) useful to have generic property management code
entityPath :: a -> ByteString Source
propertyPath :: a -> ByteString Source
getEntityProperties :: a -> Properties Source
setEntityProperties :: a -> Properties -> a Source
Representation of a Neo4j node, has a location URI and a set of properties
getNodeProperties :: Node -> Properties Source
Get the properties of a node
nodeAPITxt :: Text Source
class NodeIdentifier a where Source
getNodePath :: a -> NodePath Source
runNodeIdentifier :: NodeIdentifier a => a -> ByteString Source
type RelationshipType = Text Source
Type for a relationship type description
Type for a relationship location
data Relationship Source
Type for a Neo4j relationship, has a location URI, a relationship type, a starting node and a destination node
Relationship | |
|
getRelProperties :: Relationship -> Properties Source
Get the properties of a relationship
getRelType :: Relationship -> RelationshipType Source
Get the type of a relationship
class RelIdentifier a where Source
getRelPath :: a -> RelPath Source
runRelIdentifier :: RelIdentifier a => a -> ByteString Source
class EntityIdentifier a where Source
getEntityPath :: a -> EntityPath Source
Type for an index
Index | |
|
data Neo4jException Source
Exceptions this library can raise
type Hostname = ByteString Source