Sha256: e5028a01026c133efe33f55e0f96157c8dae3006b12dad1182948443269f4400
Contents?: true
Size: 1.12 KB
Versions: 9
Compression:
Stored size: 1.12 KB
Contents
module Pacer module Routes # TODO: this should only apply to ID routes...do we want to be that granular with route types? module RouteOperations # args is (optional) extensions followed by an (optional) options hash def lookup_ids(*args) if args.last.is_a? Hash opts = args.pop else opts = {} end chain_route({transform: :lookup_ids, element_type: :vertex, extensions: args, wrapper: nil}.merge(opts)) end end end module Transform module LookupIds import com.tinkerpop.gremlin.pipes.transform.IdVertexPipe import com.tinkerpop.gremlin.pipes.transform.IdEdgePipe def attach_pipe(end_pipe) fail ClientError, 'Can not look up elements without the graph' unless graph if element_type == :vertex pipe = IdVertexPipe.new graph.blueprints_graph elsif element_type == :vertex pipe = IdEdgePipe.new graph.blueprints_graph else fail ClientError, 'Can not look up elements without the element_type' end pipe.setStarts end_pipe pipe end end end end
Version data entries
9 entries across 9 versions & 1 rubygems