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!!
v0.0.4
- Initial release (WIP)
It's an early WIP. Install from here only at the moment.
Configure Neography separately like here
OR
just use the quick init method
NeoActiveGraph.configure "http://user:pass@some-host.com:7474"
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
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.