Retrieve a Soup’s Index Specs
If you want to examine or display the index specifications for
a soup, call the applicable index specs retrieval method.
Hybrid Apps
In hybrid apps, call:
In
addition to the success and error callback functions, this function takes a single
argument, soupName, which is the name of the
soup. For
example:
The
success callback supports a single parameter that contains the array of index specs. For
example:
1getSoupIndexSpecs()1navigator.smartstore.getSoupIndexSpecs(soupName, successCallback,
2 errorCallback)1function(indexSpecs) { alert("Soup " + soupName +
2 " has the following indexes:" + JSON.stringify(indexSpecs); }Android Apps
1public IndexSpec [] getSoupIndexSpecs ( String soupName )iOS Apps
Objective-C:
1- (NSArray*)indicesForSoup:(NSString*)soupNameSwift:
Example:
1func indices(forSoupNamed: String) -> [SoupIndex]1var soupIndices = store.indices(forSoupNamed:name)