Method: Twb::Util::Cypher#encode

Defined in:
lib/twb/util/cypher.rb

#encode(node, terminator = '') ⇒ Object



99
100
101
102
103
104
105
# File 'lib/twb/util/cypher.rb', line 99

def encode node, terminator=''
  puts "def encode node: #{node}  "
  case @mode
  when :merge  then "MERGE (%s:%s { name:'%s', uuid: '%s' } ) %s" % [node.uuid, varName, node.type, node.name, terminator ]
  when :create then "CREATE (#{node.uuid}:#{node.type} {} )"
  end
end