neo4j-cypher 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/neo4j-cypher/clause.rb +2 -1
- data/lib/neo4j-cypher/operator.rb +2 -2
- data/lib/neo4j-cypher/start.rb +2 -2
- data/lib/neo4j-cypher/version.rb +1 -1
- data/neo4j-cypher.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09597f0df61b4a9948f89d95ed600ef2db87d937
|
4
|
+
data.tar.gz: dc5e479907ca3e809e90a764c08803028b982c43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07897d73425c35140cd50a0dd64b75ee5137654a59954ddc24b76cb157ebfcfce245aaa4d97ac6b89801facbf385f1ef134cf7110d56720226725cb5fe270808
|
7
|
+
data.tar.gz: 16c02fdf8bead9d1114f2ec7130ec5640bc4ee51d6d13b3ffdbe881fa74d6f604d2d3bb51c5fae2214cf9fa82cba8e39d93aa536eb14c01db28f7f71e3ce7d5b
|
data/lib/neo4j-cypher/clause.rb
CHANGED
@@ -90,7 +90,8 @@ module Neo4j
|
|
90
90
|
def to_prop_string(props)
|
91
91
|
key_values = props.keys.map do |key|
|
92
92
|
raw = key.to_s[0, 1] == '_'
|
93
|
-
|
93
|
+
escaped_string = props[key].gsub(/['"]/) { |s| "\#{s}" } if props[key].is_a?(String) && !raw
|
94
|
+
val = props[key].is_a?(String) && !raw ? "'#{escaped_string}'" : props[key]
|
94
95
|
"#{raw ? key.to_s[1..-1] : key} : #{val}"
|
95
96
|
end
|
96
97
|
"{#{key_values.join(', ')}}"
|
@@ -28,7 +28,6 @@ module Neo4j
|
|
28
28
|
else
|
29
29
|
@obj.to_s
|
30
30
|
end
|
31
|
-
|
32
31
|
end
|
33
32
|
end
|
34
33
|
|
@@ -38,10 +37,11 @@ module Neo4j
|
|
38
37
|
|
39
38
|
def initialize(clause_list, left_operand, right_operand, op, clause_type = :where, post_fix = nil, &dsl)
|
40
39
|
super(clause_list, clause_type, EvalContext)
|
40
|
+
right_operand ||= :NULL if op == '='
|
41
41
|
right_operand = Regexp.new(right_operand) if op == '=~' && right_operand.is_a?(String)
|
42
42
|
@left_operand = Operand.new(left_operand)
|
43
43
|
raise "No Leftoperatnd #{left_operand.class}" unless @left_operand.obj
|
44
|
-
@right_operand = Operand.new(right_operand)
|
44
|
+
@right_operand = Operand.new(right_operand) unless right_operand.nil?
|
45
45
|
@op = (@right_operand && @right_operand.regexp?) ? '=~' : op
|
46
46
|
@post_fix = post_fix
|
47
47
|
@valid = true
|
data/lib/neo4j-cypher/start.rb
CHANGED
@@ -59,7 +59,7 @@ module Neo4j
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def self.query_node_by_class(clause_list, index_class, query, index_type)
|
62
|
-
LuceneQuery.new(clause_list, "#{_index_name_for_type(index_class, index_type)}(#{query})", 'node')
|
62
|
+
LuceneQuery.new(clause_list, "#{_index_name_for_type(index_class, index_type)}('#{query}')", 'node')
|
63
63
|
end
|
64
64
|
|
65
65
|
def self.lookup_rel_by_class(clause_list, index_class, key, value)
|
@@ -67,7 +67,7 @@ module Neo4j
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def self.query_rel_by_class(clause_list, index_class, query, index_type)
|
70
|
-
LuceneQuery.new(clause_list, "#{_index_name_for_type(index_class, index_type)}(#{query})", 'relationship')
|
70
|
+
LuceneQuery.new(clause_list, "#{_index_name_for_type(index_class, index_type)}('#{query}')", 'relationship')
|
71
71
|
end
|
72
72
|
|
73
73
|
def self._index_name_for_type(index_class , index_type)
|
data/lib/neo4j-cypher/version.rb
CHANGED
data/neo4j-cypher.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.name = "neo4j-cypher"
|
8
8
|
s.version = Neo4j::Cypher::VERSION
|
9
9
|
s.required_ruby_version = ">= 1.8.7"
|
10
|
-
|
10
|
+
s.license = 'MIT'
|
11
11
|
s.authors = "Andreas Ronge"
|
12
12
|
s.email = 'andreas.ronge@gmail.com'
|
13
13
|
s.homepage = "http://github.com/andreasronge/neo4j-cypher/tree"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo4j-cypher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Ronge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
This gem is used in the JRuby neo4j gem but should work on any Ruby implementation since it simply
|
@@ -48,7 +48,8 @@ files:
|
|
48
48
|
- Gemfile
|
49
49
|
- neo4j-cypher.gemspec
|
50
50
|
homepage: http://github.com/andreasronge/neo4j-cypher/tree
|
51
|
-
licenses:
|
51
|
+
licenses:
|
52
|
+
- MIT
|
52
53
|
metadata: {}
|
53
54
|
post_install_message:
|
54
55
|
rdoc_options:
|