Sha256: 4a0b8d550d4934851db44e08b4671bc4f46db37c7eb95db1982b5ea952992d9f

Contents?: true

Size: 998 Bytes

Versions: 28

Compression:

Stored size: 998 Bytes

Contents

module RubyJmeter
  class DSL
    def jdbc_preprocessor(params={}, &block)
      node = RubyJmeter::JdbcPreprocessor.new(params)
      attach_node(node, &block)
    end
  end

  class JdbcPreprocessor
    attr_accessor :doc
    include Helper

    def initialize(params={})
      testname = params.kind_of?(Array) ? 'JdbcPreprocessor' : (params[:name] || 'JdbcPreprocessor')
      @doc = Nokogiri::XML(<<-EOS.strip_heredoc)
<JDBCPreProcessor guiclass="TestBeanGUI" testclass="JDBCPreProcessor" testname="#{testname}" enabled="true">
  <stringProp name="dataSource"/>
  <stringProp name="query"/>
  <stringProp name="queryArguments"/>
  <stringProp name="queryArgumentsTypes"/>
  <stringProp name="queryType">Select Statement</stringProp>
  <stringProp name="resultVariable"/>
  <stringProp name="variableNames"/>
  <stringProp name="queryTimeout"/>
</JDBCPreProcessor>)
      EOS
      update params
      update_at_xpath params if params.is_a?(Hash) && params[:update_at_xpath]
    end
  end

end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
ruby-jmeter-2.12.5 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.12.4 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.12.3 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.12.2 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.12.1 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.12.0 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.22 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.21 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.20 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.19 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.18 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.17 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.16 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.15 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.14 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.13 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.11 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.10 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.9 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb
ruby-jmeter-2.11.8 lib/ruby-jmeter/dsl/jdbc_preprocessor.rb