Class: Es::AutoincrementField

Inherits:
Field
  • Object
show all
Defined in:
lib/es.rb

Constant Summary

Constants inherited from Field

Field::ATTRIBUTE_TYPE, Field::AUTOINCREMENT_TYPE, Field::DATE_TYPE, Field::DURATION_TYPE, Field::FACT_TYPE, Field::FIELD_TYPES, Field::HID_TYPE, Field::HISTORIC_TYPE, Field::IS_DELETED_TYPE, Field::RECORDID_TYPE, Field::SNAPSHOT_TYPE, Field::TIMEATTRIBUTE_TYPE, Field::TIMESTAMP_TYPE, Field::TIME_TYPE, Field::VELOCITY_TYPE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Field

#==, #initialize, #is_attribute?, #is_date?, #is_duration?, #is_fact?, #is_hid?, #is_recordid?, #is_snapshot?, #is_timestamp?, #is_velocity?, parse, #to_config_generator, #to_config_generator_extract, #to_load_config, #to_load_fragment

Constructor Details

This class inherits a constructor from Es::Field

Instance Attribute Details

#nameObject

Returns the value of attribute name.



903
904
905
# File 'lib/es.rb', line 903

def name
  @name
end

#typeObject

Returns the value of attribute type.



903
904
905
# File 'lib/es.rb', line 903

def type
  @type
end

Instance Method Details

#is_autoincrement?Boolean

Returns:

  • (Boolean)


905
906
907
# File 'lib/es.rb', line 905

def is_autoincrement?
  true
end

#to_extract_fragment(pid, fields, options = {}) ⇒ Object



909
910
911
912
913
914
915
916
917
918
# File 'lib/es.rb', line 909

def to_extract_fragment(pid, fields, options = {})
  {
    :name => name,
    :preferred => name,
    :definition => {
      :type => "generate",
      :data => "autoincrement"
    }
  }
end