class Twb::Connection
Attributes
attributes[R]
node[R]
xmlType[R]
Public Class Methods
attributeNames()
click to toggle source
# File lib/twb/connection.rb, line 24 def self.attributeNames @@attributeNames ||= [ 'authentication', 'authentication-type', 'auto-extract', 'channel', 'character-set', 'class', 'cleaning', 'compat', 'compressed-responses', 'compressed-responses-bulk', 'compressed-responses-rest', 'compressed-responses-soap', 'connection-type', 'dataRefreshTime', 'dbname', 'directory', 'disable-unicode', 'driver', 'enum-with-permissions', 'expected-driver-version', 'filename', 'force-character-set', 'force-header', 'force-separator', 'header', 'imex', 'interpretationMode', 'maxfieldlength', 'mdwpath', 'odbc-connect-string-extras', 'odbc-native-protocol', 'one-time-sql', 'pagesize', 'password', 'port', 'prefer-ind-semantics', 'query-band-spec', 'REDIRECT_URI', 'salesforce-api-version', 'schema', 'SCOPE', 'separator', 'server', 'server-oauth', 'service', 'sf-total-requestor-buffer-size-in-mb', 'show', 'tableau-ri', 'tablename', 'temporary', 'update-time', 'updated-database', 'use-nonemptycrossjoin', 'userLanguage', 'username', 'validate', 'workgroup-auth-mode' ] end
new(node)
click to toggle source
node: XML element
# File lib/twb/connection.rb, line 89 def initialize node @node = node @xmlType = node.type @path = node.path.gsub(/\[[0-9]+\]/,'') @pathNum = /(\d+)/.match(@path) @name = nil end
Public Instance Methods
processConnection(path)
click to toggle source
# File lib/twb/connection.rb, line 97 def processConnection path conns = @node.xpath(path) conns.each do |connNode| connClass = @dsclass cpath = conn.path connPath = cpath. connPNum = # puts cpath, connPath # puts "CPATH: #{cpath}" conn.attributes.each do |name,value| # puts "\n\t\t - %-15s -> %-s" % [name, value] $csvFile << [ $recCount += 1, $twbName, $dir, $build, $version, $dsName, $dstype, $dsuiname, connClass, connPath, connPNum, name, value.value ] end end end
Private Instance Methods
loadAttributes()
click to toggle source
# File lib/twb/connection.rb, line 124 def loadAttributes @attributes = {} nodeAttrs = @node.attributes @@attributeNames.each do |a| @attributes[a] = nodeAttrs[a] end return @attributes end