Coder Social home page Coder Social logo

haskell-neo4j-rest-client's People

Contributors

asilvestre avatar benweitzman avatar eriknstevenson avatar mhitza avatar timmytofu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

haskell-neo4j-rest-client's Issues

Expose getNodeBatchId / getRelBatchId / getEntityBatchId

Currently these methods are emtpy. In particular, I want to write:

instance (NodeBatchIdentifier l, NodeBatchIdentifier r) =>
         NodeBatchIdentifier (Either l r) where
    getNodeBatchId = either getNodeBatchId getNodeBatchId

For now I have rather inconvenient duplication of code to handle the two cases.

Build failure with ghc 8.4

haskell-neo4j-client: BuildFailureException Process exited with ExitFailure 1: ./Setup build

Building library for haskell-neo4j-client-0.3.2.4..
[ 1 of 19] Compiling Database.Neo4j.Types ( src/Database/Neo4j/Types.hs, dist/bu
ild/Database/Neo4j/Types.o )

src/Database/Neo4j/Types.hs:159:42: error:
    Ambiguous occurrence ‘<>’

The same "ambiguous occurrence" error occurs ad infintum.

Function for CREATE UNIQUE

Do you think there should be function to avoid duplicated nodes? Or can this already be done somehow?

TransactionFailureException is considered a TransError?

I'm having trouble getting proper error reporting-- when I try to delete a node which has dangling connections to other nodes in the Neo4j browser client, I get an exception of type TransactionFailureException indicating that this is not possible. However, with the neo4j haskell client the same query returns a Result type, not a TransError, which falsely indicates that the node was deleted. Is this supposed to be like this?

Use with `resource-pool`?

I'm using version 0.3.2.2 and am wondering about opening a DB connection using newSecureAuthConnection in combination with the resource pool package. That package has a function:

createPool
:: IO a          -- acquire resource (open connection, e.g. "newSecureAuthConnection")
-> (a -> IO ())  -- close connection
-- ... other args...
-> IO (Pool a)

which manages the lifecycle of a pooled resource/connection. I was wondering if you had any advice on how to combine this and the Neo4j library. Or is there a different workflow that you've used?

Thanks!

Segfaults

I know this isn't the most informative issue, but one of my services is consistently exiting with code 139 when doing anything in withConnection host port . runTransaction, even just

withConnection host port . runTransaction $ return 1

it's only happening in one service and not the others, but they're all in a shared sandbox and comparing the packages loaded between the two, the one that's not working has everything the working one does, same versions (the working one has three additional, unrelated packages).

Any ideas you have as far as debugging would be welcome.

Build failure with http-client 0.5

> /tmp/stackage-build9$ stack unpack haskell-neo4j-client-0.3.2.2
Unpacked haskell-neo4j-client-0.3.2.2 to /tmp/stackage-build9/haskell-neo4j-client-0.3.2.2/
> /tmp/stackage-build9/haskell-neo4j-client-0.3.2.2$ runghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb Setup configure --package-db=clear --package-db=global --package-db=/var/stackage/work/builds/nightly/pkgdb --libdir=/var/stackage/work/builds/nightly/lib --bindir=/var/stackage/work/builds/nightly/bin --datadir=/var/stackage/work/builds/nightly/share --libexecdir=/var/stackage/work/builds/nightly/libexec --sysconfdir=/var/stackage/work/builds/nightly/etc --docdir=/var/stackage/work/builds/nightly/doc/haskell-neo4j-client-0.3.2.2 --htmldir=/var/stackage/work/builds/nightly/doc/haskell-neo4j-client-0.3.2.2 --haddockdir=/var/stackage/work/builds/nightly/doc/haskell-neo4j-client-0.3.2.2 --flags=
Configuring haskell-neo4j-client-0.3.2.2...
> /tmp/stackage-build9/haskell-neo4j-client-0.3.2.2$ runghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb Setup build
Building haskell-neo4j-client-0.3.2.2...
Preprocessing library haskell-neo4j-client-0.3.2.2...
[ 1 of 19] Compiling Database.Neo4j.Types ( src/Database/Neo4j/Types.hs, dist/build/Database/Neo4j/Types.o )
[ 2 of 19] Compiling Database.Neo4j.Http ( src/Database/Neo4j/Http.hs, dist/build/Database/Neo4j/Http.o )

src/Database/Neo4j/Http.hs:92:21: error:
    Not in scope: ‘HC.checkStatus’
    Module ‘Network.HTTP.Conduit’ does not export ‘checkStatus’.

No support for HTTP basic authentication

Currently this can be worked around by adding the following to conf/neo4j-server.properties

dbms.security.auth_enabled=false

Thank you @asilvestre for pointing this out, but obviously disabling security features is less than desirable.

Here is the relevant Neo4j documentation.

Setting up Travis CI builds/tests

Consider setting up Travis CI builds. Here's a .travis.yml that should let you get easily started

language: haskell
services:
  - neo4j
ghc:
  - 7.10
  - 7.8

runBatch doesn't throw exceptions, only throws if result is evaluated

If you do runNeo4j (void $ runBatch f) conn, even if the batch fails you never get exceptions. This is extremely surprising and counterintuitive for the user. Generally, you should avoid error and throw in most code, throwing exceptions from pure values is terrible for API users, we do not expect it. In particular, it is unexpected that something that essentially lives in IO would use throw rather than throwIO.

This is a very common pattern, since you rarely care about the Graph that results from a batch operation.

I think the quick fix would be to use $! after the return in the definition of runBatch, but it would be better to use throwIO.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.