mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-21 02:41:07 +00:00
tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@35723 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bb290f0415
commit
828973acbc
2 changed files with 6 additions and 2 deletions
|
@ -11,7 +11,7 @@
|
|||
* testPostgres.m:
|
||||
Change execute methods to return a count of the rows to which the
|
||||
executed operation applies, or -1 if not supported.
|
||||
Implement for postgresql.
|
||||
Implement for postgresql and mysql.
|
||||
|
||||
2012-06-17 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
6
MySQL.m
6
MySQL.m
|
@ -176,6 +176,7 @@ static NSNull *null = nil;
|
|||
- (NSInteger) backendExecute: (NSArray*)info
|
||||
{
|
||||
NSString *stmt;
|
||||
NSInteger rowCount = 0;
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
|
||||
stmt = [info objectAtIndex: 0];
|
||||
|
@ -225,6 +226,9 @@ static NSNull *null = nil;
|
|||
[NSException raise: SQLConnectionException format: @"%@", s];
|
||||
}
|
||||
}
|
||||
/* See how many rows were modified.
|
||||
*/
|
||||
rowCount = mysql_affected_rows(connection);
|
||||
/* discard any results.
|
||||
*/
|
||||
result = mysql_store_result(connection);
|
||||
|
@ -258,7 +262,7 @@ static NSNull *null = nil;
|
|||
}
|
||||
NS_ENDHANDLER
|
||||
[arp release];
|
||||
return -1;
|
||||
return rowCount;
|
||||
}
|
||||
|
||||
static unsigned int trim(char *str)
|
||||
|
|
Loading…
Reference in a new issue