Module: Neoid::Node::ClassMethods
- Defined in:
- lib/neoid/node.rb
Instance Attribute Summary collapse
-
#neo_subref_node ⇒ Object
Returns the value of attribute neo_subref_node.
Instance Method Summary collapse
- #delete_command ⇒ Object
- #neo_model_index ⇒ Object
- #neo_search(term, options = {}) ⇒ Object
- #neo_subref_node_rel_type ⇒ Object
- #neo_subref_rel_type ⇒ Object
- #reset_neo_subref_node ⇒ Object
Instance Attribute Details
#neo_subref_node ⇒ Object
Returns the value of attribute neo_subref_node.
17 18 19 |
# File 'lib/neoid/node.rb', line 17 def neo_subref_node @neo_subref_node end |
Instance Method Details
#delete_command ⇒ Object
27 28 29 |
# File 'lib/neoid/node.rb', line 27 def delete_command :delete_node end |
#neo_model_index ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/neoid/node.rb', line 31 def neo_model_index return nil unless Neoid.config.enable_per_model_indexes Neoid::logger.info "Node#neo_model_index #{neo_subref_rel_type}" gremlin_query = <<-GREMLIN g.createManualIndex(neo_model_index_name, Vertex.class); GREMLIN # Neoid.logger.info "subref query:\n#{gremlin_query}" script_vars = { neo_model_index_name: neo_model_index_name } Neoid.execute_script_or_add_to_batch gremlin_query, script_vars end |
#neo_search(term, options = {}) ⇒ Object
83 84 85 |
# File 'lib/neoid/node.rb', line 83 def neo_search(term, = {}) Neoid.search(self, term, ) end |
#neo_subref_node_rel_type ⇒ Object
23 24 25 |
# File 'lib/neoid/node.rb', line 23 def neo_subref_node_rel_type @_neo_subref_node_rel_type ||= name.tableize end |
#neo_subref_rel_type ⇒ Object
19 20 21 |
# File 'lib/neoid/node.rb', line 19 def neo_subref_rel_type @_neo_subref_rel_type ||= "#{name.tableize}_subref" end |
#reset_neo_subref_node ⇒ Object
79 80 81 |
# File 'lib/neoid/node.rb', line 79 def reset_neo_subref_node @neo_subref_node = nil end |