Class IndexInfo
java.lang.Object
com.couchbase.client.java.query.util.IndexInfo
public class IndexInfo extends Object
Contains meta-information about a N1QL index.
- Since:
- 2.2
- Author:
- Simon Baslé
-
Field Summary
Fields Modifier and Type Field Description static String
PRIMARY_DEFAULT_NAME
-
Constructor Summary
Constructors Constructor Description IndexInfo(JsonObject raw)
-
Method Summary
Modifier and Type Method Description String
condition()
Return theString
representation of the index's condition (the WHERE clause of the index), or an empty String if no condition was set.boolean
equals(Object o)
int
hashCode()
JsonArray
indexKey()
Return anarray
of Strings that represent the index key(s).boolean
isPrimary()
String
keyspace()
String
name()
String
namespace()
JsonObject
raw()
String
rawType()
String
state()
String
toString()
IndexType
type()
-
Field Details
-
PRIMARY_DEFAULT_NAME
- See Also:
- Constant Field Values
-
-
Constructor Details
-
IndexInfo
-
-
Method Details
-
isPrimary
public boolean isPrimary() -
name
-
type
-
rawType
-
state
-
keyspace
- Returns:
- the keyspace for the index, typically the bucket name.
-
namespace
- Returns:
- the namespace for the index. A namespace is a resource pool that contains multiple keyspaces.
- See Also:
keyspace()
-
indexKey
Return anarray
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).- Returns:
- an array of Strings that represent the index key(s), or an empty array in the case of a PRIMARY index.
-
condition
Return theString
representation of the index's condition (the WHERE clause of the index), or an empty String 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).- Returns:
- the condition/WHERE clause of the index or empty string if none.
-
raw
- Returns:
- the raw JSON representation of the index information, as returned by the query service.
-
equals
-
hashCode
public int hashCode() -
toString
-