JavaScript Editor Javascript debugger     Website design 

sesam_settransaction

Set SESAM transaction parameters ()
bool sesam_settransaction ( int isolation_level, int read_only )

Overrides the default values for the isolation level and read-only transaction parameters (which are set in the SESAM configuration file), in order to optimize subsequent queries and guarantee database consistency. The overridden values are used for the next transaction only. See the SESAM handbook for detailed explanation of the semantics.

This function can only be called before starting a transaction, not after the transaction has been started already.

The values set by sesam_settransaction() will override the default setting specified in the SESAM configuration file.

Parameters

isolation_level

Table 289.  Valid values for isolation_level parameter

ValueConstantMeaning
1SESAM_TXISOL_READ_UNCOMMITTEDRead Uncommitted
2SESAM_TXISOL_READ_COMMITTEDRead Committed
3SESAM_TXISOL_REPEATABLE_READRepeatable Read
4SESAM_TXISOL_SERIALIZABLESerializable


read_only

Table 290.  Valid values for read_only parameter

ValueConstantMeaning
0SESAM_TXREAD_READWRITERead/Write
1SESAM_TXREAD_READONLYRead-Only


Return Values

Returns TRUE if the values are valid, and the settransaction operation was successful, FALSE otherwise.

Examples

Example 2218. Setting SESAM transaction parameters

<?php
sesam_settransaction
(SESAM_TXISOL_REPEATABLE_READ,
                   
SESAM_TXREAD_READONLY);
?>