Module: Neo4j::Shared::Cypher::CreateMethod

Included in:
ActiveNode::HasN::Association::RelWrapper, ActiveRel::Property::ClassMethods
Defined in:
lib/neo4j/shared/cypher.rb

Instance Method Summary collapse

Instance Method Details

#create_methodObject


4
5
6
# File 'lib/neo4j/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/neo4j/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/neo4j/shared/cypher.rb', line 17

def creates_unique?
  !!@creates_unique
end

#creates_unique_optionObject


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

def creates_unique_option
  @creates_unique || :none
end