Class: NoSE::SupportQuery
- Defined in:
- lib/nose/statements/query.rb
Overview
A query required to support an update
Instance Attribute Summary collapse
-
#entity ⇒ Object
readonly
Returns the value of attribute entity.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#statement ⇒ Object
readonly
Returns the value of attribute statement.
Attributes inherited from Query
Attributes included from StatementConditions
Attributes inherited from Statement
#comment, #eq_fields, #graph, #group, #key_path, #label, #range_field, #text
Instance Method Summary collapse
-
#==(other) ⇒ Object
(also: #eql?)
Support queries must also have their statement and index checked.
- #hash ⇒ Object
-
#initialize(entity, params, text, group: nil, label: nil) ⇒ SupportQuery
constructor
A new instance of SupportQuery.
-
#to_color ⇒ Object
:nocov:.
Methods inherited from Query
#all_fields, #join_order, parse, #read_only?, #unparse
Methods included from StatementConditions
included, #populate_conditions
Methods inherited from Statement
#materialize_view, parse, #read_only?, #requires_delete?, #requires_insert?
Constructor Details
#initialize(entity, params, text, group: nil, label: nil) ⇒ SupportQuery
Returns a new instance of SupportQuery.
138 139 140 141 142 |
# File 'lib/nose/statements/query.rb', line 138 def initialize(entity, params, text, group: nil, label: nil) super params, text, group: group, label: label @entity = entity end |
Instance Attribute Details
#entity ⇒ Object (readonly)
Returns the value of attribute entity.
136 137 138 |
# File 'lib/nose/statements/query.rb', line 136 def entity @entity end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
136 137 138 |
# File 'lib/nose/statements/query.rb', line 136 def index @index end |
#statement ⇒ Object (readonly)
Returns the value of attribute statement.
136 137 138 |
# File 'lib/nose/statements/query.rb', line 136 def statement @statement end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
Support queries must also have their statement and index checked
145 146 147 148 |
# File 'lib/nose/statements/query.rb', line 145 def ==(other) other.is_a?(SupportQuery) && @statement == other.statement && @index == other.index && @comment == other.comment end |
#hash ⇒ Object
151 152 153 |
# File 'lib/nose/statements/query.rb', line 151 def hash @hash ||= Zlib.crc32_combine super, @index.hash, @index.hash_str.length end |
#to_color ⇒ Object
:nocov:
156 157 158 |
# File 'lib/nose/statements/query.rb', line 156 def to_color super.to_color + ' for [magenta]' + @index.key + '[/]' end |