< PLDatabaseMigrationTransactionManager > Protocol Reference

Manages the database migration transactions and locking to ensure atomic testing of the database version and application of any migrations. More...

#import <PLDatabaseMigrationTransactionManager.h>

Inheritance diagram for < PLDatabaseMigrationTransactionManager >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

(BOOL) - beginExclusiveTransactionForDatabase:error:
 Start a database transaction, using a sufficient isolation level and/or locking to ensure that no other migrations will run until this has completed.
(BOOL) - rollbackTransactionForDatabase:error:
 Roll back the database transaction, returning YES on success, or NO on failure.
(BOOL) - commitTransactionForDatabase:error:
 Commit the database transaction, returning YES on success, or NO on failure.


Detailed Description

Manages the database migration transactions and locking to ensure atomic testing of the database version and application of any migrations.

Thread Safety
PLDatabaseMigrationTransactionManager instances are not required to implement any locking and must not be shared between threads.

Member Function Documentation

- (BOOL) beginExclusiveTransactionForDatabase: (id< PLDatabase >)  database
error: (NSError **)  outError 

Start a database transaction, using a sufficient isolation level and/or locking to ensure that no other migrations will run until this has completed.

Parameters:
database An active database connection on which to execute any queries.
outError A pointer to an NSError object variable. If an error occurs, this pointer will contain an error object indicating why the transaction could not be started. If no error occurs, this parameter will be left unmodified. You may specify NULL for this parameter, and no error information will be provided.

- (BOOL) commitTransactionForDatabase: (id< PLDatabase >)  database
error: (NSError **)  outError 

Commit the database transaction, returning YES on success, or NO on failure.

Parameters:
database An active database connection on which to issue any queries.
outError A pointer to an NSError object variable. If an error occurs, this pointer will contain an error object indicating why the transaction could not be committed.

- (BOOL) rollbackTransactionForDatabase: (id< PLDatabase >)  database
error: (NSError **)  outError 

Roll back the database transaction, returning YES on success, or NO on failure.

Parameters:
database An active database connection on which to issue any queries.
outError A pointer to an NSError object variable. If an error occurs, this pointer will contain an error object indicating why the transaction could not be rolled back.


The documentation for this protocol was generated from the following file:

Generated on Mon Aug 31 21:35:04 2009 for PlausibleDatabase by  doxygen 1.5.9