Sha256: 1513d6a86f399438eafd61d72c656b0d7b65c6e71903ae1a368b27e0825464fb

Contents?: true

Size: 982 Bytes

Versions: 5

Compression:

Stored size: 982 Bytes

Contents

module Cadet
  module BatchInserter
    class Node < Cadet::Node

      def create_outgoing(to, type, properties = {})
        Cadet::BatchInserter::Session.current_session.create_relationship(self, to, type, properties)
      end

      def []= (property, value)
        Cadet::BatchInserter::Session.current_session.set_node_property(self, property, value)
      end

      def [] (property)
        Cadet::BatchInserter::Session.current_session.get_node_properties(self)[property.to_s]
      end

      def == other_node
        @underlying == other_node
      end

      def outgoing(type)
        NodeTraverser.new(self, :outgoing, type)
      end

      def each_relationship(direction, type)
        # not implemented in batch inserter mode. though, it could be done.
        # the assumption is that this shouldnt be necessary, as batch inserter mode
        # should be about inserting data, not querying data
        raise NotImplementedError
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cadet-0.1.5-java lib/cadet/batch_inserter/node.rb
cadet-0.1.4-java lib/cadet/batch_inserter/node.rb
cadet-0.1.3-java lib/cadet/batch_inserter/node.rb
cadet-0.1.2-java lib/cadet/batch_inserter/node.rb
cadet-0.1.1-java lib/cadet/batch_inserter/node.rb