SFSoupIndex Class Reference

Inherits from NSObject
Declared in SFSoupIndex.h

Overview

Definition of an index on a given soup.

  path

The simple or compound path to the index value, e.g. “Id” or “Account.Id”.

@property (nonatomic, strong) NSString *path

Declared In

SFSoupIndex.h

  indexType

The type of index this is (string or date).

@property (nonatomic, strong) NSString *indexType

Declared In

SFSoupIndex.h

  columnType

The type of data that will be indexed (string or integer).

@property (strong, nonatomic, readonly, nullable) NSString *columnType

Declared In

SFSoupIndex.h

  columnName

The name of the column that will store the index.

@property (strong, nonatomic, readonly) NSString *columnName

Declared In

SFSoupIndex.h

– initWithPath:indexType:columnName:

Designated initializer.

- (nullable instancetype)initWithPath:(NSString *)path indexType:(NSString *)type columnName:(nullable NSString *)columnName

Parameters

path

The simple or compound path to the index value, e.g. “Id” or “Account.Id”.

type

An index type, e.g. kSoupIndexTypeString.

columnName

The SQL column name, or nil.

Declared In

SFSoupIndex.h

– initWithDictionary:

Creates an SFSoupIndex based on the given NSDictionary index spec.

- (id)initWithDictionary:(NSDictionary *)dict

Parameters

dict

the dictionary to use

Return Value

Initialized SFSoupIndex object.

Declared In

SFSoupIndex.h

– asDictionary

Return dictionary for this SFSoupIndex object without column name

- (NSDictionary *)asDictionary

Declared In

SFSoupIndex.h

– asDictionary:

Returns a dictionary For this SFSoupIndex object with or without column name

- (NSDictionary *)asDictionary:(BOOL)withColumnName

Parameters

withColumnName

If YES, column name is included in returned dictionary

Declared In

SFSoupIndex.h

+ asArrayOfDictionaries:withColumnName:

Returns an array of NSDictionary objects for a given array of soup indexes, using the given column name as the index.

+ (NSArray<NSDictionary*> *)asArrayOfDictionaries:(NSArray<SFSoupIndex*> *)arrayOfSoupIndexes withColumnName:(BOOL)withColumnName

Parameters

arrayOfSoupIndexes

Array of soup indexes

withColumnName

If YES, column name is included in returned dictionary

Return Value

Array of NSDictionary objects

Declared In

SFSoupIndex.h

+ asArraySoupIndexes:

Returns an array of SFSoupIndex objects for a given array of soup indexes.

+ (NSArray<SFSoupIndex*> *)asArraySoupIndexes:(NSArray<NSDictionary*> *)arrayOfDictionaries

Parameters

arrayOfDictionaries

Array of dictionaries

Return Value

Array of SFSoupIndex objects

Declared In

SFSoupIndex.h

+ mapForSoupIndexes:

Returns a map path to SFSoupIndex

+ (NSDictionary<NSString*,SFSoupIndex*> *)mapForSoupIndexes:(NSArray *)soupIndexes

Parameters

soupIndexes

array of SFSoupIndex objects

Return Value

Dictionary that maps paths to soup indexes

Declared In

SFSoupIndex.h

+ hasFts:

Returns YES if any of the indexes are full text

+ (BOOL)hasFts:(NSArray<SFSoupIndex*> *)soupIndexes

Parameters

soupIndexes

array of SFSoupIndex objects

Return Value

YES if any of the indexes are full text

Declared In

SFSoupIndex.h

+ hasJSON1:

Returns YES if any of the indexes are JSON1

+ (BOOL)hasJSON1:(NSArray<SFSoupIndex*> *)soupIndexes

Parameters

soupIndexes

array of SFSoupIndex objects

Return Value

YES if any of the indexes are JSON1

Declared In

SFSoupIndex.h

– getPathType

Using the path and indexType property values, constructs a string in the format “path–indexType”.

- (NSString *)getPathType

Return Value

String containing the path and indext type, separated by “–”.

Declared In

SFSoupIndex.h