Class: Tarantool::Client::SpaceInfo::Field

Inherits:
Data
  • Object
show all
Defined in:
tarantool-client/lib/tarantool/client/space_info.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#is_nullable ⇒ Object (readonly)

Returns the value of attribute is_nullable

Returns:

  • (Object) —

    the current value of is_nullable



22
23
24
# File 'tarantool-client/lib/tarantool/client/space_info.rb', line 22

def is_nullable
  @is_nullable
end

#name ⇒ Object (readonly)

Returns the value of attribute name

Returns:

  • (Object) —

    the current value of name



22
23
24
# File 'tarantool-client/lib/tarantool/client/space_info.rb', line 22

def name
  @name
end

#type ⇒ Object (readonly)

Returns the value of attribute type

Returns:

  • (Object) —

    the current value of type



22
23
24
# File 'tarantool-client/lib/tarantool/client/space_info.rb', line 22

def type
  @type
end

Class Method Details

.from_raw(raw) ⇒ Object

A format entry without a type accepts any value.



24
25
26
# File 'tarantool-client/lib/tarantool/client/space_info.rb', line 24

def self.from_raw(raw)
  new(name: raw['name'], type: raw.fetch('type', 'any'), is_nullable: raw.fetch('is_nullable', false))
end