Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    brb
    Ning Lu
    @jiangxiluning
    ok
    Brian Gates
    @brian-gates
    that test covers this case
        var transaction = cypher.transaction()
          .on('data', function (result) {
            results++;
            result.should.eql({ n: { test: true } });
          })
          .on('error', shouldNotError)
          .on('end', function() {
            results.should.eql(2);
            done();
          })
        ;
        transaction.write('match (n:Test) return n limit 1');
        transaction.write('match (n:Test) return n limit 1');
        transaction.commit();
    Ning Lu
    @jiangxiluning
    wired
    is it the problem of my node version?
    Brian Gates
    @brian-gates
    I suppose that's possible, since I'm only testing against 0.10 currently
    I'd suggest using nvm to pop down to 0.10 for a quick test
    Ning Lu
    @jiangxiluning
    forgot to mention, i did get some results returned but came out this exception
    Brian Gates
    @brian-gates
    we'll see what this comes up with brian-gates/cypher-stream#19
    Ning Lu
    @jiangxiluning
    i will test it with 0.10.0 and follow you up later
    I'll tell you my findings.
    Brian Gates
    @brian-gates
    looks like it does indeed fail :(
    not sure why
    Ning Lu
    @jiangxiluning
    so you also got it
    that's fine, just check streaming logic
    Brian Gates
    @brian-gates
    found this joyent/node#5439
    supposedly fixed by joyent/node@f2b297c
    Ning Lu
    @jiangxiluning
    I think thye change some thing about the readstream class
    yes
    Brian Gates
    @brian-gates
    these versions should be safe, in theory:
    v0.12.2 v0.12.1 v0.12.0 v0.11.16 v0.11.15 v0.11.14 v0.11.13 v0.10.38 v0.10.37 v0.10.36 v0.10.35 v0.10.34 v0.10.33 v0.10.32 v0.10.31 v0.10.30 v0.10.29 v0.10.28 v0.10.27
    Ning Lu
    @jiangxiluning
    but how could it be...
    @brian-gates cannot hold on, its 5 am at Singapore. I need a sleep now. talk to you later.
    Brian Gates
    @brian-gates
    ok see ya :)
    Ning Lu
    @jiangxiluning
    This message was deleted
    Deithrian Eharod
    @Deithrian
    Hello! :)
    Is there a way to provide username and password with cypher-stream?
    Brian Gates
    @brian-gates
    There's an open PR with that feature added, it only requires tests be added and it's good to go! brian-gates/cypher-stream#15
    Deithrian Eharod
    @Deithrian
    tyvm @brian-gates !
    Deithrian Eharod
    @Deithrian
    @brian-gates hi again! I noticed that if you make a Cypher query, that doesn't return anything at all from the db, the whole application freezes. For example If you want to check that something exists, and it doesn't, if you use "MATCH" neo4j doesn't return anything at all, in that case the ").on('data' " function waits forever, as far as I can tell, and the whole app freezes. I had to use "OPTIONAL MATCH" which returns "null" if there is no match to avoid this problem.
    I'm a beginner so maybe my code is constructed in a bad way, but just wanted to mention this :)
    Will try with promises
    Brian Gates
    @brian-gates
    @deithrian that's interesting, can you submit a failing test?
    Deithrian Eharod
    @Deithrian
    @brian-gates , I'll try
    @brian-gates , where do you submit these? : D
    This message was deleted
    I'm becoming more educated on JS, and it seems that the problem is with how I structured my code. Not 100% sure yet, but I think I'm doing things in a Sync way, not Async.
    So I'm not sure if submitting this will have any use.
    I'm not using "callbacks" in my code so it's pretty obvious to me now that It will block the entire app if it gets stuck on some part of the code.
    Deithrian Eharod
    @Deithrian
    Thus when I send a Cypher query to Neo4j and the flow of the app depends on the result of that query, and the query doesn't return a thing because "Match" doesn't return any data if it fails to find anything, the whole app sits and waits for the .on('data') which never comes : )
    I guess if I use Async code the app will continue to do other things and not completely freeze with no errors
    My code is literally "if (something) { var query= 'the query'; cypher-stream(query).on('data', function(result){ do stuff with result});"
    Deithrian Eharod
    @Deithrian
    so the "query" doesn't return anything , if it's "MATCH (a:Person{name:"Bob"}) RETURN a" and Bob doesn't exist as a node in neo4j, so everything hangs.
    Rohan Vazarkar
    @rvazarkar
    Hi @brian-gates, not sure if you're still active in here
    I posted a git issue, which I'll be happy to close if theres a simple solution
    Brian Gates
    @brian-gates
    Hi Rohan, the Slack channel is a better place :)
    @rvazarkar