Class: Mkxms::Mssql::ResultType
- Inherits:
-
Struct
- Object
- Struct
- Mkxms::Mssql::ResultType
- Defined in:
- lib/mkxms/mssql/clr_impl.rb
Overview
Used for scalar and result table column type specification
Instance Attribute Summary collapse
-
#capacity ⇒ Object
Returns the value of attribute capacity.
-
#collation ⇒ Object
Returns the value of attribute collation.
-
#name ⇒ Object
Returns the value of attribute name.
-
#precision ⇒ Object
Returns the value of attribute precision.
-
#scale ⇒ Object
Returns the value of attribute scale.
-
#schema ⇒ Object
Returns the value of attribute schema.
Instance Method Summary collapse
Instance Attribute Details
#capacity ⇒ Object
Returns the value of attribute capacity
49 50 51 |
# File 'lib/mkxms/mssql/clr_impl.rb', line 49 def capacity @capacity end |
#collation ⇒ Object
Returns the value of attribute collation
49 50 51 |
# File 'lib/mkxms/mssql/clr_impl.rb', line 49 def collation @collation end |
#name ⇒ Object
Returns the value of attribute name
49 50 51 |
# File 'lib/mkxms/mssql/clr_impl.rb', line 49 def name @name end |
#precision ⇒ Object
Returns the value of attribute precision
49 50 51 |
# File 'lib/mkxms/mssql/clr_impl.rb', line 49 def precision @precision end |
#scale ⇒ Object
Returns the value of attribute scale
49 50 51 |
# File 'lib/mkxms/mssql/clr_impl.rb', line 49 def scale @scale end |
#schema ⇒ Object
Returns the value of attribute schema
49 50 51 |
# File 'lib/mkxms/mssql/clr_impl.rb', line 49 def schema @schema end |
Instance Method Details
#type_spec ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/mkxms/mssql/clr_impl.rb', line 50 def type_spec [schema, name].compact.join('.').tap do |result| result << "(#{capacity})" if capacity result << "(#{[precision, scale].compact.join(', ')})" result << " COLLATE #{collation}" if collation end end |