travis-ci
9 of 9 new or added lines in 2 files covered. (100.0%)
1818 of 2005 relevant lines covered (90.67%)
25009.34 hits per line
1 |
require 'neo4j/core/cypher_session/transactions'
|
8✔ |
2 |
|
|
3 |
module Neo4j |
8✔ |
4 |
module Core |
8✔ |
5 |
class CypherSession |
8✔ |
6 |
module Transactions |
8✔ |
7 |
class Bolt < Base |
8✔ |
8 |
def initialize(*args) |
8✔ |
9 |
super
|
3,704✔ |
10 |
|
|
11 |
tx_query('BEGIN') if root? |
3,704✔ |
12 |
end
|
|
13 |
|
|
14 |
def commit |
8✔ |
15 |
tx_query('COMMIT') if root? |
3,544✔ |
16 |
end
|
|
17 |
|
|
18 |
def delete |
8✔ |
19 |
tx_query('ROLLBACK')
|
88✔ |
20 |
end
|
|
21 |
|
|
22 |
def started? |
8✔ |
23 |
true
|
× |
24 |
end
|
|
25 |
|
|
26 |
private |
8✔ |
27 |
|
|
28 |
def tx_query(cypher) |
8✔ |
29 |
query = Adaptors::Base::Query.new(cypher, {}, cypher) |
7,264✔ |
30 |
adaptor.send(:query_set, self, [query], skip_instrumentation: true) |
7,264✔ |
31 |
end
|
|
32 |
end
|
|
33 |
end
|
|
34 |
end
|
|
35 |
end
|
|
36 |
end
|