Skip to content

Commit

Permalink
Add intValue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Fisher authored and Steven Fisher committed Nov 8, 2009
1 parent 5e31db3 commit cdd6dc0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
8 changes: 7 additions & 1 deletion SLStmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,20 @@
- (NSArray *)columnNames;

/** Get the number of columns in the result set. */
- (long long)columnCount;
- (int)columnCount;

/** Get a specifc column's name. */
- (NSString *)columnName: (int)inColumn;

/** Get column name of the current column. */
- (NSString *)columnName;

/** Get a specific column's contents as int. */
- (int)intValue: (int)inColumn;

/** Get current column's contents as int and advance to next column. */
- (int)intValue;

/** Get a specific column's contents as int64. */
- (long long)longLongValue: (int)inColumn;

Expand Down
16 changes: 15 additions & 1 deletion SLStmt.m
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ - (NSArray *)columnNames;



- (long long)columnCount;
- (int)columnCount;
{
return sqlite3_column_count( stmt );
}
Expand All @@ -239,6 +239,20 @@ - (NSString *)columnName;



- (int)intValue: (int)inColumn;
{
return sqlite3_column_int( stmt, inColumn );
}



- (int)intValue;
{
return [self intValue: column++];
}



- (long long)longLongValue: (int)inColumn;
{
return sqlite3_column_int64( stmt, inColumn );
Expand Down

0 comments on commit cdd6dc0

Please sign in to comment.