Interface IIndexable
An interface describing an object That can create, delete, or retrieve a list of existing IIndex objects by name
Namespace: Couchbase.Lite.Query
Assembly: Couchbase.Lite.dll
Syntax
public interface IIndexable
Methods
| Improve this Doc View SourceCreateIndex(String, IndexConfiguration)
Creates a SQL index which could be a value index from ValueIndexConfiguration or a full-text search index from FullTextIndexConfiguration with the given name. The name can be used for deleting the index. Creating a new different index with an existing index name will replace the old index; creating the same index with the same name will be no-ops.
Declaration
void CreateIndex(string name, IndexConfiguration indexConfig)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The index name |
IndexConfiguration | indexConfig | The index |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
CouchbaseException | Thrown if an error condition is returned from LiteCore |
System.InvalidOperationException | Thrown if this method is called after the database is closed |
System.NotSupportedException | Thrown if an implementation of IIndex other than one of the library provided ones is used |
DeleteIndex(String)
Deletes the index with the given name
Declaration
void DeleteIndex(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the index to delete |
GetIndexes()
Gets a list of index names that are present in the database
Declaration
IList<string> GetIndexes()
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> | The list of created index names |