1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: TransactionIsolation.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_sdbc_TransactionIsolation_idl__
31 #define __com_sun_star_sdbc_TransactionIsolation_idl__
33 module com
{ module sun
{ module star
{ module sdbc
{
36 /** distinguishes different possible transaction isolation levels.
38 published constants TransactionIsolation
41 /** indicates that transactions are not supported.
45 /** Dirty reads, non-repeatable reads and phantom reads can occur.
46 This level allows a row changed by one transaction to be read
47 by another transaction before any changes in that row have been
48 committed (a "dirty read"). If any of the changes are rolled back,
49 the second transaction will have retrieved an invalid row.
51 const long READ_UNCOMMITTED
= 1;
53 /** Dirty reads are prevented; non-repeatable reads and phantom
54 reads can occur. This level only prohibits a transaction
55 from reading a row with uncommitted changes in it.
57 const long READ_COMMITTED
= 2;
59 /** Dirty reads and non-repeatable reads are prevented; phantom
60 reads can occur. This level prohibits a transaction from
61 reading a row with uncommitted changes in it, and it also
62 prohibits the situation where one transaction reads a row,
63 a second transaction alters the row, and the first transaction
64 rereads the row, getting different values the second time
65 (a "non-repeatable read").
67 const long REPEATABLE_READ
= 4;
69 /** Dirty reads, non-repeatable reads and phantom reads are prevented.
70 This level includes the prohibitions in
71 <code>REPEATABLE_READ</code>
72 and further prohibits the
73 situation where one transaction reads all rows that satisfy
74 a WHERE condition, a second transaction inserts a row that
75 satisfies that WHERE condition, and the first transaction
76 rereads for the same condition, retrieving the additional
77 "phantom" row in the second read.
79 const long SERIALIZABLE
= 8;
82 //=============================================================================
86 /*===========================================================================
87 ===========================================================================*/