Giter Site home page Giter Site logo

Comments (2)

jasperblues avatar jasperblues commented on June 6, 2024

Hi @joeykilpatrick Thanks for reporting.

Drivine has a default result mapper. Given the goal of creating a library that supports building graph-powered REST APIs and similar, the rationale is to make 80% of such cases simpler and 20% possible.

It is possible to do what you would like. Here are some options:

Return the Id and Label Properties from Query:

MATCH (actor:Person {name: $1})
WITH actor, [(actor)-[:ACTED_IN]-(movie:Movie) | movie {.title, .tagline, .released}] as movies
RETURN {
         id: id(actor),  <--- HERE 
         labels: labels(actor), <-- AND HERE
         actor:  actor,
         movies: movies
       }

Plug in Your Own Result Mapper

Rather than use the default result mapper you can plug in your own. Would you like to contribute an alternative mapper that:

  • Does what you want.
  • Users can specify as a config options when bootstrapping (becomes the default) or when executing a query (overrides the default).

Such a mapper could be Neo4j-specific if you wished, would not have to be general case for all supported graph DBs.

Use Neo4j Driver directly.

Another option is to use Neo4j driver directly. This would be a good idea if you prefer that format, and also don't wish to use other Drivine features like the transaction system, cursors, etc.


I will leave this issue open in case you would like to pursue option #2 - Plug in your own mapper.

from drivine.

jasperblues avatar jasperblues commented on June 6, 2024

Closed for now @joeykilpatrick. Let me know if/when you would like to plug in a custom mapper, and we can help out.

(btw #53 Gets us most of the way there).

from drivine.

Related Issues (20)

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.