MCPcopy Create free account
hub / github.com/documentdb/documentdb / IndexNameGetReadyIndexDetails

Function IndexNameGetReadyIndexDetails

pg_documentdb/src/metadata/index.c:978–988  ·  view source on GitHub ↗

* Given a collection and index name, returns the index details for the index * if it is ready to be used. If the index is not ready, returns NULL. */

Source from the content-addressed store, hash-verified

976 * if it is ready to be used. If the index is not ready, returns NULL.
977 */
978IndexDetails *
979IndexNameGetReadyIndexDetails(uint64 collectionId, const char *indexName)
980{
981 const char *cmdStr = FormatSqlQuery(
982 "SELECT index_id, index_spec, FALSE AS index_build_in_progress "
983 "FROM %s.collection_indexes WHERE collection_id = $1 AND"
984 " (index_spec).index_name = $2 AND"
985 " index_is_valid",
986 ApiCatalogSchemaName);
987 return IndexNameGetIndexDetailsCore(cmdStr, collectionId, indexName);
988}
989
990
991/*

Callers 1

GenerateBaseTableQueryFunction · 0.85

Calls 2

FormatSqlQueryFunction · 0.85

Tested by

no test coverage detected