Class: Azure::ServiceBus::SqlFilter

Inherits:
Filter show all
Defined in:
lib/azure/service_bus/sql_filter.rb

Direct Known Subclasses

FalseFilter, TrueFilter

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RuleAspect

from_hash

Constructor Details

#initialize(hash = nil) ⇒ SqlFilter

Public: Initialize the SQL Rule Filter.

Attributes

  • hash - The resource options Hash

Options

Accepted key/value pairs in options parameter are:

  • :sql_expression - The SQL expression.

  • :compatibility_level - The compatibility level.



33
34
35
36
37
38
# File 'lib/azure/service_bus/sql_filter.rb', line 33

def initialize(hash=nil)
  hash = {} unless hash
  @sql_expression = hash[:sql_expression] if hash[:sql_expression]
  @compatibility_level = (hash[:compatibility_level] || 20).to_i if hash[:compatibility_level]
  super()
end

Instance Attribute Details

#compatibility_levelObject

Returns the value of attribute compatibility_level.



41
42
43
# File 'lib/azure/service_bus/sql_filter.rb', line 41

def compatibility_level
  @compatibility_level
end

#sql_expressionObject

Returns the value of attribute sql_expression.



40
41
42
# File 'lib/azure/service_bus/sql_filter.rb', line 40

def sql_expression
  @sql_expression
end

Instance Method Details

#to_hash(hash = {}) ⇒ Object



43
44
45
46
47
# File 'lib/azure/service_bus/sql_filter.rb', line 43

def to_hash(hash={})
  hash[:sql_expression]=sql_expression if sql_expression
  hash[:compatibility_level]=compatibility_level.to_s if compatibility_level
  super(hash)
end