rebat 0.1.3 → 0.1.4
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.
- data/lib/rebat/client.rb +6 -6
- data/lib/rebat/selector.rb +4 -4
- data/lib/rebat/version.rb +1 -1
- metadata +3 -3
data/lib/rebat/client.rb
CHANGED
@@ -26,9 +26,9 @@ class Rebat::Client
|
|
26
26
|
def add(from_entity_id, from_entity_type, to_entity_id, to_entity_type, weight, relation_key)
|
27
27
|
edge = Rebat::Thrift::Edge.new
|
28
28
|
|
29
|
-
edge.fromEntityId = from_entity_id
|
29
|
+
edge.fromEntityId = from_entity_id.to_s
|
30
30
|
edge.fromEntityType = from_entity_type
|
31
|
-
edge.toEntityId = to_entity_id
|
31
|
+
edge.toEntityId = to_entity_id.to_s
|
32
32
|
edge.toEntityType = to_entity_type
|
33
33
|
edge.weight = weight
|
34
34
|
edge.relationId = relations[relation_key]
|
@@ -41,9 +41,9 @@ class Rebat::Client
|
|
41
41
|
def updateWeight(from_entity_id, from_entity_type, to_entity_id, to_entity_type, relation_key, new_weight)
|
42
42
|
edge = Rebat::Thrift::Edge.new
|
43
43
|
|
44
|
-
edge.fromEntityId = from_entity_id
|
44
|
+
edge.fromEntityId = from_entity_id.to_s
|
45
45
|
edge.fromEntityType = from_entity_type
|
46
|
-
edge.toEntityId = to_entity_id
|
46
|
+
edge.toEntityId = to_entity_id.to_s
|
47
47
|
edge.toEntityType = to_entity_type
|
48
48
|
edge.relationId = relations[relation_key]
|
49
49
|
|
@@ -55,9 +55,9 @@ class Rebat::Client
|
|
55
55
|
def delete(from_entity_id, from_entity_type, to_entity_id, to_entity_type, relation_key)
|
56
56
|
edge = Rebat::Thrift::Edge.new
|
57
57
|
|
58
|
-
edge.fromEntityId = from_entity_id
|
58
|
+
edge.fromEntityId = from_entity_id.to_s
|
59
59
|
edge.fromEntityType = from_entity_type
|
60
|
-
edge.toEntityId = to_entity_id
|
60
|
+
edge.toEntityId = to_entity_id.to_s
|
61
61
|
edge.toEntityType = to_entity_type
|
62
62
|
edge.relationId = relations[relation_key]
|
63
63
|
|
data/lib/rebat/selector.rb
CHANGED
@@ -38,10 +38,10 @@ class Rebat::Selector
|
|
38
38
|
def create_query(from_entity_id, from_entity_type, to_entity_id, to_entity_type, relation_id, qtype)
|
39
39
|
edge = Rebat::Thrift::Edge.new
|
40
40
|
|
41
|
-
edge.fromEntityId = from_entity_id
|
42
|
-
edge.fromEntityType = from_entity_type
|
43
|
-
edge.toEntityId = to_entity_id
|
44
|
-
edge.toEntityType = to_entity_type
|
41
|
+
edge.fromEntityId = from_entity_id.to_s unless from_entity_id.nil?
|
42
|
+
edge.fromEntityType = from_entity_type unless from_entity_type.nil?
|
43
|
+
edge.toEntityId = to_entity_id.to_s unless to_entity_id.nil?
|
44
|
+
edge.toEntityType = to_entity_type unless to_entity_type.nil?
|
45
45
|
edge.relationId = relation_id
|
46
46
|
|
47
47
|
query = Rebat::Thrift::Query.new
|
data/lib/rebat/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rebat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ date: 2012-10-12 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thrift
|
17
|
-
requirement: &
|
17
|
+
requirement: &70118386961700 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
version: 0.8.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70118386961700
|
26
26
|
description: ! 'Rebat DB driver for ruby '
|
27
27
|
email:
|
28
28
|
- omar.mekky@mashsolvents.com
|