Skip to content

Commit

Permalink
Remove bindString:.
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 8acce56 commit 7fc0384
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 37 deletions.
10 changes: 0 additions & 10 deletions SLStmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,6 @@
- (BOOL)bindLongLong: (long long)value
error: (NSError **)outError;

/** Bind string to a compiled statement.
@note index is 0-based */
- (BOOL)bindString: (NSString *)value
forIndex: (int)index
error: (NSError **)outError;

/** Bind string to a compiled statement and advance to next bind point. */
- (BOOL)bindString: (NSString *)value
error: (NSError **)outError;

/** Bind NULL to a compiled statement.
@note index is 0-based */
- (BOOL)bindNullForIndex: (int)index
Expand Down
33 changes: 6 additions & 27 deletions SLStmt.m
Original file line number Diff line number Diff line change
Expand Up @@ -370,27 +370,6 @@ - (BOOL)bindLongLong: (long long)value



- (BOOL)bindString: (NSString *)value
forIndex: (int)index
error: (NSError **)outError;
{
[self setResult: sqlite3_bind_text( stmt, index+1, [value UTF8String], -1, SQLITE_TRANSIENT )
error: outError];
return ( errorCode == SQLITE_OK );
}



- (BOOL)bindString: (NSString *)value
error: (NSError **)outError;
{
return [self bindString: value
forIndex: bind++
error: outError];
}



- (BOOL)bindNullForIndex: (int)index
error: (NSError **)outError;
{
Expand Down Expand Up @@ -441,13 +420,13 @@ - (BOOL)bindValue: (id)value
forIndex: index
error: outError];
} else if ( [value isKindOfClass: [NSNumber class]] ) {
ok = [self bindString: [value stringValue]
forIndex: index
error: outError];
[self setResult: sqlite3_bind_text( stmt, index+1, [value UTF8String], -1, SQLITE_TRANSIENT )
error: outError];
ok = ( errorCode == SQLITE_OK );
} else if ( [value isKindOfClass: [NSString class]] ) {
ok = [self bindString: value
forIndex: index
error: outError];
[self setResult: sqlite3_bind_text( stmt, index+1, [value UTF8String], -1, SQLITE_TRANSIENT )
error: outError];
ok = ( errorCode == SQLITE_OK );
} else if ( value == [NSNull null] ) {
ok = [self bindNullForIndex: index
error: outError];
Expand Down

0 comments on commit 7fc0384

Please sign in to comment.