1 /* txn-table.h : internal interface to ops on `transactions' table
3 * ====================================================================
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
20 * ====================================================================
23 #ifndef SVN_LIBSVN_FS_TXN_TABLE_H
24 #define SVN_LIBSVN_FS_TXN_TABLE_H
27 #include "svn_error.h"
33 #endif /* __cplusplus */
36 /* Open a `transactions' table in ENV. If CREATE is non-zero, create
37 one if it doesn't exist. Set *TRANSACTIONS_P to the new table.
38 Return a Berkeley DB error code. */
39 int svn_fs_bdb__open_transactions_table(DB **transactions_p,
41 svn_boolean_t create);
44 /* Create a new transaction in FS as part of TRAIL, with an initial
45 root and base root ID of ROOT_ID. Set *TXN_NAME_P to the name of the
46 new transaction, allocated in POOL. */
47 svn_error_t *svn_fs_bdb__create_txn(const char **txn_name_p,
49 const svn_fs_id_t *root_id,
54 /* Remove the transaction whose name is TXN_NAME from the `transactions'
55 table of FS, as part of TRAIL.
57 Returns SVN_ERR_FS_TRANSACTION_NOT_MUTABLE if TXN_NAME refers to a
58 transaction that has already been committed. */
59 svn_error_t *svn_fs_bdb__delete_txn(svn_fs_t *fs,
65 /* Retrieve the transaction *TXN_P for the Subversion transaction
66 named TXN_NAME from the `transactions' table of FS, as part of
67 TRAIL. Perform all allocations in POOL.
69 If there is no such transaction, SVN_ERR_FS_NO_SUCH_TRANSACTION is
70 the error returned. */
71 svn_error_t *svn_fs_bdb__get_txn(transaction_t **txn_p,
78 /* Store the Subversion transaction TXN in FS with an ID of TXN_NAME as
80 svn_error_t *svn_fs_bdb__put_txn(svn_fs_t *fs,
81 const transaction_t *txn,
87 /* Set *NAMES_P to an array of const char * IDs (unfinished
88 transactions in FS) as part of TRAIL. Allocate the array and the
89 names in POOL, and use POOL for any temporary allocations. */
90 svn_error_t *svn_fs_bdb__get_txn_list(apr_array_header_t **names_p,
98 #endif /* __cplusplus */
100 #endif /* SVN_LIBSVN_FS_TXN_TABLE_H */