Document SQLTransaction a little better

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@19776 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2004-07-26 11:37:42 +00:00
parent 69be0270db
commit 5b2c1ccd7b
2 changed files with 15 additions and 1 deletions

View file

@ -853,7 +853,10 @@ extern NSString *SQLUniqueException;
* then use the -execute method to perform all the statements as a
* single operation.<br />
* Any exception is caught and re-raised in the -execute method after any
* tidying up to leave the database in a consistent state.
* tidying up to leave the database in a consistent state.<br />
* NB. This class is not in itsself thread-safe, though the underlying
* database operations should be. If you have multiple threads, you
* should create multiple SQLTransaction instances, at least one per thread.
*/
@interface SQLTransaction : NSObject
{
@ -875,6 +878,12 @@ extern NSString *SQLUniqueException;
*/
- (void) add: (NSString*)stmt with: (NSDictionary*)values;
/**
* Returns the database client with which this instance operates.<br />
* This client is retained by the transaction.
*/
- (SQLClient*) db;
/**
* Performs any statements added to the transaction as a single operation.
* If any problem occurs, an NSException is raised, but the database connection

View file

@ -1562,6 +1562,11 @@ static unsigned int maxConnections = 8;
[self _addInfo: [_db _substitute: stmt with: values]];
}
- (SQLClient*) db
{
return _db;
}
- (void) execute
{
if (_count > 0)