#mobile-application-10-DerbyApp-build-iphone-Classes-PlausibleDatabase-PLDatabase.h / h
Protocol for interacting with an SQL database. @par Object Types All drivers support conversion to and from the following object types: - NSString - NSNumber - NSData @par Scalar Types All drivers implement conversion to and from the scalar types as defined in the Key Value Coding documentation, Scalar and Structure Support: http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/DataTypes.html#//apple_ref/doc/uid/20002171-184842-BCIJIBHC @par The mapping of these scalar types to specific database types is implementation defined. Refer to the database driver's documentation for the specific mapping used. @par Thread Safety PLDatabase instances implement no locking and must not be shared between threads without external synchronization.
Test that the connection is active.
Close the database connection, releasing any held database resources. After calling, no further PLDatabase methods may be called on the instance. As PLDatabase objects may be placed into autorelease pools, with indeterminate release of database resources, this method should be used to ensure that the database connection is closed in a timely manner. Failure to call close will not result in any resource leaks, but may result in database connections unexpectedly remaining open, especially in a garbage collection environment.
Prepare and return a new PLPreparedStatement.
parameter: statement SQL statement to prepare.
returns: The prepared statement, or nil if it could not be prepared.
Prepare and return a new PLPreparedStatement.
parameter: statement SQL statement to prepare.
parameter: outError A pointer to an NSError object variable. If an error occurs, this pointer will contain an error object indicating why the statement could not be prepared. If no error occurs, this parameter will be left unmodified. You may specify nil for this parameter, and no error information will be provided.
returns: The prepared statement, or nil if it could not be prepared.
Execute an update, returning YES on success, NO on failure. Any arguments should be provided following the statement, and referred to using standard '?' JDBC substitutions
parameter: statement SQL statement to execute.
Execute an update, returning YES on success, NO on failure. Any arguments should be provided following the statement, and referred to using standard '?' JDBC substitutions
parameter: error A pointer to an NSError object variable. If an error occurs, this pointer will contain an error object indicating why the statement could not be executed. If no error occurs, this parameter will be left unmodified. You may specify nil for this parameter, and no error information will be provided.
parameter: statement SQL statement to execute.
Execute a query, returning a PLResultSet. Any arguments should be provided following the statement, and referred to using standard '?' JDBC substitutions
parameter: statement SQL statement to execute.
returns: PLResultSet on success, or nil on failure.
Execute a query, returning a PLResultSet. Any arguments should be provided following the statement, and referred to using standard '?' JDBC substitutions
parameter: error A pointer to an NSError object variable. If an error occurs, this pointer will contain an error object indicating why the statement could not be executed. If no error occurs, this parameter will be left unmodified. You may specify nil for this parameter, and no error information will be provided.
parameter: statement SQL statement to execute.
returns: PLResultSet on success, or nil on failure.
Begin a transaction. This must provide at least 'Read committed' isolation. As per the SQL standard, the isolation level may be stricter than what has been requested -- this method only gaurantees the MINIMUM of isolation. For more information on SQL standard transaction isolation levels, refer to PostgreSQL's documentation: http://www.postgresql.org/docs/8.3/interactive/transaction-iso.html
returns: YES on success, NO on failure.
Begin a transaction. This must provide at least 'Read committed' isolation. As per the SQL standard, the isolation level may be stricter than what has been requested -- this method only gaurantees the MINIMUM of isolation. For more information on SQL standard transaction isolation levels, refer to PostgreSQL's documentation: http://www.postgresql.org/docs/8.3/interactive/transaction-iso.html
parameter: error 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 nil for this parameter, and no error information will be provided.
returns: YES on success, NO on failure.
Commit an open transaction.
returns: YES on success, NO on failure.
Commit an open transaction.
parameter: error 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.
returns: YES on success, NO on failure.
Rollback an open transaction.
returns: YES on success, NO on failure.
Rollback an open transaction.
parameter: error 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.
returns: YES on success, NO on failure.
Return YES if the given table name exists.
returns: YES if it exists, NO otherwise.
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.