isomorfeus-data 1.0.0.zeta25 → 2.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +47 -21
- data/README.md +38 -46
- data/lib/isomorfeus/data/attribute_support.rb +176 -176
- data/lib/isomorfeus/data/config.rb +79 -110
- data/lib/isomorfeus/data/element_validator.rb +147 -147
- data/lib/isomorfeus/data/ferret_accelerator.rb +66 -0
- data/lib/isomorfeus/data/field_support.rb +110 -0
- data/lib/isomorfeus/data/generic_class_api.rb +136 -116
- data/lib/isomorfeus/data/generic_instance_api.rb +150 -145
- data/lib/isomorfeus/data/hamster_accelerator.rb +87 -0
- data/lib/isomorfeus/data/hamster_storage_expander.rb +94 -0
- data/lib/isomorfeus/data/handler/generic.rb +134 -138
- data/lib/isomorfeus/data/reducer.rb +30 -30
- data/lib/isomorfeus/data/version.rb +4 -4
- data/lib/isomorfeus-data.rb +56 -64
- data/lib/isomorfeus_data/lucid_document/base.rb +10 -0
- data/lib/isomorfeus_data/lucid_document/mixin.rb +148 -0
- data/lib/isomorfeus_data/lucid_file/base.rb +10 -0
- data/lib/isomorfeus_data/lucid_file/mixin.rb +217 -0
- data/lib/isomorfeus_data/lucid_object/base.rb +10 -0
- data/lib/isomorfeus_data/lucid_object/mixin.rb +216 -0
- data/lib/isomorfeus_data/lucid_query/base.rb +10 -0
- data/lib/isomorfeus_data/lucid_query/mixin.rb +81 -0
- data/lib/isomorfeus_data/lucid_query_result.rb +97 -0
- data/opal/uri/common.rb +18 -0
- data/opal/uri/generic.rb +47 -0
- data/opal/uri.rb +29 -0
- metadata +85 -96
- data/lib/isomorfeus/data/handler/arango.rb +0 -56
- data/lib/isomorfeus/data/handler/object_call.rb +0 -40
- data/lib/isomorfeus/data/handler/object_store.rb +0 -40
- data/lib/isomorfeus_data/lucid_data/array/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/array/mixin.rb +0 -580
- data/lib/isomorfeus_data/lucid_data/collection/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/collection/finders.rb +0 -83
- data/lib/isomorfeus_data/lucid_data/collection/mixin.rb +0 -737
- data/lib/isomorfeus_data/lucid_data/composition/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/composition/mixin.rb +0 -234
- data/lib/isomorfeus_data/lucid_data/document/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/document/mixin.rb +0 -9
- data/lib/isomorfeus_data/lucid_data/edge/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/edge/mixin.rb +0 -286
- data/lib/isomorfeus_data/lucid_data/edge_collection/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/edge_collection/finders.rb +0 -134
- data/lib/isomorfeus_data/lucid_data/edge_collection/mixin.rb +0 -747
- data/lib/isomorfeus_data/lucid_data/generic_collection.rb +0 -4
- data/lib/isomorfeus_data/lucid_data/generic_edge.rb +0 -4
- data/lib/isomorfeus_data/lucid_data/generic_edge_collection.rb +0 -4
- data/lib/isomorfeus_data/lucid_data/generic_node.rb +0 -4
- data/lib/isomorfeus_data/lucid_data/graph/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/graph/finders.rb +0 -141
- data/lib/isomorfeus_data/lucid_data/graph/mixin.rb +0 -489
- data/lib/isomorfeus_data/lucid_data/hash/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/hash/mixin.rb +0 -427
- data/lib/isomorfeus_data/lucid_data/link/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/link/mixin.rb +0 -9
- data/lib/isomorfeus_data/lucid_data/link_collection/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/link_collection/mixin.rb +0 -9
- data/lib/isomorfeus_data/lucid_data/node/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/node/mixin.rb +0 -232
- data/lib/isomorfeus_data/lucid_data/query/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/query/mixin.rb +0 -83
- data/lib/isomorfeus_data/lucid_data/query_result.rb +0 -95
- data/lib/isomorfeus_data/lucid_data/vertex/base.rb +0 -13
- data/lib/isomorfeus_data/lucid_data/vertex/mixin.rb +0 -9
- data/lib/lucid_arango/collection/base.rb +0 -13
- data/lib/lucid_arango/collection/mixin.rb +0 -18
- data/lib/lucid_arango/document/base.rb +0 -13
- data/lib/lucid_arango/document/mixin.rb +0 -9
- data/lib/lucid_arango/edge/base.rb +0 -13
- data/lib/lucid_arango/edge/mixin.rb +0 -18
- data/lib/lucid_arango/edge_collection/base.rb +0 -13
- data/lib/lucid_arango/edge_collection/mixin.rb +0 -18
- data/lib/lucid_arango/graph/base.rb +0 -13
- data/lib/lucid_arango/graph/mixin.rb +0 -18
- data/lib/lucid_arango/node/base.rb +0 -13
- data/lib/lucid_arango/node/mixin.rb +0 -79
- data/lib/lucid_arango/object/base.rb +0 -11
- data/lib/lucid_arango/object/mixin.rb +0 -158
- data/lib/lucid_arango/remote_object/base.rb +0 -11
- data/lib/lucid_arango/remote_object/mixin.rb +0 -17
- data/lib/lucid_arango/vertex/base.rb +0 -13
- data/lib/lucid_arango/vertex/mixin.rb +0 -9
@@ -0,0 +1,97 @@
|
|
1
|
+
class LucidQueryResult
|
2
|
+
attr_reader :key
|
3
|
+
|
4
|
+
def sid
|
5
|
+
[@class_name, @key]
|
6
|
+
end
|
7
|
+
|
8
|
+
def sid_s
|
9
|
+
"[#{@class_name}|#{@key}]"
|
10
|
+
end
|
11
|
+
|
12
|
+
if RUBY_ENGINE == 'opal'
|
13
|
+
def initialize(key: nil, result_set: {})
|
14
|
+
@class_name = 'LucidQueryResult'
|
15
|
+
@key = key ? key.to_s : self.object_id.to_s
|
16
|
+
@result_set = result_set
|
17
|
+
end
|
18
|
+
|
19
|
+
def _load_from_store!
|
20
|
+
@result_set = nil
|
21
|
+
end
|
22
|
+
|
23
|
+
def loaded?
|
24
|
+
Redux.fetch_by_path(:data_state, @class_name, @key) ? true : false
|
25
|
+
end
|
26
|
+
|
27
|
+
def key?(k)
|
28
|
+
if @result_set
|
29
|
+
@result_set.key?(k)
|
30
|
+
else
|
31
|
+
stored_results = Redux.fetch_by_path(:data_state, @class_name, @key)
|
32
|
+
return false unless stored_results
|
33
|
+
`Object.hasOwnProperty(stored_results, k)`
|
34
|
+
end
|
35
|
+
end
|
36
|
+
alias has_key? key?
|
37
|
+
|
38
|
+
def result_set=(r)
|
39
|
+
@result_set = r
|
40
|
+
end
|
41
|
+
|
42
|
+
def method_missing(accessor_name, *args, &block)
|
43
|
+
sid = if @result_set
|
44
|
+
@result_set[accessor_name]
|
45
|
+
else
|
46
|
+
stored_results = Redux.fetch_by_path(:data_state, @class_name, @key)
|
47
|
+
stored_results.JS[accessor_name] if stored_results
|
48
|
+
end
|
49
|
+
Isomorfeus.raise_error(message: "#{@class_name}: no such thing '#{accessor_name}' in the results!") unless sid
|
50
|
+
Isomorfeus.instance_from_sid(sid)
|
51
|
+
end
|
52
|
+
else
|
53
|
+
def initialize(key: nil, result_set: {})
|
54
|
+
@class_name = 'LucidQueryResult'
|
55
|
+
@key = key ? key.to_s : self.object_id.to_s
|
56
|
+
@result_set = result_set.nil? ? {} : result_set
|
57
|
+
@result_set.transform_keys!(&:to_sym)
|
58
|
+
end
|
59
|
+
|
60
|
+
def loaded?
|
61
|
+
@result_set.any?
|
62
|
+
end
|
63
|
+
|
64
|
+
def key?(k)
|
65
|
+
@result_set.key?(k)
|
66
|
+
end
|
67
|
+
alias has_key? key?
|
68
|
+
|
69
|
+
def result_set=(r)
|
70
|
+
@result_set = r
|
71
|
+
end
|
72
|
+
|
73
|
+
def method_missing(accessor_name, *args, &block)
|
74
|
+
Isomorfeus.raise_error(message: "#{@class_name}: no such thing '#{accessor_name}' in the results!") unless @result_set.key?(accessor_name)
|
75
|
+
@result_set[accessor_name]
|
76
|
+
end
|
77
|
+
|
78
|
+
def to_transport
|
79
|
+
sids_hash = {}
|
80
|
+
@result_set.each do |key, value|
|
81
|
+
sids_hash[key.to_s] = value.sid
|
82
|
+
end
|
83
|
+
{ @class_name => { @key => sids_hash }}
|
84
|
+
end
|
85
|
+
|
86
|
+
def included_items_to_transport
|
87
|
+
data_hash = {}
|
88
|
+
@result_set.each_value do |value|
|
89
|
+
data_hash.deep_merge!(value.to_transport)
|
90
|
+
if value.respond_to?(:included_items_to_transport)
|
91
|
+
data_hash.deep_merge!(value.included_items_to_transport)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
data_hash
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
data/opal/uri/common.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Kernel
|
2
|
+
|
3
|
+
#
|
4
|
+
# Returns +uri+ converted to a URI object.
|
5
|
+
#
|
6
|
+
def URI(uri)
|
7
|
+
if uri.is_a?(URI::Generic)
|
8
|
+
uri
|
9
|
+
elsif uri = String.try_convert(uri)
|
10
|
+
URI.parse(uri)
|
11
|
+
else
|
12
|
+
raise ArgumentError,
|
13
|
+
"bad argument (expected URI object or URI string)"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
module_function :URI
|
17
|
+
end
|
18
|
+
|
data/opal/uri/generic.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
module URI
|
2
|
+
class Generic
|
3
|
+
attr_reader :scheme, :userinfo, :user, :password, :host, :port, :path,
|
4
|
+
:query, :fragment, :opaque, :registry
|
5
|
+
|
6
|
+
#
|
7
|
+
# An Array of the available components for URI::Generic
|
8
|
+
#
|
9
|
+
COMPONENT = [
|
10
|
+
:scheme,
|
11
|
+
:userinfo, :host, :port, :registry,
|
12
|
+
:path, :opaque,
|
13
|
+
:query,
|
14
|
+
:fragment
|
15
|
+
].freeze
|
16
|
+
|
17
|
+
def initialize(scheme,
|
18
|
+
userinfo, host, port, registry,
|
19
|
+
path, opaque,
|
20
|
+
query,
|
21
|
+
fragment,
|
22
|
+
parser = nil,
|
23
|
+
arg_check = false)
|
24
|
+
@scheme = scheme
|
25
|
+
@userinfo = userinfo
|
26
|
+
@host = host
|
27
|
+
@port = port
|
28
|
+
@path = path
|
29
|
+
@query = query
|
30
|
+
@fragment = fragment
|
31
|
+
@user, @password = userinfo.split(/:/) if userinfo
|
32
|
+
end
|
33
|
+
|
34
|
+
def ==(other)
|
35
|
+
self.class == other.class &&
|
36
|
+
component_ary == other.component_ary
|
37
|
+
end
|
38
|
+
|
39
|
+
protected
|
40
|
+
|
41
|
+
def component_ary
|
42
|
+
self.class::COMPONENT.collect do |x|
|
43
|
+
self.send(x)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
data/opal/uri.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require "uri/common"
|
2
|
+
require "uri/generic"
|
3
|
+
|
4
|
+
module URI
|
5
|
+
@@schemes = {}
|
6
|
+
|
7
|
+
class InvalidURIError < Exception
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.parse(url)
|
11
|
+
# scheme://conn_data/path?query#hash
|
12
|
+
match = url.match(%r[(\w+)://([^/]+)([^\?]+)(\?[^\#]+)?(\#.*)?])
|
13
|
+
|
14
|
+
_, scheme, connection_data, path, query, fragment = match.to_a
|
15
|
+
|
16
|
+
connection_data = connection_data.split(/@/)
|
17
|
+
userinfo = connection_data.size > 1 ? connection_data.first : nil
|
18
|
+
host, port = connection_data.last.split(/:/)
|
19
|
+
|
20
|
+
port = port.to_i
|
21
|
+
query = query[1..-1] if query
|
22
|
+
|
23
|
+
registry = opaque = nil
|
24
|
+
|
25
|
+
Generic.new(scheme, userinfo, host, port,
|
26
|
+
registry, path, opaque, query,
|
27
|
+
fragment)
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '6.
|
19
|
+
version: '6.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '6.
|
26
|
+
version: '6.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: data_uri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.1.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: oj
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.
|
47
|
+
version: 3.13.9
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3.
|
54
|
+
version: 3.13.9
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: opal
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.3.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.3.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: opal-activesupport
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,75 +81,103 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.3.3
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: isomorfeus-
|
84
|
+
name: isomorfeus-asset-manager
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 0.13.2
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 0.13.2
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name: isomorfeus-
|
98
|
+
name: isomorfeus-ferret
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 0.12.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 0.12.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name: isomorfeus-
|
112
|
+
name: isomorfeus-hamster
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 0.6.1
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: 0.6.1
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: isomorfeus
|
126
|
+
name: isomorfeus-preact
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 10.5.11
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 10.5.11
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: isomorfeus-redux
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 4.1.8
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 4.1.8
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: isomorfeus-transport
|
127
155
|
requirement: !ruby/object:Gem::Requirement
|
128
156
|
requirements:
|
129
157
|
- - '='
|
130
158
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
132
|
-
type: :
|
159
|
+
version: 2.0.0.rc1
|
160
|
+
type: :runtime
|
133
161
|
prerelease: false
|
134
162
|
version_requirements: !ruby/object:Gem::Requirement
|
135
163
|
requirements:
|
136
164
|
- - '='
|
137
165
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
166
|
+
version: 2.0.0.rc1
|
139
167
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
168
|
+
name: isomorfeus
|
141
169
|
requirement: !ruby/object:Gem::Requirement
|
142
170
|
requirements:
|
143
|
-
- -
|
171
|
+
- - '='
|
144
172
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
173
|
+
version: 2.0.0.rc1
|
146
174
|
type: :development
|
147
175
|
prerelease: false
|
148
176
|
version_requirements: !ruby/object:Gem::Requirement
|
149
177
|
requirements:
|
150
|
-
- -
|
178
|
+
- - '='
|
151
179
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
180
|
+
version: 2.0.0.rc1
|
153
181
|
- !ruby/object:Gem::Dependency
|
154
182
|
name: rake
|
155
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -191,72 +219,33 @@ files:
|
|
191
219
|
- lib/isomorfeus/data/attribute_support.rb
|
192
220
|
- lib/isomorfeus/data/config.rb
|
193
221
|
- lib/isomorfeus/data/element_validator.rb
|
222
|
+
- lib/isomorfeus/data/ferret_accelerator.rb
|
223
|
+
- lib/isomorfeus/data/field_support.rb
|
194
224
|
- lib/isomorfeus/data/generic_class_api.rb
|
195
225
|
- lib/isomorfeus/data/generic_instance_api.rb
|
196
|
-
- lib/isomorfeus/data/
|
226
|
+
- lib/isomorfeus/data/hamster_accelerator.rb
|
227
|
+
- lib/isomorfeus/data/hamster_storage_expander.rb
|
197
228
|
- lib/isomorfeus/data/handler/generic.rb
|
198
|
-
- lib/isomorfeus/data/handler/object_call.rb
|
199
|
-
- lib/isomorfeus/data/handler/object_store.rb
|
200
229
|
- lib/isomorfeus/data/reducer.rb
|
201
230
|
- lib/isomorfeus/data/version.rb
|
202
|
-
- lib/isomorfeus_data/
|
203
|
-
- lib/isomorfeus_data/
|
204
|
-
- lib/isomorfeus_data/
|
205
|
-
- lib/isomorfeus_data/
|
206
|
-
- lib/isomorfeus_data/
|
207
|
-
- lib/isomorfeus_data/
|
208
|
-
- lib/isomorfeus_data/
|
209
|
-
- lib/isomorfeus_data/
|
210
|
-
- lib/isomorfeus_data/
|
211
|
-
-
|
212
|
-
-
|
213
|
-
-
|
214
|
-
- lib/isomorfeus_data/lucid_data/edge_collection/finders.rb
|
215
|
-
- lib/isomorfeus_data/lucid_data/edge_collection/mixin.rb
|
216
|
-
- lib/isomorfeus_data/lucid_data/generic_collection.rb
|
217
|
-
- lib/isomorfeus_data/lucid_data/generic_edge.rb
|
218
|
-
- lib/isomorfeus_data/lucid_data/generic_edge_collection.rb
|
219
|
-
- lib/isomorfeus_data/lucid_data/generic_node.rb
|
220
|
-
- lib/isomorfeus_data/lucid_data/graph/base.rb
|
221
|
-
- lib/isomorfeus_data/lucid_data/graph/finders.rb
|
222
|
-
- lib/isomorfeus_data/lucid_data/graph/mixin.rb
|
223
|
-
- lib/isomorfeus_data/lucid_data/hash/base.rb
|
224
|
-
- lib/isomorfeus_data/lucid_data/hash/mixin.rb
|
225
|
-
- lib/isomorfeus_data/lucid_data/link/base.rb
|
226
|
-
- lib/isomorfeus_data/lucid_data/link/mixin.rb
|
227
|
-
- lib/isomorfeus_data/lucid_data/link_collection/base.rb
|
228
|
-
- lib/isomorfeus_data/lucid_data/link_collection/mixin.rb
|
229
|
-
- lib/isomorfeus_data/lucid_data/node/base.rb
|
230
|
-
- lib/isomorfeus_data/lucid_data/node/mixin.rb
|
231
|
-
- lib/isomorfeus_data/lucid_data/query/base.rb
|
232
|
-
- lib/isomorfeus_data/lucid_data/query/mixin.rb
|
233
|
-
- lib/isomorfeus_data/lucid_data/query_result.rb
|
234
|
-
- lib/isomorfeus_data/lucid_data/vertex/base.rb
|
235
|
-
- lib/isomorfeus_data/lucid_data/vertex/mixin.rb
|
236
|
-
- lib/lucid_arango/collection/base.rb
|
237
|
-
- lib/lucid_arango/collection/mixin.rb
|
238
|
-
- lib/lucid_arango/document/base.rb
|
239
|
-
- lib/lucid_arango/document/mixin.rb
|
240
|
-
- lib/lucid_arango/edge/base.rb
|
241
|
-
- lib/lucid_arango/edge/mixin.rb
|
242
|
-
- lib/lucid_arango/edge_collection/base.rb
|
243
|
-
- lib/lucid_arango/edge_collection/mixin.rb
|
244
|
-
- lib/lucid_arango/graph/base.rb
|
245
|
-
- lib/lucid_arango/graph/mixin.rb
|
246
|
-
- lib/lucid_arango/node/base.rb
|
247
|
-
- lib/lucid_arango/node/mixin.rb
|
248
|
-
- lib/lucid_arango/object/base.rb
|
249
|
-
- lib/lucid_arango/object/mixin.rb
|
250
|
-
- lib/lucid_arango/remote_object/base.rb
|
251
|
-
- lib/lucid_arango/remote_object/mixin.rb
|
252
|
-
- lib/lucid_arango/vertex/base.rb
|
253
|
-
- lib/lucid_arango/vertex/mixin.rb
|
231
|
+
- lib/isomorfeus_data/lucid_document/base.rb
|
232
|
+
- lib/isomorfeus_data/lucid_document/mixin.rb
|
233
|
+
- lib/isomorfeus_data/lucid_file/base.rb
|
234
|
+
- lib/isomorfeus_data/lucid_file/mixin.rb
|
235
|
+
- lib/isomorfeus_data/lucid_object/base.rb
|
236
|
+
- lib/isomorfeus_data/lucid_object/mixin.rb
|
237
|
+
- lib/isomorfeus_data/lucid_query/base.rb
|
238
|
+
- lib/isomorfeus_data/lucid_query/mixin.rb
|
239
|
+
- lib/isomorfeus_data/lucid_query_result.rb
|
240
|
+
- opal/uri.rb
|
241
|
+
- opal/uri/common.rb
|
242
|
+
- opal/uri/generic.rb
|
254
243
|
homepage: http://isomorfeus.com
|
255
244
|
licenses:
|
256
245
|
- MIT
|
257
246
|
metadata:
|
258
247
|
github_repo: ssh://github.com/isomorfeus/gems
|
259
|
-
post_install_message:
|
248
|
+
post_install_message:
|
260
249
|
rdoc_options: []
|
261
250
|
require_paths:
|
262
251
|
- lib
|
@@ -271,8 +260,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
260
|
- !ruby/object:Gem::Version
|
272
261
|
version: 1.3.1
|
273
262
|
requirements: []
|
274
|
-
rubygems_version: 3.
|
275
|
-
signing_key:
|
263
|
+
rubygems_version: 3.2.22
|
264
|
+
signing_key:
|
276
265
|
specification_version: 4
|
277
266
|
summary: Compose Graphs and Collections of data just as needed for a isomorfeus app.
|
278
267
|
test_files: []
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Isomorfeus
|
4
|
-
module Data
|
5
|
-
module Handler
|
6
|
-
class Arango < LucidHandler::Base
|
7
|
-
on_request do |response_agent|
|
8
|
-
# promise_send_path('Isomorfeus::Data::Handler::Generic', action, type, self.to_s, props_hash)
|
9
|
-
response_agent.request.each_key do |action|
|
10
|
-
if action == 'load'
|
11
|
-
response_agent.request[action].each_key do |type|
|
12
|
-
if %w[collection graph document edge].include?(type)
|
13
|
-
response_agent.request.each_key do |type_class_name|
|
14
|
-
if Isomorfeus.send("valid_#{type}_class_name?", type_class_name)
|
15
|
-
type_class = Isomorfeus.send("cached_#{type}_class", type_class_name)
|
16
|
-
if type_class
|
17
|
-
props_json = response_agent.request[type_class_name]
|
18
|
-
begin
|
19
|
-
props = Oj.load(props_json, mode: :strict)
|
20
|
-
if current_user.authorized?(type_class, :load, *props)
|
21
|
-
loaded_type = type_class.load(props)
|
22
|
-
loaded_type.instance_exec do
|
23
|
-
type_class.on_load_block.call() if type_class.on_load_block
|
24
|
-
end
|
25
|
-
response_agent.outer_result = { data: loaded_type.to_transport }
|
26
|
-
if %w[collection graph].include?(type)
|
27
|
-
response_agent.outer_result.deep_merge!(data: loaded_type.included_items_to_transport)
|
28
|
-
end
|
29
|
-
response_agent.agent_result = { success: 'ok' }
|
30
|
-
else
|
31
|
-
response_agent.error = { error: 'Access denied!' }
|
32
|
-
end
|
33
|
-
rescue Exception => e
|
34
|
-
response_agent.error = { error: { type_class_name => "Isomorfeus::Data::Handler::Arango: #{e.message}" }}
|
35
|
-
end
|
36
|
-
else
|
37
|
-
response_agent.error = { error: { type_class_name => 'No such thing!' }}
|
38
|
-
end
|
39
|
-
else
|
40
|
-
response_agent.error = { error: { type_class_name => 'No such thing!' }}
|
41
|
-
end
|
42
|
-
end
|
43
|
-
else
|
44
|
-
response_agent.error = { error: { type => 'No such thing!' }}
|
45
|
-
end
|
46
|
-
end
|
47
|
-
elsif action == 'store'
|
48
|
-
else
|
49
|
-
response_agent.error = { error: { action => 'No such thing!' }}
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Isomorfeus
|
4
|
-
module Data
|
5
|
-
module Handler
|
6
|
-
class Object < LucidHandler::Base
|
7
|
-
on_request do |response_agent|
|
8
|
-
# promise_send_path('Isomorfeus::Data::Handler::Object', action, object_hash)
|
9
|
-
response_agent.request.each_key do |array_class_name|
|
10
|
-
if Isomorfeus.valid_array_class_name?(array_class_name)
|
11
|
-
array_class = Isomorfeus.cached_array_class(array_class_name)
|
12
|
-
if array_class
|
13
|
-
props_json = response_agent.request[array_class_name]
|
14
|
-
begin
|
15
|
-
props = Oj.load(props_json, mode: :strict)
|
16
|
-
if current_user.authorized?(array_class, :load, *props)
|
17
|
-
array = array_class.load(props)
|
18
|
-
array.instance_exec do
|
19
|
-
array_class.on_load_block.call() if array_class.on_load_block
|
20
|
-
end
|
21
|
-
response_agent.outer_result = { data: array.to_transport }
|
22
|
-
response_agent.agent_result = { success: 'ok' }
|
23
|
-
else
|
24
|
-
response_agent.error = { error: 'Access denied!' }
|
25
|
-
end
|
26
|
-
rescue Exception => e
|
27
|
-
response_agent.error = { error: { array_class_name => "Isomorfeus::Data::Handler::ObjectCall: #{e.message}" }}
|
28
|
-
end
|
29
|
-
else
|
30
|
-
response_agent.error = { error: { array_class_name => 'No such thing!' }}
|
31
|
-
end
|
32
|
-
else
|
33
|
-
response_agent.error = { error: { array_class_name => 'No such thing!' }}
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Isomorfeus
|
4
|
-
module Data
|
5
|
-
module Handler
|
6
|
-
class Object < LucidHandler::Base
|
7
|
-
on_request do |response_agent|
|
8
|
-
# promise_send_path('Isomorfeus::Data::Handler::Object', action, object_hash)
|
9
|
-
response_agent.request.each_key do |array_class_name|
|
10
|
-
if Isomorfeus.valid_array_class_name?(array_class_name)
|
11
|
-
array_class = Isomorfeus.cached_array_class(array_class_name)
|
12
|
-
if array_class
|
13
|
-
props_json = response_agent.request[array_class_name]
|
14
|
-
begin
|
15
|
-
props = Oj.load(props_json, mode: :strict)
|
16
|
-
if current_user.authorized?(array_class, :load, *props)
|
17
|
-
array = array_class.load(props)
|
18
|
-
array.instance_exec do
|
19
|
-
array_class.on_load_block.call() if array_class.on_load_block
|
20
|
-
end
|
21
|
-
response_agent.outer_result = { data: array.to_transport }
|
22
|
-
response_agent.agent_result = { success: 'ok' }
|
23
|
-
else
|
24
|
-
response_agent.error = { error: 'Access denied!' }
|
25
|
-
end
|
26
|
-
rescue Exception => e
|
27
|
-
response_agent.error = { error: { array_class_name => "Isomorfeus::Data::Handler::Object: #{e.message}" }}
|
28
|
-
end
|
29
|
-
else
|
30
|
-
response_agent.error = { error: { array_class_name => 'No such thing!' }}
|
31
|
-
end
|
32
|
-
else
|
33
|
-
response_agent.error = { error: { array_class_name => 'No such thing!' }}
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|