Couchbase C Client  2.10.0
Asynchronous C Client for Couchbase
lcb_N1XSPEC Struct Reference


More...

#include <ixmgmt.h>

Data Fields

const char * rawjson
 Raw JSON returned from server. More...
 
size_t nrawjson
 
const char * name
 Name of the index. More...
 
size_t nname
 
const char * keyspace
 Keyspace or "bucket" of the index. More...
 
size_t nkeyspace
 
const char * nspace
 'namespace'. More...
 
size_t nnspace
 
const char * state
 Output parameter only. More...
 
size_t nstate
 
const char * fields
 Actual index text. More...
 
size_t nfields
 
const char * cond
 Indexing condition. More...
 
size_t ncond
 
unsigned flags
 Modifiers for the index itself. More...
 
unsigned ixtype
 Type of this index, Can be LCB_N1XSPEC_T_DEFAULT for the default server type, or an explicit LCB_N1XSPEC_T_GSI or LCB_N1XSPEC_T_VIEW. More...
 

Detailed Description


Stability
Volatile:

Structure representing a single index definition

Field Documentation

◆ rawjson

const char* rawjson

Raw JSON returned from server.

Can be used to decode fields in future versions not present within the library.

This field can also be used as an input field to populate the other fields in this structure. This means that if you have a raw JSON representation of an index, you need only set this field (and nrawjson). The library will internally parse the raw JSON and populate the internal equivalents of the fields in this structure.

Note that when using this field as an input for creating indexes, you should still set the flags field if you wish to set flags (e.g. in order to create a deferred-build index).

◆ nrawjson

size_t nrawjson

◆ name

const char* name

Name of the index.

For raw JSON, use the name propery

◆ nname

size_t nname

◆ keyspace

const char* keyspace

Keyspace or "bucket" of the index.

For raw JSON, use the keyspace_id property

◆ nkeyspace

size_t nkeyspace

◆ nspace

const char* nspace

'namespace'.

Currently unused

◆ nnspace

size_t nnspace

◆ state

const char* state

Output parameter only.

State of index

◆ nstate

size_t nstate

◆ fields

const char* fields

Actual index text.

For raw JSON use the index_key property. The value for this field is a properly-encoded JSON array of fields to index. e.g.

spec.fields = "[\"`name`\", \"`email`\", \"`ctime`\"]"

◆ nfields

size_t nfields

◆ cond

const char* cond

Indexing condition.

If set, only field values matching this condition will be indexed

◆ ncond

size_t ncond

◆ flags

unsigned flags

Modifiers for the index itself.

This might be LCB_N1XSPEC_F_PRIMARY if the index is primary. For raw JSON, use "is_primary":true

For creation the LCB_N1XSPEC_F_DEFER option is also accepted to indicate that the building of this index should be deferred.

Examples:
example/minimal/query.c.

◆ ixtype

unsigned ixtype

Type of this index, Can be LCB_N1XSPEC_T_DEFAULT for the default server type, or an explicit LCB_N1XSPEC_T_GSI or LCB_N1XSPEC_T_VIEW.

When using JSON, specify "using":"gsi"

Examples:
example/minimal/query.c.

The documentation for this struct was generated from the following file: