- # Load content for all `nodes` from base.
- #
- # Content corresponds to properties and labels that are loaded in batch mode.
- private fun pull_all_nodes(nodes: Collection[NeoNode]) do
- var batch = new NeoBatch(client)
- var len = nodes.length
- var sum = 0
- var i = 1
- for node in nodes do
- batch.load_node(node)
- if i == batch_max_size then
- do_batch(batch)
- sum += batch_max_size
- toolcontext.info(" {sum * 100 / len}% done", 1)
- batch = new NeoBatch(client)
- i = 1
- else
- i += 1
- end
- end
- do_batch(batch)
- end
-
- # Load all edges from base linked to `nodes`.
- #
- # Edges are loaded in batch mode.
- private fun pull_all_edges(nodes: Collection[NeoNode]) do
- var batch = new NeoBatch(client)
- var len = nodes.length
- var sum = 0
- var i = 1
- for node in nodes do
- batch.load_node_edges(node)
- if i == batch_max_size then
- do_batch(batch)
- sum += batch_max_size
- toolcontext.info(" {sum * 100 / len}% done", 1)
- batch = new NeoBatch(client)
- i = 1
- else
- i += 1
- end
- end
- do_batch(batch)
- end
-