neo4j-core 7.0.0.alpha.1 → 7.0.0.alpha.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-core/version.rb +1 -1
- data/lib/neo4j/core/cypher_session/adaptors.rb +15 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df21104c64aac0e5c31d57b3cac9fd30054c2ab6
|
4
|
+
data.tar.gz: c82e507fc09975bd20435df0cb6282300f1ca062
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b27caa2963787801f0e8bb96aefa8d83134d777bf558b610c99465fde90a28e4a100d9e7bb45f39c0396d215a47a2fd0c8bb39658cdae43f2b62d5e329401885
|
7
|
+
data.tar.gz: ab6fd5a98e469939d69f259483d0b45f11420f89012bcbab8b3d754c294e11cd9c858a6e8c4e3754a110a655efcd0b20387dec411801fc7f8134daa9912d8fd1
|
data/lib/neo4j-core/version.rb
CHANGED
@@ -6,20 +6,24 @@ module Neo4j
|
|
6
6
|
module Core
|
7
7
|
class CypherSession
|
8
8
|
class CypherError < StandardError
|
9
|
-
attr_reader :code, :
|
9
|
+
attr_reader :code, :original_message, :stack_trace
|
10
10
|
|
11
|
-
def
|
11
|
+
def initialize(code = nil, original_message = nil, stack_trace = nil)
|
12
12
|
@code = code
|
13
|
-
@
|
13
|
+
@original_message = original_message
|
14
14
|
@stack_trace = stack_trace
|
15
15
|
|
16
16
|
msg = <<-ERROR
|
17
17
|
Cypher error:
|
18
|
-
#{ANSI::CYAN}#{code}#{ANSI::CLEAR}: #{
|
18
|
+
#{ANSI::CYAN}#{code}#{ANSI::CLEAR}: #{original_message}
|
19
19
|
#{stack_trace}
|
20
20
|
ERROR
|
21
|
+
super(msg)
|
22
|
+
end
|
21
23
|
|
22
|
-
|
24
|
+
|
25
|
+
def self.new_from(code, message, stack_trace = nil)
|
26
|
+
error_class_from(code).new(code, message, stack_trace)
|
23
27
|
end
|
24
28
|
|
25
29
|
def self.error_class_from(code)
|
@@ -86,7 +90,12 @@ ERROR
|
|
86
90
|
end
|
87
91
|
|
88
92
|
def query(session, *args)
|
89
|
-
options =
|
93
|
+
options = case args.size
|
94
|
+
when 3
|
95
|
+
args.pop
|
96
|
+
when 2
|
97
|
+
args.pop if args[0].is_a?(::Neo4j::Core::Query)
|
98
|
+
end || {}
|
90
99
|
|
91
100
|
queries(session, options) { append(*args) }[0]
|
92
101
|
end
|