Module: Neo4j::Core::Index::ClassMethods
- Included in:
- Node, Relationship
- Defined in:
- lib/neo4j-core/index/class_methods.rb
Instance Attribute Summary (collapse)
-
- (Object) _indexer
readonly
The indexer which we are delegating to.
Instance Method Summary (collapse)
- - (Object) _config
-
- (Object) add_index(*args, &block)
Delegates the `add_index` message to @_indexer instance with the supplied parameters.
-
- (Object) find(*args, &block)
Delegates the `find` message to @_indexer instance with the supplied parameters.
-
- (Object) has_index_type?(*args, &block)
Delegates the `has_index_type?` message to @_indexer instance with the supplied parameters.
-
- (Object) index(*args, &block)
Delegates the `index` message to @_indexer instance with the supplied parameters.
-
- (Object) index?(*args, &block)
Delegates the `index?` message to @_indexer instance with the supplied parameters.
-
- (Object) index_for_type(*args, &block)
Delegates the `index_for_type` message to @_indexer instance with the supplied parameters.
-
- (Object) index_name_for_type(*args, &block)
Delegates the `index_name_for_type` message to @_indexer instance with the supplied parameters.
-
- (Object) index_type(*args, &block)
Delegates the `index_type` message to @_indexer instance with the supplied parameters.
- - (Object) indexer(index_config)
-
- (Neo4j::Core::Index::Indexer) node_indexer(config = _config || IndexConfig.new(:node)) { ... }
Sets which indexer should be used for the given node class.
-
- (Object) put_if_absent(*args, &block)
Delegates the `put_if_absent` message to @_indexer instance with the supplied parameters.
-
- (Neo4j::Core::Index::Indexer) rel_indexer(config = _config || IndexConfig.new(:rel), &config_dsl)
Sets which indexer should be used for the given relationship class Same as #node_indexer except that it indexes relationships instead of nodes.
-
- (Object) rm_index(*args, &block)
Delegates the `rm_index` message to @_indexer instance with the supplied parameters.
-
- (Object) rm_index_config(*args, &block)
Delegates the `rm_index_config` message to @_indexer instance with the supplied parameters.
-
- (Object) rm_index_type(*args, &block)
Delegates the `rm_index_type` message to @_indexer instance with the supplied parameters.
-
- (Object) trigger_on(hash)
You can specify which nodes should be triggered.
Instance Attribute Details
- (Object) _indexer (readonly)
The indexer which we are delegating to
7 8 9 |
# File 'lib/neo4j-core/index/class_methods.rb', line 7 def _indexer @_indexer end |
Instance Method Details
- (Object) _config
48 49 50 |
# File 'lib/neo4j-core/index/class_methods.rb', line 48 def _config @_indexer && @_indexer.config end |
- (Object) add_index(*args, &block)
Delegates the `add_index` message to @_indexer instance with the supplied parameters.
92 |
# File 'lib/neo4j-core/index/class_methods.rb', line 92 delegate :add_index |
- (Object) find(*args, &block)
Delegates the `find` message to @_indexer instance with the supplied parameters.
87 |
# File 'lib/neo4j-core/index/class_methods.rb', line 87 delegate :find |
- (Object) has_index_type?(*args, &block)
Delegates the `has_index_type?` message to @_indexer instance with the supplied parameters.
89 |
# File 'lib/neo4j-core/index/class_methods.rb', line 89 delegate :has_index_type? |
- (Object) index(*args, &block)
Delegates the `index` message to @_indexer instance with the supplied parameters.
86 |
# File 'lib/neo4j-core/index/class_methods.rb', line 86 delegate :index |
- (Object) index?(*args, &block)
Delegates the `index?` message to @_indexer instance with the supplied parameters.
88 |
# File 'lib/neo4j-core/index/class_methods.rb', line 88 delegate :index? |
- (Object) index_for_type(*args, &block)
Delegates the `index_for_type` message to @_indexer instance with the supplied parameters.
96 |
# File 'lib/neo4j-core/index/class_methods.rb', line 96 delegate :index_for_type |
- (Object) index_name_for_type(*args, &block)
Delegates the `index_name_for_type` message to @_indexer instance with the supplied parameters.
95 |
# File 'lib/neo4j-core/index/class_methods.rb', line 95 delegate :index_name_for_type |
- (Object) index_type(*args, &block)
Delegates the `index_type` message to @_indexer instance with the supplied parameters.
94 |
# File 'lib/neo4j-core/index/class_methods.rb', line 94 delegate :index_type |
- (Object) indexer(index_config)
52 53 54 |
# File 'lib/neo4j-core/index/class_methods.rb', line 52 def indexer(index_config) @_indexer ||= IndexerRegistry.instance.register(Indexer.new(index_config)) end |
- (Neo4j::Core::Index::Indexer) node_indexer(config = _config || IndexConfig.new(:node)) { ... }
Sets which indexer should be used for the given node class. You can share an indexer between several different classes.
33 34 35 36 |
# File 'lib/neo4j-core/index/class_methods.rb', line 33 def node_indexer(config = _config || IndexConfig.new(:node), &config_dsl) config.instance_eval(&config_dsl) indexer(config) end |
- (Object) put_if_absent(*args, &block)
Delegates the `put_if_absent` message to @_indexer instance with the supplied parameters.
97 |
# File 'lib/neo4j-core/index/class_methods.rb', line 97 delegate :put_if_absent |
- (Neo4j::Core::Index::Indexer) rel_indexer(config = _config || IndexConfig.new(:rel), &config_dsl)
Sets which indexer should be used for the given relationship class Same as #node_indexer except that it indexes relationships instead of nodes.
43 44 45 46 |
# File 'lib/neo4j-core/index/class_methods.rb', line 43 def rel_indexer(config = _config || IndexConfig.new(:rel), &config_dsl) config.instance_eval(&config_dsl) indexer(config) end |
- (Object) rm_index(*args, &block)
Delegates the `rm_index` message to @_indexer instance with the supplied parameters.
93 |
# File 'lib/neo4j-core/index/class_methods.rb', line 93 delegate :rm_index |
- (Object) rm_index_config(*args, &block)
Delegates the `rm_index_config` message to @_indexer instance with the supplied parameters.
91 |
# File 'lib/neo4j-core/index/class_methods.rb', line 91 delegate :rm_index_config |
- (Object) rm_index_type(*args, &block)
Delegates the `rm_index_type` message to @_indexer instance with the supplied parameters.
90 |
# File 'lib/neo4j-core/index/class_methods.rb', line 90 delegate :rm_index_type |
- (Object) trigger_on(hash)
You can specify which nodes should be triggered. The index can be triggered by one or more properties having one or more values. This can also be done using the #node_indexer or #rel_indexer methods.
63 64 65 |
# File 'lib/neo4j-core/index/class_methods.rb', line 63 def trigger_on(hash) _config.trigger_on(hash) end |