Module: ActiveGraph::Shared::Cypher::CreateMethod

Included in:
Node::HasN::Association::RelWrapper, Relationship::Property::ClassMethods
Defined in:
lib/active_graph/shared/cypher.rb

Instance Method Summary collapse

Instance Method Details

#create_methodObject



4
5
6
# File 'lib/active_graph/shared/cypher.rb', line 4

def create_method
  creates_unique? ? :create_unique : :create
end

#creates_unique(option = :none) ⇒ Object



8
9
10
11
# File 'lib/active_graph/shared/cypher.rb', line 8

def creates_unique(option = :none)
  option = :none if option == true
  @creates_unique = option
end

#creates_unique?Boolean Also known as: unique?

Returns:



17
18
19
# File 'lib/active_graph/shared/cypher.rb', line 17

def creates_unique?
  !!@creates_unique
end

#creates_unique_optionObject



13
14
15
# File 'lib/active_graph/shared/cypher.rb', line 13

def creates_unique_option
  @creates_unique || :none
end