Class: Mkxms::Mssql::View
- Inherits:
-
Object
- Object
- Mkxms::Mssql::View
- Defined in:
- lib/mkxms/mssql/view_handler.rb
Constant Summary collapse
- SQL_OBJECT_TYPE =
'VIEW'
Instance Attribute Summary collapse
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
-
#name ⇒ Object
Returns the value of attribute name.
-
#references ⇒ Object
readonly
Returns the value of attribute references.
-
#schema ⇒ Object
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ View
constructor
A new instance of View.
- #to_sql ⇒ Object
Methods included from Utils::SchemaQualifiedName
Methods included from ExtendedProperties
Methods included from Property::Hosting
Methods included from Property::SchemaScoped
#property_subject_identifiers, #subitem_extended_properties_sql
Constructor Details
#initialize(attrs) ⇒ View
Returns a new instance of View.
14 15 16 17 18 19 |
# File 'lib/mkxms/mssql/view_handler.rb', line 14 def initialize(attrs) @schema = attrs['schema'] @name = attrs['name'] @definition = '' @references = [] end |
Instance Attribute Details
#definition ⇒ Object (readonly)
Returns the value of attribute definition.
22 23 24 |
# File 'lib/mkxms/mssql/view_handler.rb', line 22 def definition @definition end |
#name ⇒ Object
Returns the value of attribute name.
21 22 23 |
# File 'lib/mkxms/mssql/view_handler.rb', line 21 def name @name end |
#references ⇒ Object (readonly)
Returns the value of attribute references.
22 23 24 |
# File 'lib/mkxms/mssql/view_handler.rb', line 22 def references @references end |
#schema ⇒ Object
Returns the value of attribute schema.
21 22 23 |
# File 'lib/mkxms/mssql/view_handler.rb', line 21 def schema @schema end |
Instance Method Details
#to_sql ⇒ Object
24 25 26 27 |
# File 'lib/mkxms/mssql/view_handler.rb', line 24 def to_sql mvdef = AccessObjectDefinition.replace_object_name(definition, "[{filename}]") ([mvdef] + extended_properties_sql).join("\n") end |