omf_oml 1.1.8 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/lib/omf_oml/network.rb +5 -11
- data/lib/omf_oml/schema.rb +1 -1
- data/lib/omf_oml/table.rb +1 -1
- data/lib/omf_oml/version.rb +1 -1
- metadata +2 -2
data/.gitignore
CHANGED
data/lib/omf_oml/network.rb
CHANGED
@@ -234,10 +234,13 @@ module OMF::OML
|
|
234
234
|
#
|
235
235
|
def to_table(aspect, table_opts = {})
|
236
236
|
aspect = aspect.to_sym
|
237
|
+
table_opts[:supress_index] = true
|
237
238
|
case aspect
|
238
239
|
when :nodes
|
240
|
+
#puts "TABLE SCHEME 1 >>>> #{@node_schema}"
|
239
241
|
table = OmlTable.create @name + '/nodes', @node_schema, table_opts
|
240
|
-
#puts "TABLE SCHEME >>>> #{table.schema}"
|
242
|
+
#puts "TABLE SCHEME 2 >>>> #{@node_schema} - #{table.schema}"
|
243
|
+
#table.add_rows(@nodes)
|
241
244
|
table.add_rows(@nodes.map do |id, n|
|
242
245
|
@node_schema.hash_to_row(n.attributes)
|
243
246
|
end)
|
@@ -250,17 +253,8 @@ module OMF::OML
|
|
250
253
|
|
251
254
|
when :links
|
252
255
|
table = OmlTable.create @name + '/links', @link_schema, table_opts
|
253
|
-
# @links.each do |id, l|
|
254
|
-
# table.add_row @link_schema.hash_to_row(l.attributes)
|
255
|
-
# end
|
256
256
|
table.add_rows(@links.map do |id, n|
|
257
|
-
|
258
|
-
# puts table.schema
|
259
|
-
# table.add_row @link_schema.hash_to_row(n.attributes)
|
260
|
-
# puts table.rows.inspect
|
261
|
-
# exit
|
262
|
-
|
263
|
-
@link_schema.hash_to_row(n.attributes)
|
257
|
+
@link_schema.hash_to_row(n.attributes)
|
264
258
|
end)
|
265
259
|
#puts table.rows.inspect
|
266
260
|
on_update "__to_tables_links_#{table.object_id}" do |a|
|
data/lib/omf_oml/schema.rb
CHANGED
data/lib/omf_oml/table.rb
CHANGED
@@ -44,7 +44,7 @@ module OMF::OML
|
|
44
44
|
# option 'supress_index' is set.
|
45
45
|
# opts -
|
46
46
|
# :max_size - keep table to that size by dropping older rows
|
47
|
-
# :supress_index - don't
|
47
|
+
# :supress_index - don't pex, even if schema doesn't start with '__id__'
|
48
48
|
#
|
49
49
|
def initialize(tname, schema, opts = {}, &on_before_row_added)
|
50
50
|
super tname
|
data/lib/omf_oml/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omf_oml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-02-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omf_base
|