1 /* txn-table.h : internal interface to ops on `transactions' table
3 * ====================================================================
4 * Copyright (c) 2000-2004 CollabNet. All rights reserved.
6 * This software is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at http://subversion.tigris.org/license-1.html.
9 * If newer versions of this license are posted there, you may use a
10 * newer version instead, at your option.
12 * This software consists of voluntary contributions made by many
13 * individuals. For exact contribution history, see the revision
14 * history and logs, available at http://subversion.tigris.org/.
15 * ====================================================================
18 #ifndef SVN_LIBSVN_FS_TXN_TABLE_H
19 #define SVN_LIBSVN_FS_TXN_TABLE_H
22 #include "svn_error.h"
28 #endif /* __cplusplus */
31 /* Open a `transactions' table in ENV. If CREATE is non-zero, create
32 one if it doesn't exist. Set *TRANSACTIONS_P to the new table.
33 Return a Berkeley DB error code. */
34 int svn_fs_bdb__open_transactions_table(DB
**transactions_p
,
36 svn_boolean_t create
);
39 /* Create a new transaction in FS as part of TRAIL, with an initial
40 root and base root ID of ROOT_ID. Set *TXN_NAME_P to the name of the
41 new transaction, allocated in POOL. */
42 svn_error_t
*svn_fs_bdb__create_txn(const char **txn_name_p
,
44 const svn_fs_id_t
*root_id
,
49 /* Remove the transaction whose name is TXN_NAME from the `transactions'
50 table of FS, as part of TRAIL.
52 Returns SVN_ERR_FS_TRANSACTION_NOT_MUTABLE if TXN_NAME refers to a
53 transaction that has already been committed. */
54 svn_error_t
*svn_fs_bdb__delete_txn(svn_fs_t
*fs
,
60 /* Retrieve the transaction *TXN_P for the Subversion transaction
61 named TXN_NAME from the `transactions' table of FS, as part of
62 TRAIL. Perform all allocations in POOL.
64 If there is no such transaction, SVN_ERR_FS_NO_SUCH_TRANSACTION is
65 the error returned. */
66 svn_error_t
*svn_fs_bdb__get_txn(transaction_t
**txn_p
,
73 /* Store the Suversion transaction TXN in FS with an ID of TXN_NAME as
75 svn_error_t
*svn_fs_bdb__put_txn(svn_fs_t
*fs
,
76 const transaction_t
*txn
,
82 /* Set *NAMES_P to an array of const char * IDs (unfinished
83 transactions in FS) as part of TRAIL. Allocate the array and the
84 names in POOL, and use POOL for any temporary allocations. */
85 svn_error_t
*svn_fs_bdb__get_txn_list(apr_array_header_t
**names_p
,
93 #endif /* __cplusplus */
95 #endif /* SVN_LIBSVN_FS_TXN_TABLE_H */