UNPKG

2.12 kBJavaScriptView Raw
1/**
2 * Copyright (c) 2002-2019 "Neo4j,"
3 * Neo4j Sweden AB [http://neo4j.com]
4 *
5 * This file is part of Neo4j.
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * 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, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20/**
21 * Configuration object containing settings for explicit and auto-commit transactions.
22 * <p>
23 * Configuration is supported for:
24 * <ul>
25 * <li>queries executed in auto-commit transactions using {@link Session#run} and {@link RxSession#run}</li>
26 * <li>transactions started by transaction functions using {@link Session#readTransaction}, {@link RxSession#readTransaction},
27 * {@link Session#writeTransaction} and {@link RxSession#writeTransaction}</li>
28 * <li>explicit transactions using {@link Session#beginTransaction} and {@link RxSession#beginTransaction}</li>
29 * </ul>
30 * @typedef {Object} TransactionConfig
31 * @property {number} timeout - the transaction timeout in **milliseconds**. Transactions that execute longer than the configured timeout will
32 * be terminated by the database. This functionality allows to limit query/transaction execution time. Specified timeout overrides the default timeout
33 * configured in the database using `dbms.transaction.timeout` setting. Value should not represent a duration of zero or negative duration.
34 * @property {Object} metadata - the transaction metadata. Specified metadata will be attached to the executing transaction and visible in the output of
35 * `dbms.listQueries` and `dbms.listTransactions` procedures. It will also get logged to the `query.log`. This functionality makes it easier to tag
36 * transactions and is equivalent to `dbms.setTXMetaData` procedure.
37 */
38"use strict";
\No newline at end of file