public class QueryIndex extends Object
Modifier and Type | Method and Description |
---|---|
String |
bucketName()
If present, returns the name of the bucket this index is stored in.
|
Optional<String> |
collectionName()
If present, returns the name of the collection this index is stored in.
|
Optional<String> |
condition()
Returns the
String representation of the index's condition (the WHERE clause of the index), or an empty
Optional if no condition was set. |
boolean |
equals(Object o) |
int |
hashCode() |
JsonArray |
indexKey()
Returns an
array of Strings that represent the index key(s). |
String |
keyspace()
Returns the keyspace of this index.
|
String |
name()
Returns the name of this index.
|
String |
namespace()
Returns the namespace of this index.
|
Optional<String> |
partition()
If present, returns the configured partition for the index.
|
boolean |
primary()
True if this index is a primary index.
|
JsonObject |
raw()
Returns the JSON as it arrived from the server.
|
Optional<String> |
scopeName()
If present, returns the name of the scope this index is stored in.
|
String |
state()
Returns the state in which the index is in (i.e.
|
String |
toString() |
String |
type()
Returns the index type (most likely "gsi").
|
public boolean primary()
public String name()
public String type()
public String state()
public String keyspace()
If the index is at the bucket-level, this will return the bucket name. If the index is at the collection-level, the keyspace is the name of the collection.
public String namespace()
The namespace should not be confused with the keyspace - the namespace usually is "default".
public JsonArray indexKey()
array
of Strings that represent the index key(s).
The array is empty in the case of a PRIMARY INDEX.
Note that 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).
public Optional<String> condition()
String
representation of the index's condition (the WHERE clause of the index), or an empty
Optional if no condition was set.
Note 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).
public Optional<String> partition()
public Optional<String> scopeName()
public String bucketName()
public Optional<String> collectionName()
public JsonObject raw()
Copyright © 2024 Couchbase, Inc.. All rights reserved.