Git Product home page Git Product logo

Comments (10)

dr-dimitru avatar dr-dimitru commented on May 29, 2024

Hello @bummo ,

Could you please provide sample data, and a cypher query, which causes such results

from neo4j-fiber.

ogroppo avatar ogroppo commented on May 29, 2024

Any data, query is simply
var d = db.query("MATCH (n) RETURN collect(n)").fetch()[0];
console.log(d); // { 'collect(n)': [{...},{...}] }

Just noticed other issue:
If I give an alias to the collection e.g "MATCH (n) RETURN collect(n) as nodes" the result is
{ nodes: undefined }

from neo4j-fiber.

dr-dimitru avatar dr-dimitru commented on May 29, 2024

Hello @bummo ,

Sorry for delay with publish, faced hardware malfunction, had to fix my old Mac.

Please test it on your end, let me know if it's solved for you

from neo4j-fiber.

ogroppo avatar ogroppo commented on May 29, 2024

Hi @dr-dimitru,

I think we are getting there, however, the collect function now returns a Neo4jNode Class, which is again not what expected because the query has been run with '.fetch()' so the outcome should not be a cursor.
So for every collect query an iterative '.get()' function has to be called to get the actual node.

Let me know if this is going to be complicated & Thanks for update

from neo4j-fiber.

dr-dimitru avatar dr-dimitru commented on May 29, 2024

Hello @bummo ,

You're right, going to fix it now

from neo4j-fiber.

dr-dimitru avatar dr-dimitru commented on May 29, 2024

Hello @bummo ,

Should be fixed now, feel free to reopen this issue.
Thank you for your patience.

from neo4j-fiber.

ogroppo avatar ogroppo commented on May 29, 2024

Thanks @dr-dimitru, works nicely.

I've just noticed that labels are returned as an indexed object rather than an array of strings, not a big deal of course, just a remark.

from neo4j-fiber.

dr-dimitru avatar dr-dimitru commented on May 29, 2024

Hello @bummo ,

labels are returned as an indexed object rather than an array of strings

With the same query?

MATCH (n) RETURN collect(n)

from neo4j-fiber.

ogroppo avatar ogroppo commented on May 29, 2024

@dr-dimitru apologies... my debugger considers Arrays as Objects. (which is technically true)

from neo4j-fiber.

dr-dimitru avatar dr-dimitru commented on May 29, 2024

@bummo no worries, thank you for contribution.

from neo4j-fiber.

Related Issues (4)

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.