RBSQLiteResultSet Class Reference

Inherits from NSObject
Declared in RBSQLiteResultSet.h

Overview

Converts an SQLITE_TYPE integer value to it’s corresponding RBSQLiteFieldType type

  hasResults

Indicates that there is returned data.

@property (nonatomic, readonly) BOOL hasResults

Declared In

RBSQLiteResultSet.h

  rowCount

The number of rows in this set.

@property (nonatomic, readonly) NSUInteger rowCount

Declared In

RBSQLiteResultSet.h

  columnCount

The number of columns in this set.

@property (nonatomic, readonly) NSUInteger columnCount

Declared In

RBSQLiteResultSet.h

  columnNames

An array of NSString objects detailing column names.

@property (nonatomic, readonly, nonnull) NSArray<NSString*> *columnNames

Declared In

RBSQLiteResultSet.h

  columnTypes

An array of NSNumber objects that hold RBSQLiteFieldType values for columns.

@property (nonatomic, readonly, nonnull) NSArray<NSNumber*> *columnTypes

Declared In

RBSQLiteResultSet.h

  fields

An array of values containing data as retreived from SQLite. This is a single flat array and is used in conjection with row and column counts to structure and retreive data in a tabulated format correctly.

@property (nonatomic, readonly, nonnull) NSArray *fields

Declared In

RBSQLiteResultSet.h

  scalarValue

The scalar value for an SQL scalar query. Convenience property that returns the data from the first row and first column of the result set.

@property (nonatomic, readonly, nullable) id scalarValue

Declared In

RBSQLiteResultSet.h

– initWithResultSet:

Initializes a new RBSQLiteResultSet object populating it with an existing RBSQLiteResultSet.

- (nonnull instancetype)initWithResultSet:(nonnull RBSQLiteResultSet *)resultSet

Parameters

resultSet

The RBSQLiteResultSet from which to populate.

Return Value

A newly initialized and populated RBSQLiteResultSet object.

Declared In

RBSQLiteResultSet.h

– initWithColumnNames:columnTypes:fieldValues:

Initializes a new RBSQLiteResultSet object populating it with data.

- (nonnull instancetype)initWithColumnNames:(nonnull NSArray<NSString*> *)columnNames columnTypes:(nonnull NSArray<NSNumber*> *)columnTypes fieldValues:(nonnull NSArray *)fieldValues

Parameters

columnNames

An array of NSString objects detailing column names.

columnTypes

An array of NSNumber objects holding RBSQLiteFieldType values for columns.

fieldValues

An array containing the data values for this result set.

Return Value

A newly initialized and populated RBSQLiteResultSet object.

Declared In

RBSQLiteResultSet.h

– columnIndexForName:

Retreives the column index for the given column name.

- (NSUInteger)columnIndexForName:(nonnull NSString *)name

Parameters

name

The column name.

Return Value

The column index.

Declared In

RBSQLiteResultSet.h

– columnNameAtIndex:

Retrieves the column name for the given index.

- (nonnull NSString *)columnNameAtIndex:(NSUInteger)index

Parameters

index

The column index.

Return Value

The column name.

Declared In

RBSQLiteResultSet.h

– columnTypeAtIndex:

Retrives the RBSQLiteFieldType column type for the given column index.

- (RBSQLiteFieldType)columnTypeAtIndex:(NSUInteger)index

Parameters

index

The column index.

Return Value

The RBSQLiteFieldType column type.

Declared In

RBSQLiteResultSet.h

– valueAtIndex:forRow:

Retrieves the value for the given column and row index.

- (nonnull id)valueAtIndex:(NSUInteger)index forRow:(NSUInteger)row

Parameters

index

The column index.

row

The row index.

Return Value

The value.

Declared In

RBSQLiteResultSet.h

– valueForColumnName:forRow:

Retreives the value for the given column name and row index.

- (nonnull id)valueForColumnName:(nonnull NSString *)columnName forRow:(NSUInteger)row

Parameters

columnName

The column name.

row

The row index.

Return Value

The value.

Declared In

RBSQLiteResultSet.h

– valuesAtRow:

Retreives the values for a given row index.

- (nonnull NSArray *)valuesAtRow:(NSUInteger)row

Parameters

row

The row index.

Return Value

An array of values representing the data for that SQLite row.

Declared In

RBSQLiteResultSet.h