1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_sdbc_TransactionIsolation_idl__
24#define __com_sun_star_sdbc_TransactionIsolation_idl__
25
26 module com {  module sun {  module star {  module sdbc {
27
28
29/** distinguishes different possible transaction isolation levels.
30 */
31published constants TransactionIsolation
32{
33
34	/** indicates that transactions are not supported.
35	 */
36	const long NONE					=  0;
37
38	/** Dirty reads, non-repeatable reads and phantom reads can occur.
39		     This level allows a row changed by one transaction to be read
40		     by another transaction before any changes in that row have been
41		     committed (a "dirty read").  If any of the changes are rolled back,
42		     the second transaction will have retrieved an invalid row.
43	 */
44	const long READ_UNCOMMITTED 	=  1;
45
46	/** Dirty reads are prevented; non-repeatable reads and phantom
47		     reads can occur.  This level only prohibits a transaction
48		     from reading a row with uncommitted changes in it.
49	 */
50	const long READ_COMMITTED		=  2;
51
52	/** Dirty reads and non-repeatable reads are prevented; phantom
53		     reads can occur.  This level prohibits a transaction from
54		     reading a row with uncommitted changes in it, and it also
55		     prohibits the situation where one transaction reads a row,
56		     a second transaction alters the row, and the first transaction
57		     rereads the row, getting different values the second time
58		     (a "non-repeatable read").
59	 */
60	const long REPEATABLE_READ 		=  4;
61
62	/** Dirty reads, non-repeatable reads and phantom reads are prevented.
63		     This level includes the prohibitions in
64		     <code>REPEATABLE_READ</code>
65			 and further prohibits the
66		     situation where one transaction reads all rows that satisfy
67		     a WHERE condition, a second transaction inserts a row that
68		     satisfies that WHERE condition, and the first transaction
69		     rereads for the same condition, retrieving the additional
70		     "phantom" row in the second read.
71	 */
72	const long SERIALIZABLE 		=  8;
73};
74
75//=============================================================================
76
77}; }; }; };
78
79/*===========================================================================
80===========================================================================*/
81#endif
82