UNPKG

graphdb

Version:

Javascript client library supporting GraphDB and RDF4J REST API.

51 lines (50 loc) 2.06 kB
export = TransactionService; /** * Service for working with the transactions endpoint. * * @author Mihail Radkov * @author Svilen Velikov * @author Teodossi Dossev */ declare class TransactionService extends Service { /** * Instantiates the transaction service with the supplied executor and * repository client config. * * @param {Function} httpRequestExecutor used to execute HTTP requests * @param {RepositoryClientConfig} repositoryClientConfig used to create * transaction client configurations */ constructor(httpRequestExecutor: Function, repositoryClientConfig: RepositoryClientConfig); repositoryClientConfig: RepositoryClientConfig; /** * Starts a transaction and produces a {@link TransactionalRepositoryClient}. * * The transactions ID is extracted from the <code>location</code> header and * is used as endpoint for the produced TransactionalRepositoryClient. * * If no transaction isolation level is provided, the server will use its * default isolation level. * * @param {string} [isolationLevel] an optional parameter to specify the * transaction's level of isolation; for possible values see * {@link TransactionIsolationLevel} * * @return {Promise<TransactionalRepositoryClient>} transactional client */ beginTransaction(isolationLevel?: string): Promise<TransactionalRepositoryClient>; /** * Builds client configuration for transactional repository out of the * provided repository client config and the supplied location URL. * * @private * * @param {string} locationUrl the url for the transactional repo endpoint * * @return {RepositoryClientConfig} the built transaction client config */ private getTransactionalClientConfig; } import Service = require("./service"); import RepositoryClientConfig = require("../repository/repository-client-config"); import TransactionalRepositoryClient = require("../transaction/transactional-repository-client");