Class: Couchbase::Management::QueryIndex
- Inherits:
-
Object
- Object
- Couchbase::Management::QueryIndex
- Defined in:
- lib/couchbase/management/query_index_manager.rb
Instance Attribute Summary collapse
-
#condition ⇒ String
The string representation of the index's condition (the WHERE clause of the index), or an empty Optional if no condition was set.
-
#index_key ⇒ Array<String>
An array of Strings that represent the index key(s).
-
#is_primary ⇒ Boolean
(also: #primary?)
True if this is a primary index.
-
#key_space ⇒ String
The key space for the index, typically the bucket name.
-
#name ⇒ String
Name of the index.
-
#name_space ⇒ String
The namespace for the index.
-
#state ⇒ Symbol
State.
-
#type ⇒ :gsi, :view
Type of the index.
Instance Method Summary collapse
-
#initialize {|self| ... } ⇒ QueryIndex
constructor
A new instance of QueryIndex.
Constructor Details
#initialize {|self| ... } ⇒ QueryIndex
Returns a new instance of QueryIndex.
292 293 294 |
# File 'lib/couchbase/management/query_index_manager.rb', line 292 def initialize yield self if block_given? end |
Instance Attribute Details
#condition ⇒ String
that the query service can present the condition in a slightly different manner from when you declared the index. For instance it will wrap expressions with parentheses and show the fields in an escaped format (surrounded by backticks).
Returns the string representation of the index's condition (the WHERE clause of the index), or an empty Optional if no condition was set.
289 290 291 |
# File 'lib/couchbase/management/query_index_manager.rb', line 289 def condition @condition end |
#index_key ⇒ Array<String>
the query service can present the key in a slightly different manner from when you declared the index: for instance, it will show the indexed fields in an escaped format (surrounded by backticks).
Returns an array of Strings that represent the index key(s). The array is empty in the case of a PRIMARY INDEX.
280 281 282 |
# File 'lib/couchbase/management/query_index_manager.rb', line 280 def index_key @index_key end |
#is_primary ⇒ Boolean Also known as: primary?
Returns true if this is a primary index.
260 261 262 |
# File 'lib/couchbase/management/query_index_manager.rb', line 260 def is_primary @is_primary end |
#key_space ⇒ String
Returns the key space for the index, typically the bucket name.
270 271 272 |
# File 'lib/couchbase/management/query_index_manager.rb', line 270 def key_space @key_space end |
#name ⇒ String
Returns name of the index.
257 258 259 |
# File 'lib/couchbase/management/query_index_manager.rb', line 257 def name @name end |
#name_space ⇒ String
Returns the namespace for the index. A namespace is a resource pool that contains multiple key spaces.
273 274 275 |
# File 'lib/couchbase/management/query_index_manager.rb', line 273 def name_space @name_space end |
#state ⇒ Symbol
Returns state.
267 268 269 |
# File 'lib/couchbase/management/query_index_manager.rb', line 267 def state @state end |
#type ⇒ :gsi, :view
Returns type of the index.
264 265 266 |
# File 'lib/couchbase/management/query_index_manager.rb', line 264 def type @type end |