neo4dart 0.0.2 copy "neo4dart: ^0.0.2" to clipboard
neo4dart: ^0.0.2 copied to clipboard

outdated

Driver for neo4j

Neo4dart #

Neo4dart is a Dart library acting as a driver for Neo4j.

Build Status

Features #

  • Basic CRUD operations

Installation #

Add Neo4dart to your project's pubspec.yaml file and run pub get:

dependencies:
  neo4dart: '0.0.1'

Convention #

If you want to use the driver, all you have to do is to adopt the following conventions :

  • A node must extends Node and it must have a toJson() method representing his data
class Person extends Node {

  String name;
  String address;

  Map toJson() {
    Map map = new Map();
    map["name"] = name;
    map["address"] = address;
    return map;
  }
}
  • A relation can be added via the annotation @Relationship()
class Person extends Node {
...

  @Relationship("works with")
  List<Person> coworkers;
}
  • A relation with dynamic data can be added via the annotation @RelationshipVia(). In this case the relation has to be an entity extending Relation. The data inserted in neo4j will be those returned by the toJson() method.
class Love extends Relation {

  @StartNode()
  Person personWhoLoves;
  @EndNode()
  Person personLoved;
  
  String since;

  Map toJson() {
    Map map = new Map();
      map["since"] = since;    
    return map;
  }
}


class Person extends Node {
...

  @RelationshipVia("is in love with")
  Love love;
}

Usage #

All the methods to use for basic operations can be found in the following classes : NeoServiceFind, NeoServiceInsert, NeoServiceUpdate, NeoServiceDelete.

0
likes
0
points
29
downloads

Publisher

unverified uploader

Weekly Downloads

Driver for neo4j

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, http, logging, path, quiver

More

Packages that depend on neo4dart