Class: Exwiw::DbIntrospector::Column

Inherits:
Data
  • Object
show all
Defined in:
lib/exwiw/db_introspector.rb

Overview

One column of a table, in the vocabulary DefaultMask.for speaks:

  • type is an ActiveRecord-ish symbol (:string, :integer, ...) or nil when the database type has no equivalent there. nil is deliberate and safe: DefaultMask emits no mask for a type it does not recognize, so an exotic column is exported unmasked-but-flagged rather than masked with a value it cannot hold.
  • limit is the character length for text-ish columns, else nil.
  • array marks a PostgreSQL ARRAY column, where no scalar mask fits.
  • default is the column's default as a Ruby scalar, or nil when it is absent or is an expression the database evaluates per row.

Instance Attribute Summary collapse

Instance Attribute Details

#arrayObject (readonly)

Returns the value of attribute array

Returns:

  • (Object)

    the current value of array



43
44
45
# File 'lib/exwiw/db_introspector.rb', line 43

def array
  @array
end

#defaultObject (readonly)

Returns the value of attribute default

Returns:

  • (Object)

    the current value of default



43
44
45
# File 'lib/exwiw/db_introspector.rb', line 43

def default
  @default
end

#limitObject (readonly)

Returns the value of attribute limit

Returns:

  • (Object)

    the current value of limit



43
44
45
# File 'lib/exwiw/db_introspector.rb', line 43

def limit
  @limit
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



43
44
45
# File 'lib/exwiw/db_introspector.rb', line 43

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



43
44
45
# File 'lib/exwiw/db_introspector.rb', line 43

def type
  @type
end