cypher-0.8.1: Haskell bindings for the neo4j "cypher" query language

Safe HaskellNone

Database.Cypher

Synopsis

Documentation

data Cypher a Source

All interaction with Neo4j is done through the Cypher monad. Use cypher to add a query to the monad.

entity_data :: Entity a -> aSource

The Haskell datatype stored in the Neo4j node or relationship

entity_id :: Entity a -> StringSource

The Neo4j node or relationship id

data Entity a Source

A neo4j node or edge

Instances

Eq (Entity a) 
Ord (Entity a) 
Show a => Show (Entity a) 
ToJSON (Entity a) 
FromJSON a => FromJSON (Entity a) 

data CypherResult a Source

Raw result data returned by Neo4j. Only use this if you care about column headers.

Constructors

CypherResult 

Fields

rescolumns :: [Text]
 
resdata :: a
 

Instances

runCypher :: Cypher a -> DBInfo -> Manager -> IO aSource

Execute some number of cypher queries

forkCypher :: Cypher () -> Cypher ()Source

Execute a request in a separate thread

cypher :: FromJSON a => Text -> Value -> Cypher aSource

Perform a cypher query

cypherGetNode :: FromJSON b => Entity b -> Cypher (Entity b)Source

Get a cypher node

cypherCreate :: (ToJSON a, FromJSON b) => a -> Cypher bSource

Create a cypher node

cypherGet :: (ToJSON a1, FromJSON a) => a1 -> Cypher aSource

Get the nodes matching the given lucene query

cypherSet :: (ToJSON a, ToJSON a1) => Entity a -> a1 -> Cypher ()Source

Set cypher properties. This currently cannot be done through cypher queries.

luceneEncode :: ToJSON a => a -> LuceneQuerySource

Convert an object to a Lucene query encoded as an ByteString.

withCypherManager :: (Manager -> ResourceT IO a) -> Cypher aSource

Get the http connection manager for a Cypher monad

data CypherException Source

An error in handling a Cypher query, either in communicating with the server or parsing the result

data DBInfo Source

Information about your neo4j configuration needed to make requests over the REST api.

Constructors

DBInfo 

newtype CypherVal a Source

A single result returned by Neo4j.

Constructors

CypherVal a 

Instances

Eq a => Eq (CypherVal a) 
Show a => Show (CypherVal a) 
FromJSON a => FromJSON (CypherVal a) 

newtype CypherVals a Source

Values returned by Neo4j.

Constructors

CypherVals [a] 

Instances

Eq a => Eq (CypherVals a) 
Show a => Show (CypherVals a) 
FromJSON a => FromJSON (CypherVals a) 

newtype CypherCol a Source

A single column returned by Neo4j.

Constructors

CypherCol a 

Instances

Eq a => Eq (CypherCol a) 
Show a => Show (CypherCol a) 
FromJSON a => FromJSON (CypherCol a) 

newtype CypherCols a Source

Columns returned by Neo4j.

Constructors

CypherCols a 

Instances

Eq a => Eq (CypherCols a) 
Show a => Show (CypherCols a) 
FromJSON a => FromJSON (CypherCols a) 

data CypherMaybe a Source

Possibly a value returned by Neo4j

Constructors

CypherJust a 
CypherNothing 

Instances

data CypherUnit Source

No value returned from Neo4j

Constructors

CypherUnit