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

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.

Parameters:

  • name (String)

    the name of the enum type

Yields:

Returns:



27
28
29
30
31
32
33
34
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 27

def new_enum_type(name)
  super(name) do |type|
    type.extend EnumTypeExtension
    # :nocov: -- currently all invocations have a block
    yield type if block_given?
    # :nocov:
  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.

Parameters:

  • name (String)

    the name of the index

  • settings (Hash)

    additional settings for the index

  • type (Object)

    the type this index is for

Yields:

Returns:



43
44
45
46
47
48
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 43

def new_index(name, settings, type, &block)
  super(name, settings, type) do |index|
    index.extend IndexExtension
    block&.call(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.

Parameters:

  • name (String)

    the name of the interface type

Yields:

Returns:



55
56
57
58
59
60
61
62
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 55

def new_interface_type(name)
  super(name) do |type|
    type.extend ObjectInterfaceAndUnionExtension
    # :nocov: -- currently all invocations have a block
    yield type if block_given?
    # :nocov:
  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.

Parameters:

  • name (String)

    the name of the object type

Yields:

Returns:



69
70
71
72
73
74
75
76
# 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
    # :nocov: -- currently all invocations have a block
    yield type if block_given?
    # :nocov:
  end
end

#new_resultsElasticGraph::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.

Returns:



109
110
111
112
113
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 109

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.

Parameters:

  • name (String)

    the name of the scalar type

Yields:

Returns:



83
84
85
86
87
88
89
90
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 83

def new_scalar_type(name)
  super(name) do |type|
    type.extend ScalarTypeExtension
    # :nocov: -- currently all invocations have a block
    yield type if block_given?
    # :nocov:
  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.

Parameters:

  • name (String)

    the name of the union type

Yields:

Returns:



97
98
99
100
101
102
103
104
# File 'elasticgraph-warehouse/lib/elastic_graph/warehouse/schema_definition/factory_extension.rb', line 97

def new_union_type(name)
  super(name) do |type|
    type.extend ObjectInterfaceAndUnionExtension
    # :nocov: -- currently all invocations have a block
    yield type if block_given?
    # :nocov:
  end
end