class Mkxms::Mssql::Role
Attributes
encompassing_roles[R]
name[RW]
owner[RW]
Public Class Methods
new(name, owner: nil)
click to toggle source
# File lib/mkxms/mssql/role_handler.rb, line 10 def initialize(name, owner: nil) @name = name @owner = owner @encompassing_roles = [] end
Public Instance Methods
definition_sql()
click to toggle source
# File lib/mkxms/mssql/role_handler.rb, line 19 def definition_sql "CREATE ROLE #{name};" + extended_properties_sql.joined_on_new_lines end
membership_sql()
click to toggle source
# File lib/mkxms/mssql/role_handler.rb, line 27 def membership_sql encompassing_roles.map do |encompassing_role| "EXEC sp_addrolemember '#{Utils.unquoted_name encompassing_role}', '#{Utils.unquoted_name name}';\n" end.join('') end
property_subject_identifiers()
click to toggle source
# File lib/mkxms/mssql/role_handler.rb, line 33 def property_subject_identifiers ['USER', Utils.unquoted_name(name)] end