Class: Mkxms::Mssql::Synonym
- Inherits:
-
Object
- Object
- Mkxms::Mssql::Synonym
- Defined in:
- lib/mkxms/mssql/synonym_handler.rb
Constant Summary collapse
- SQL_OBJECT_TYPE =
'SYNONYM'
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#referent ⇒ Object
Returns the value of attribute referent.
-
#schema ⇒ Object
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(schema, name, referent) ⇒ Synonym
constructor
A new instance of Synonym.
- #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(schema, name, referent) ⇒ Synonym
Returns a new instance of Synonym.
13 14 15 16 17 |
# File 'lib/mkxms/mssql/synonym_handler.rb', line 13 def initialize(schema, name, referent) @schema = schema @name = name @referent = referent end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/mkxms/mssql/synonym_handler.rb', line 19 def name @name end |
#referent ⇒ Object
Returns the value of attribute referent.
19 20 21 |
# File 'lib/mkxms/mssql/synonym_handler.rb', line 19 def referent @referent end |
#schema ⇒ Object
Returns the value of attribute schema.
19 20 21 |
# File 'lib/mkxms/mssql/synonym_handler.rb', line 19 def schema @schema end |
Instance Method Details
#to_sql ⇒ Object
21 22 23 24 25 26 |
# File 'lib/mkxms/mssql/synonym_handler.rb', line 21 def to_sql [].tap do |lines| lines << "CREATE SYNONYM #{qualified_name} FOR #{referent};" lines.concat extended_properties_sql end.join("\n") end |