packages feed

haskell-neo4j-client 0.2.2.0 → 0.2.3.0

raw patch · 4 files changed

+19/−5 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Database.Neo4j: class EntityIdentifier a
+ Database.Neo4j: class NodeIdentifier a
+ Database.Neo4j: class RelIdentifier a
+ Database.Neo4j: data NodePath
+ Database.Neo4j: data RelPath
+ Database.Neo4j.Batch: class BatchEntity a

Files

haskell-neo4j-client.cabal view
@@ -1,5 +1,5 @@ name:                haskell-neo4j-client-version:             0.2.2.0+version:             0.2.3.0 synopsis:            A Haskell neo4j client description:              Library to interact with Neo4j databases. For now, its API covers basic operations for nodes, relationships, labels
src/Database/Neo4j.hs view
@@ -23,13 +23,14 @@     Val(..), PropertyValue(..), newval, (|:), Properties, emptyProperties, getProperties, getProperty, setProperties,         setProperty, deleteProperties, deleteProperty,      -- * Managing nodes-    Node, getNodeProperties, createNode, getNode, deleteNode, nodeId, nodePath, runNodeIdentifier,+    Node, getNodeProperties, createNode, getNode, deleteNode, nodeId, nodePath, runNodeIdentifier, NodeIdentifier,+    NodePath,     -- * Managing relationships     Relationship, Direction(..), RelationshipType, createRelationship, getRelationship, deleteRelationship,         getRelationships, relId, relPath, allRelationshipTypes, getRelProperties, getRelType, runRelIdentifier,-        getRelationshipFrom, getRelationshipTo,+        getRelationshipFrom, getRelationshipTo, RelIdentifier, RelPath,     -- * Managing labels and getting nodes by label-    Label, allLabels, getLabels, getNodesByLabelAndProperty, addLabels, changeLabels, removeLabel,+    EntityIdentifier, Label, allLabels, getLabels, getNodesByLabelAndProperty, addLabels, changeLabels, removeLabel,     -- * Indexes     Index(..), createIndex, getIndexes, dropIndex,     -- * Exceptions
src/Database/Neo4j/Batch.hs view
@@ -6,7 +6,7 @@     -- $use          -- * General-    Batch, runBatch, BatchFuture(..), NodeBatchIdentifier, RelBatchIdentifier,+    Batch, runBatch, BatchFuture(..), NodeBatchIdentifier, RelBatchIdentifier, BatchEntity,     -- * Nodes     createNode, getNode, deleteNode,     -- * Relationships
src/Database/Neo4j/Types.hs view
@@ -9,6 +9,7 @@ import Data.Int (Int64) import Data.Maybe (fromMaybe) import Data.Monoid (Monoid, mappend)+import Data.String (fromString) import Data.Typeable (Typeable) import Control.Exception.Base (Exception) import Control.Applicative ((<$>), (<*>))@@ -154,6 +155,9 @@ nodeAPI :: S.ByteString nodeAPI = "/db/data/node" +nodeAPITxt :: T.Text+nodeAPITxt = "/db/data/node"+ newtype NodePath = NodePath {runNodePath :: T.Text} deriving (Show, Eq, Generic) instance Hashable NodePath @@ -166,6 +170,9 @@ instance NodeIdentifier S.ByteString where     getNodePath t = NodePath $ TE.decodeUtf8 $ nodeAPI <> "/" <> t +instance NodeIdentifier Integer where+    getNodePath n = NodePath $ nodeAPITxt <> "/" <> (fromString . show) n+ instance NodeIdentifier NodePath where     getNodePath = id @@ -232,6 +239,9 @@ relationshipAPI :: S.ByteString relationshipAPI = "/db/data/relationship" +relationshipAPITxt :: T.Text+relationshipAPITxt = "/db/data/relationship"+ newtype RelPath = RelPath {runRelPath :: T.Text} deriving (Show, Eq, Generic) instance Hashable RelPath @@ -249,6 +259,9 @@  instance RelIdentifier RelUrl where     getRelPath = RelPath . urlPath . runRelUrl++instance RelIdentifier Integer where+    getRelPath n = RelPath $ relationshipAPITxt <> "/" <> (fromString . show) n  runRelIdentifier :: RelIdentifier a => a -> S.ByteString runRelIdentifier = TE.encodeUtf8 . runRelPath . getRelPath