Class: Deimos::SchemaClass::Record

Inherits:
Base
  • Object
show all
Defined in:
sig/defs.rbs

Overview

Base Class of Record Classes generated from Avro.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, #[]=, #as_json, #hash, #initialize, #inspect

Constructor Details

This class inherits a constructor from Deimos::SchemaClass::Base

Instance Attribute Details

#tombstone_keyObject

Returns the value of attribute tombstone_key.

Returns:

  • (Object)


802
803
804
# File 'sig/defs.rbs', line 802

def tombstone_key
  @tombstone_key
end

Class Method Details

.initialize_from_valueSchemaClass::Record

Parameters:

  • value (Object)

Returns:



799
# File 'sig/defs.rbs', line 799

def self.initialize_from_value: (Object value) -> SchemaClass::Record

Instance Method Details

#[]Object

Element access method as if this Object were a hash

@param key

@return — The value of the attribute if exists, nil otherwise

Parameters:

  • key (String, Symbol)

Returns:

  • (Object)


780
# File 'sig/defs.rbs', line 780

def []: ((String | Symbol) key) -> Object

#full_schemaString

Returns the full schema name of the inheriting class.

Returns:

  • (String)


791
# File 'sig/defs.rbs', line 791

def full_schema: () -> String

#mergeSchemaClass::Base

Merge a hash or an identical schema object with this one and return a new object.

@param other_hash

Parameters:

Returns:



773
# File 'sig/defs.rbs', line 773

def merge: ((::Hash[untyped, untyped] | SchemaClass::Base) other_hash) -> SchemaClass::Base

#namespaceString

Returns the namespace for the schema of the inheriting class.

Returns:

  • (String)


788
# File 'sig/defs.rbs', line 788

def namespace: () -> String

#schemaString

Returns the schema name of the inheriting class.

Returns:

  • (String)


785
# File 'sig/defs.rbs', line 785

def schema: () -> String

#schema_fields::Array[String]

@return — an array of fields names in the schema.

Returns:

  • (::Array[String])


797
# File 'sig/defs.rbs', line 797

def schema_fields: () -> ::Array[String]

#to_h::Hash[untyped, untyped]

Converts the object attributes to a hash which can be used for Kafka

@return — the payload as a hash.

Returns:

  • (::Hash[untyped, untyped])


768
# File 'sig/defs.rbs', line 768

def to_h: () -> ::Hash[untyped, untyped]

#validatorDeimos::SchemaBackends::Base

Returns the schema validator from the schema backend



794
# File 'sig/defs.rbs', line 794

def validator: () -> Deimos::SchemaBackends::Base

#with_indifferent_accessSchemaClass::Record

Returns:



782
# File 'sig/defs.rbs', line 782

def with_indifferent_access: () -> SchemaClass::Record