Skip to content

pwaleczek/neo_active_graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeoActiveGraph

Build Status

Code ClimateCode Climate Coverage

An ActiveRecord-like Neography wrapper.

The aim is to get as close as possible to the Active Record usage metods as possible. This gem relies on the Neo4j REST API. No JRuby! Yay!!

Changelog

v0.0.4

  • Initial release (WIP)

Installation

It's an early WIP. Install from here only at the moment.

Configuration

Configure Neography separately like here

OR

just use the quick init method

NeoActiveGraph.configure "http://user:pass@some-host.com:7474"

Define Models

Define models for nodes and relationships. Both types work almost alike, except that they inherit from different classes:

  • Nodes from NeoActiveGraph::Node
class User < NeoActiveGraph::Node

  label "User"

  unique "USER_IDX", :name

  property :name, :type => String, :presence => true
  property :email, :type => String, :presence => true, :format => /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
  property :age, :type => Fixnum
end
  • Relationships from NeoActiveGraph::Relationship
# TODO

Usage

Nodes

Creating and manipulating nodes...

##License

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004

Copyright (C) 2013 Paweł Waleczek pawel@thisismyasterisk.org

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

You just DO WHAT THE FUCK YOU WANT TO.

About

Neography wrapper to be used like Active Record

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages