Class: Mkxms::Mssql::Statistics
- Inherits:
-
Object
- Object
- Mkxms::Mssql::Statistics
- Extended by:
- Utils::FlagsQueries
- Includes:
- ExtendedProperties
- Defined in:
- lib/mkxms/mssql/statistics_handler.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#name ⇒ Object
Returns the value of attribute name.
-
#relation ⇒ Object
Returns the value of attribute relation.
-
#schema ⇒ Object
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ Statistics
constructor
A new instance of Statistics.
- #name_params_pair ⇒ Object
- #qualified_relation ⇒ Object
- #xmigra_params ⇒ Object
Methods included from Utils::FlagsQueries
Methods included from ExtendedProperties
Constructor Details
#initialize(attrs) ⇒ Statistics
Returns a new instance of Statistics.
11 12 13 14 15 16 17 18 19 |
# File 'lib/mkxms/mssql/statistics_handler.rb', line 11 def initialize(attrs) @schema = attrs['in-schema'] @relation = attrs['on'] @name = attrs['name'] @columns = [] @flags = [] @flags << :manual_recompute if attrs['no-recompute'] end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
22 23 24 |
# File 'lib/mkxms/mssql/statistics_handler.rb', line 22 def columns @columns end |
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
22 23 24 |
# File 'lib/mkxms/mssql/statistics_handler.rb', line 22 def flags @flags end |
#name ⇒ Object
Returns the value of attribute name.
21 22 23 |
# File 'lib/mkxms/mssql/statistics_handler.rb', line 21 def name @name end |
#relation ⇒ Object
Returns the value of attribute relation.
21 22 23 |
# File 'lib/mkxms/mssql/statistics_handler.rb', line 21 def relation @relation end |
#schema ⇒ Object
Returns the value of attribute schema.
21 22 23 |
# File 'lib/mkxms/mssql/statistics_handler.rb', line 21 def schema @schema end |
Instance Method Details
#name_params_pair ⇒ Object
31 32 33 |
# File 'lib/mkxms/mssql/statistics_handler.rb', line 31 def name_params_pair [name, xmigra_params] end |
#qualified_relation ⇒ Object
35 36 37 |
# File 'lib/mkxms/mssql/statistics_handler.rb', line 35 def qualified_relation "#@schema.#@relation" end |
#xmigra_params ⇒ Object
25 26 27 28 29 |
# File 'lib/mkxms/mssql/statistics_handler.rb', line 25 def xmigra_params [qualified_relation, @columns.join(', ')].tap do |result| result << {'with' => 'NORECOMPUTE'} if manual_recompute? end end |