EPUB | CHM | PDF

TPSQLDatabase.Properties.TransIsolation

Top Previous Next

Specifies the transaction isolation level for transactions.

Syntax:

type TTransIsolation = (tiDirtyRead,
                        tiReadCommitted,
                        tiRepeatableRead,
                        tiSerializable );
property TransIsolation: TTransIsolation;

Description:

Use TransIsolation to specify the transaction isolation level for database transactions. Transaction isolation level determines how a transaction interacts with other simultaneous transactions when they work with the same tables, and how much a transaction sees of the work performed by other transactions.

TransIsolation can be any one of the values summarized in the following list:

tiDirtyRead:

Not implemented for PostgreSQL.

tiReadCommitted:

A statement can only see rows committed before it began. This is the default.

tiRepeatableRead:

All statements of the current transaction can only see rows committed before the first query or data-modification statement was executed in this transaction.

tiSerializable:

All statements of the current transaction can only see rows committed before the first query or data-modification statement was executed in this transaction. If a pattern of reads and writes among concurrent serializable transactions would create a situation which could not have occurred for any serial (one-at-a-time) execution of those transactions, one of them will be rolled back with a serialization_failure error.

 

Applications that use passthrough SQL for handling transactions must pass a transaction isolation level directly to the database server using the appropriate SQL statement.