Class: Mkxms::Mssql::Parameter

Inherits:
Struct
  • Object
show all
Includes:
ExtendedProperties
Defined in:
lib/mkxms/mssql/clr_impl.rb

Overview

The Parameter class(es) are defined here because they are only important for CLR-linked objects

Constant Summary collapse

SQL_OBJECT_TYPE =
'PARAMETER'

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ExtendedProperties

#extended_properties

Instance Attribute Details

#capacityObject

Returns the value of attribute capacity

Returns:

  • (Object)

    the current value of capacity



20
21
22
# File 'lib/mkxms/mssql/clr_impl.rb', line 20

def capacity
  @capacity
end

#default_valueObject

Returns the value of attribute default_value

Returns:

  • (Object)

    the current value of default_value



20
21
22
# File 'lib/mkxms/mssql/clr_impl.rb', line 20

def default_value
  @default_value
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



20
21
22
# File 'lib/mkxms/mssql/clr_impl.rb', line 20

def name
  @name
end

#outputObject

Returns the value of attribute output

Returns:

  • (Object)

    the current value of output



20
21
22
# File 'lib/mkxms/mssql/clr_impl.rb', line 20

def output
  @output
end

#precisionObject

Returns the value of attribute precision

Returns:

  • (Object)

    the current value of precision



20
21
22
# File 'lib/mkxms/mssql/clr_impl.rb', line 20

def precision
  @precision
end

#scaleObject

Returns the value of attribute scale

Returns:

  • (Object)

    the current value of scale



20
21
22
# File 'lib/mkxms/mssql/clr_impl.rb', line 20

def scale
  @scale
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



20
21
22
# File 'lib/mkxms/mssql/clr_impl.rb', line 20

def type
  @type
end

#type_schemaObject

Returns the value of attribute type_schema

Returns:

  • (Object)

    the current value of type_schema



20
21
22
# File 'lib/mkxms/mssql/clr_impl.rb', line 20

def type_schema
  @type_schema
end

Instance Method Details

#type_specObject



30
31
32
33
34
35
# File 'lib/mkxms/mssql/clr_impl.rb', line 30

def type_spec
  [type_schema, type].compact.join(".").tap do |result|
    result << "(#{capacity})" if capacity
    result << "(#{[precision, scale].compact.join(', ')})" if precision
  end
end