Module: ElasticGraph::Warehouse::SchemaDefinition::FactoryExtension Private
- Defined in:
- elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Extension module applied to ElasticGraph::SchemaDefinition::Factory to add warehouse field type support.
Instance Method Summary collapse
-
#new_enum_type(name) {|ElasticGraph::SchemaDefinition::SchemaElements::EnumType| ... } ⇒ ElasticGraph::SchemaDefinition::SchemaElements::EnumType
private
Creates a new enum type with warehouse extensions.
-
#new_index(name, settings, type) {|ElasticGraph::SchemaDefinition::Indexing::Index| ... } ⇒ ElasticGraph::SchemaDefinition::Indexing::Index
private
Creates a new index with warehouse extensions.
-
#new_interface_type(name) {|ElasticGraph::SchemaDefinition::SchemaElements::InterfaceType| ... } ⇒ ElasticGraph::SchemaDefinition::SchemaElements::InterfaceType
private
Creates a new interface type with warehouse extensions.
-
#new_object_type(name) {|ElasticGraph::SchemaDefinition::SchemaElements::ObjectType| ... } ⇒ ElasticGraph::SchemaDefinition::SchemaElements::ObjectType
private
Creates a new object type with warehouse extensions.
-
#new_results ⇒ ElasticGraph::SchemaDefinition::Results
private
Creates a new Results instance with warehouse extensions.
-
#new_scalar_type(name) {|ElasticGraph::SchemaDefinition::SchemaElements::ScalarType| ... } ⇒ ElasticGraph::SchemaDefinition::SchemaElements::ScalarType
private
Creates a new scalar type with warehouse extensions.
-
#new_schema_artifact_manager ⇒ ElasticGraph::SchemaDefinition::SchemaArtifactManager
private
Creates a new SchemaArtifactManager instance with warehouse extensions.
-
#new_union_type(name) {|ElasticGraph::SchemaDefinition::SchemaElements::UnionType| ... } ⇒ ElasticGraph::SchemaDefinition::SchemaElements::UnionType
private
Creates a new union type with warehouse extensions.
Instance Method Details
#new_enum_type(name) {|ElasticGraph::SchemaDefinition::SchemaElements::EnumType| ... } ⇒ ElasticGraph::SchemaDefinition::SchemaElements::EnumType
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new enum type with warehouse extensions.
28 29 30 31 32 33 |
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 28 def new_enum_type(name) super(name) do |type| type.extend EnumTypeExtension yield type if block_given? end end |
#new_index(name, settings, type) {|ElasticGraph::SchemaDefinition::Indexing::Index| ... } ⇒ ElasticGraph::SchemaDefinition::Indexing::Index
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new index with warehouse extensions. Automatically creates a warehouse table with the same name as the index unless one is explicitly defined or the index is excluded from the warehouse.
44 45 46 47 48 49 50 |
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 44 def new_index(name, settings, type, &block) super(name, settings, type) do |index| extended_index = index.extend IndexExtension # : ::ElasticGraph::SchemaDefinition::Indexing::Index & IndexExtension extended_index.warehouse_table(name) block&.call(extended_index) end end |
#new_interface_type(name) {|ElasticGraph::SchemaDefinition::SchemaElements::InterfaceType| ... } ⇒ ElasticGraph::SchemaDefinition::SchemaElements::InterfaceType
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new interface type with warehouse extensions.
57 58 59 60 61 62 |
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 57 def new_interface_type(name) super(name) do |type| type.extend ObjectInterfaceAndUnionExtension yield type if block_given? end end |
#new_object_type(name) {|ElasticGraph::SchemaDefinition::SchemaElements::ObjectType| ... } ⇒ ElasticGraph::SchemaDefinition::SchemaElements::ObjectType
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new object type with warehouse extensions.
69 70 71 72 73 74 |
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 69 def new_object_type(name) super(name) do |type| type.extend ObjectInterfaceAndUnionExtension yield type if block_given? end end |
#new_results ⇒ ElasticGraph::SchemaDefinition::Results
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new Results instance with warehouse extensions.
103 104 105 106 107 |
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 103 def new_results super.tap do |results| results.extend ResultsExtension end end |
#new_scalar_type(name) {|ElasticGraph::SchemaDefinition::SchemaElements::ScalarType| ... } ⇒ ElasticGraph::SchemaDefinition::SchemaElements::ScalarType
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new scalar type with warehouse extensions.
81 82 83 84 85 86 |
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 81 def new_scalar_type(name) super(name) do |type| type.extend ScalarTypeExtension yield type if block_given? end end |
#new_schema_artifact_manager ⇒ ElasticGraph::SchemaDefinition::SchemaArtifactManager
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new SchemaArtifactManager instance with warehouse extensions.
112 113 114 115 116 |
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 112 def new_schema_artifact_manager(...) super.tap do |manager| manager.extend SchemaArtifactManagerExtension end end |
#new_union_type(name) {|ElasticGraph::SchemaDefinition::SchemaElements::UnionType| ... } ⇒ ElasticGraph::SchemaDefinition::SchemaElements::UnionType
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new union type with warehouse extensions.
93 94 95 96 97 98 |
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 93 def new_union_type(name) super(name) do |type| type.extend ObjectInterfaceAndUnionExtension yield type if block_given? end end |