neo4j_bolt 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f7a73b8f8b557258fa8f56204db5f54431c007cbe30074cec9391c7b22054c3
4
- data.tar.gz: c78f05d1ac8f44c20ad87de565a8e5b1d342858814dcdc148d080f64582c789c
3
+ metadata.gz: 57cb820dc2f181457f76fa50f72a00d0712ba568aab86af0c156ed072ec05966
4
+ data.tar.gz: 7a1fde38c4c94a666226ec5a7136eae9187b592428345ae9178e69aff3b82231
5
5
  SHA512:
6
- metadata.gz: cd9ea5265951e222c17dfafa29b734b3f0fd2f506b08f4ff9b1454ef5a5a4f63f1b042279297a65da1d9fae20dcb8b1bff590afab2aca395a9ad4893b0b8c198
7
- data.tar.gz: d5a88f27219309adc1e03a3cb8b9b1e1d6cd0624a6199357947771304354c8423313994c14ff956900f8372a92865fbcd2221138a1038479e8668ed435c5abdb
6
+ metadata.gz: 9bba294fea8355bb36e4f73cd9f0abfaeb44289dea42104c477350a7bdd6777987335181fa8cd6732dc388518a058abf57503bbcf2ec1fe8ffc9e0dcd7904f7c
7
+ data.tar.gz: a3a3584d8e1edcb24472b7811dd603e416ff45ed09f49f65bbfbd10154b12b197cdbf1752dbfc89a28f81f016cc99746c18836fbd187437889f51b21c4592471
data/README.md CHANGED
@@ -36,7 +36,23 @@ In order to use this gem, you need a running Neo4j database. You can start one u
36
36
  docker run --rm --env NEO4J_AUTH=none --publish 7687:7687 neo4j:4.4-community
37
37
  ```
38
38
 
39
- TODO: Write usage instructions here
39
+ ### Running queries
40
+
41
+ Use `neo4j_query` to run a query and receive all results:
42
+
43
+ ```ruby
44
+ entries = neo4j_query("MATCH (n) RETURN n")
45
+ ```
46
+ Alternatively, specify a block to make use of Neo4j's streaming capabilities and receive entries one by one:
47
+
48
+ ```ruby
49
+ neo4j_query("MATCH (n) RETURN n") do |entry|
50
+ # entry['n'] is your node
51
+ end
52
+ ```
53
+ Using streaming avoids memory hog since it prevents having to read all entries into memory before handling them.
54
+
55
+ Use `neo4j_query_expect_one` if you want to make sure there's exactly one entry to be returned. If there's zero, two, or more results, this will raise a `ExpectedOneResultError`.
40
56
 
41
57
  ## Development
42
58
 
@@ -1,3 +1,3 @@
1
1
  module Neo4jBolt
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/neo4j_bolt.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.email = ["micha.specht@gmail.com"]
8
8
  spec.licenses = ['GPL-3.0-only']
9
9
 
10
- spec.summary = "A pure Neo4j/Bolt driver written in pure Ruby"
10
+ spec.summary = "A Neo4j/Bolt driver written in pure Ruby"
11
11
  spec.homepage = "https://github.com/specht/neo4j_bolt"
12
12
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
13
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j_bolt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Specht
@@ -69,5 +69,5 @@ requirements: []
69
69
  rubygems_version: 3.3.5
70
70
  signing_key:
71
71
  specification_version: 4
72
- summary: A pure Neo4j/Bolt driver written in pure Ruby
72
+ summary: A Neo4j/Bolt driver written in pure Ruby
73
73
  test_files: []