Class: ActiveRecord::ConnectionAdapters::Redshift::ColumnDefinition

Inherits:
Struct
  • Object
show all
Defined in:
lib/active_record/connection_adapters/redshift/schema_definitions.rb

Overview

All this to add ‘encoding’ to Structure

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#afterObject

Returns the value of attribute after

Returns:

  • (Object)

    the current value of after



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def after
  @after
end

#arrayObject

From PostgreSQL to maintain compatability



8
9
10
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 8

def array
  @array
end

#auto_incrementObject

Returns the value of attribute auto_increment

Returns:

  • (Object)

    the current value of auto_increment



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def auto_increment
  @auto_increment
end

#collationObject

Returns the value of attribute collation

Returns:

  • (Object)

    the current value of collation



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def collation
  @collation
end

#commentObject

Returns the value of attribute comment

Returns:

  • (Object)

    the current value of comment



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def comment
  @comment
end

#defaultObject

Returns the value of attribute default

Returns:

  • (Object)

    the current value of default



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def default
  @default
end

#encodingObject

Returns the value of attribute encoding

Returns:

  • (Object)

    the current value of encoding



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def encoding
  @encoding
end

#firstObject

Returns the value of attribute first

Returns:

  • (Object)

    the current value of first



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def first
  @first
end

#limitObject

Returns the value of attribute limit

Returns:

  • (Object)

    the current value of limit



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def limit
  @limit
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def name
  @name
end

#nullObject

Returns the value of attribute null

Returns:

  • (Object)

    the current value of null



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def null
  @null
end

#precisionObject

Returns the value of attribute precision

Returns:

  • (Object)

    the current value of precision



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def precision
  @precision
end

#primary_keyObject

Returns the value of attribute primary_key

Returns:

  • (Object)

    the current value of primary_key



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def primary_key
  @primary_key
end

#scaleObject

Returns the value of attribute scale

Returns:

  • (Object)

    the current value of scale



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def scale
  @scale
end

#sql_typeObject

Returns the value of attribute sql_type

Returns:

  • (Object)

    the current value of sql_type



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def sql_type
  @sql_type
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



6
7
8
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 6

def type
  @type
end

Instance Method Details

#primary_key?Boolean

From Abstract to maintain compatability

Returns:

  • (Boolean)


11
12
13
# File 'lib/active_record/connection_adapters/redshift/schema_definitions.rb', line 11

def primary_key?
  primary_key || type.to_sym == :primary_key
end