Exists #
Checks if a collection exists in Kuzzle.
Arguments #
Exists(index string, collection string, options types.QueryOptions) (bool, error)
Arguments | Type | Description |
---|---|---|
index | string | Index name |
collection | string | Collection name |
options | types.QueryOptions | An object containing query options |
options #
Additional query options
Property | Type | Description | Default |
---|---|---|---|
queuable | bool | Make this request queuable or not | true |
Return #
True if the collection exists
Usage #
exists, err := kuzzle.Collection.Exists("nyc-open-data", "green-taxi", nil)
if err != nil {
log.Fatal(err)
} else if exists {
fmt.Println("Success")
}
Edit this page on Github(opens new window)