class Mkxms::Mssql::Function

Constants

SQL_OBJECT_TYPE

Attributes

definition[R]
name[RW]
param_properties[R]
references[R]
schema[RW]

Public Class Methods

new(attrs) click to toggle source
# File lib/mkxms/mssql/function_handler.rb, line 14
def initialize(attrs)
  @schema = attrs['schema']
  @name = attrs['name']
  @definition = ''
  @references = []
  @param_properties = Hash.new {|h, k| h[k] = ''}
end

Public Instance Methods

param_properties_sql() click to toggle source
# File lib/mkxms/mssql/function_handler.rb, line 30
def param_properties_sql
  @param_properties.each_pair.map do |k, v|
    Property.addition_sql(k[1], v, property_subject_identifiers + ['PARAMETER', Utils.unquoted_name(k[0])])
  end
end
qualified_name() click to toggle source
# File lib/mkxms/mssql/function_handler.rb, line 36
def qualified_name
  "#@schema.#@name"
end
to_sql() click to toggle source
# File lib/mkxms/mssql/function_handler.rb, line 25
def to_sql
  mvdef = AccessObjectDefinition.replace_object_name(definition, "[{filename}]")
  ([mvdef] + extended_properties_sql + param_properties_sql).join("\n")
end