class Albacore::Sql::Config

The configuration class for SqlCmd. MSDN docs at: msdn.microsoft.com/en-us/library/ms162773.aspx

Attributes

database[W]

this is the database for SqlCmd

password[W]

this is the password for SqlCmd

scripts[W]

this is the scripts for SqlCmd

server[W]

this is the server for SqlCmd

username[W]

this is the username for SqlCmd

Public Class Methods

new() click to toggle source
# File lib/albacore/task_types/sql_cmd.rb, line 45
def initialize
  @parameters = Set.new

  w = lambda { |e| CrossPlatformCmd.which(e) ? e : nil }

  @exe = w.call( "SqlCmd" ) 

  debug { "SqlCmd using '#{@exe}'" }

end

Public Instance Methods

opts() click to toggle source

gets the options specified for the task, used from the task

# File lib/albacore/task_types/sql_cmd.rb, line 79
def opts

  Map.new({
    :exe      => @exe,
    :parameters => @parameters,
    :scripts  => @scripts,
    :original_path => FileUtils.pwd
  })
end
trusted_connection() click to toggle source
# File lib/albacore/task_types/sql_cmd.rb, line 56
def trusted_connection
  @parameters.add('-E')
end