README.md in redgraph-0.1.1 vs README.md in redgraph-0.1.2
- old
+ new
@@ -18,10 +18,12 @@
$ gem install redgraph
## Usage
+The gem assumes you have a recent version of [RedisGraph](https://oss.redislabs.com/redisgraph/) up and running.
+
Basic usage:
graph = Redgraph::Graph.new('movies', url: "redis://localhost:6379/1")
Create a couple nodes:
@@ -42,29 +44,38 @@
To get all nodes:
@graph.nodes
-Optional filters:
+Optional filters that can be combined:
@graph.nodes(label: 'actor')
@graph.nodes(properties: {name: "Al Pacino"})
+ @graph.nodes(limit: 10, skip: 20)
+Counting nodes
+
+ @graph.count_nodes(label: 'actor')
+
+Getting edges:
+
+ @graph.edges
+ @graph.edges(src: actor, dest: film)
+ @graph.edges(kind: 'FRIEND_OF', limit: 10, skip: 20)
+
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run
TEST_REDIS_URL=YOUR-REDIS-URL rake test
-to run the tests.
+to run the tests. Test coverage will be enabled if you set the `COVERAGE` environment variable to any value.
You can use a `TEST_REDIS_URL` such as `redis://localhost:6379/1`. Make sure you're not overwriting important databases.
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`.
-
-Run `bin/console` for an interactive prompt.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/pzac/redgraph.