1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 module com
{ module sun
{ module star
{ module sdbc
{
23 /** distinguishes different possible transaction isolation levels.
25 published constants TransactionIsolation
28 /** indicates that transactions are not supported.
32 /** Dirty reads, non-repeatable reads and phantom reads can occur.
33 This level allows a row changed by one transaction to be read
34 by another transaction before any changes in that row have been
35 committed (a "dirty read"). If any of the changes are rolled back,
36 the second transaction will have retrieved an invalid row.
38 const long READ_UNCOMMITTED
= 1;
40 /** Dirty reads are prevented; non-repeatable reads and phantom
41 reads can occur. This level only prohibits a transaction
42 from reading a row with uncommitted changes in it.
44 const long READ_COMMITTED
= 2;
46 /** Dirty reads and non-repeatable reads are prevented; phantom
47 reads can occur. This level prohibits a transaction from
48 reading a row with uncommitted changes in it, and it also
49 prohibits the situation where one transaction reads a row,
50 a second transaction alters the row, and the first transaction
51 rereads the row, getting different values the second time
52 (a "non-repeatable read").
54 const long REPEATABLE_READ
= 4;
56 /** Dirty reads, non-repeatable reads and phantom reads are prevented.
57 This level includes the prohibitions in
58 <code>REPEATABLE_READ</code>
59 and further prohibits the
60 situation where one transaction reads all rows that satisfy
61 a WHERE condition, a second transaction inserts a row that
62 satisfies that WHERE condition, and the first transaction
63 rereads for the same condition, retrieving the additional
64 "phantom" row in the second read.
66 const long SERIALIZABLE
= 8;
72 /*===========================================================================
73 ===========================================================================*/
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */