DAIndex

Overview

Class that represents simple index for DADataTable. Internally it creates and manages NSDictionary with keys as values of index field and DADataTableRow instances as dictionary values.

Location

 

indexField

Returns name of the table field on which this index is based.

@property (readonly) NSString *indexField

indexValuesForValue:fieldName:

???

- (NSArray *) indexValuesForValue:(id)value fieldName:(NSString *)fieldName

Parameters:

  • value:
  • fieldName:

indexWithDataTable:indexField:

Creates and returns an DAIndex instance initialized with given table and index field.

+ (id) indexWithDataTable:(DADataTable *)table indexField:(NSString *)fieldName

Parameters:

  • table: reference to DADataTable for which we want to create index.
  • fieldName: name of the table field on which our index will be based.

initWithDataTable:indexField:

- (InstanceType) initWithDataTable:(DADataTable *)table indexField:(NSString *)fieldName

Parameters:

  • table:
  • fieldName:

rowForIndexValue:

Returns row that corresponds to given index value.

- (DADataTableRow *) rowForIndexValue:(id)value

Parameters:

  • value: an index value.

valueForIndexValue:fieldName:

Returns value for given field name row that corresponds to given index value.

- (id) valueForIndexValue:(id)value fieldName:(NSString *)fieldName

Parameters:

  • value: an index value.
  • fieldName: name of the field for which we want to get a value.

 

indexField

Returns name of the table field on which this index is based.

@property (readonly) NSString *indexField

 

indexWithDataTable:indexField:

Creates and returns an DAIndex instance initialized with given table and index field.

+ (id) indexWithDataTable:(DADataTable *)table indexField:(NSString *)fieldName

Parameters:

  • table: reference to DADataTable for which we want to create index.
  • fieldName: name of the table field on which our index will be based.

 

indexValuesForValue:fieldName:

???

- (NSArray *) indexValuesForValue:(id)value fieldName:(NSString *)fieldName

Parameters:

  • value:
  • fieldName:

initWithDataTable:indexField:

- (InstanceType) initWithDataTable:(DADataTable *)table indexField:(NSString *)fieldName

Parameters:

  • table:
  • fieldName:

rowForIndexValue:

Returns row that corresponds to given index value.

- (DADataTableRow *) rowForIndexValue:(id)value

Parameters:

  • value: an index value.

valueForIndexValue:fieldName:

Returns value for given field name row that corresponds to given index value.

- (id) valueForIndexValue:(id)value fieldName:(NSString *)fieldName

Parameters:

  • value: an index value.
  • fieldName: name of the field for which we want to get a value.