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