Liking cljdoc? Tell your friends :D

asphalt.transaction

Transaction handling and strategy (via transaction propagation). The following propagations are implemented: :mandatory, :nested, :never, :not-supported, :required, :requires-new, :supports See: http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/transaction/annotation/Propagation.html

Transaction handling and strategy (via `transaction propagation`). The following propagations are implemented:
:mandatory, :nested, :never, :not-supported, :required, :requires-new, :supports
See:
  http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/transaction/annotation/Propagation.html
raw docstring

assoc-connectionclj

(assoc-connection txn-connection-source connection)

Associate specified connection with given asphalt.type.TxnConnectionSource instance.

Associate specified connection with given asphalt.type.TxnConnectionSource instance.
sourceraw docstring

invoke-with-transactionclj

(invoke-with-transaction txn-worker
                         connection-source
                         {:keys [isolation propagation success-result?
                                 failure-error?]
                          :or {propagation tp-required
                               success-result? (fn [result] true)
                               failure-error? (fn [error] true)}
                          :as options})

Execute specified txn-worker in a transaction using connection-source and txn options: Arguments: txn-worker | fn, accepts asphalt.type.TxnConnectionSource as argument connection-source | instance of asphalt.type.IConnectionSource Options: :isolation | either of :none, :read-committed, :read-uncommitted, :repeatable-read, :serializable :propagation | an asphalt.type.ITransactionPropagation instance (default: asphalt.transaction/tp-required) :success-result? | fn that accepts result of txn-worker, returns true if it is a success, false otherwise :failure-error? | fn that accepts txn-worker exception, returns true if it is a failure, false otherwise

Execute specified txn-worker in a transaction using connection-source and txn options:
Arguments:
  txn-worker        | fn, accepts asphalt.type.TxnConnectionSource as argument
  connection-source | instance of asphalt.type.IConnectionSource
Options:
  :isolation        | either of :none, :read-committed, :read-uncommitted, :repeatable-read, :serializable
  :propagation      | an asphalt.type.ITransactionPropagation instance (default: asphalt.transaction/tp-required)
  :success-result?  | fn that accepts result of txn-worker, returns true if it is a success, false otherwise
  :failure-error?   | fn that accepts txn-worker exception, returns true if it is a failure, false otherwise
sourceraw docstring

tp-mandatoryclj

Use current transaction, throw exception if unavailable. Isolation is ignored.

Use current transaction, throw exception if unavailable. Isolation is ignored.
sourceraw docstring

tp-nestedclj

Start nested transaction if a transaction exists, behave like tp-required otherwise. Options: :isolation - transaction isolation

Start nested transaction if a transaction exists, behave like tp-required otherwise.
Options:
  :isolation - transaction isolation
sourceraw docstring

tp-neverclj

Throw exception if a transaction exists, execute non-transactionally otherwise. Isolation is ignored.

Throw exception if a transaction exists, execute non-transactionally otherwise. Isolation is ignored.
sourceraw docstring

tp-not-supportedclj

Execute non-transactionally regardless of whether a transaction exists. Requires new connection. Isolation is ignored.

Execute non-transactionally regardless of whether a transaction exists. Requires new connection.
Isolation is ignored.
sourceraw docstring

tp-requiredclj

Use current transaction if it exists, create new transaction otherwise. Options: :isolation - the transaction isolation level

Use current transaction if it exists, create new transaction otherwise.
Options:
  :isolation - the transaction isolation level
sourceraw docstring

tp-requires-newclj

Create nested transaction if a transaction exists, create an independent transaction (using a new connection) otherwise. Options: :isolation - transaction isolation

Create nested transaction if a transaction exists, create an independent transaction (using a new
connection) otherwise.
Options:
  :isolation - transaction isolation
sourceraw docstring

tp-supportsclj

Use current transaction if one exists, execute non-transactionally otherwise. Isolation is ignored.

Use current transaction if one exists, execute non-transactionally otherwise. Isolation is ignored.
sourceraw docstring

with-transactioncljmacro

(with-transaction [txn-connection-source connection-source] options & body)

Setup a transaction and evaluate the body of code in specified transaction context, binding txn-connection-source (symbol or destructuring form) to a transactional connection source (asphalt.type.TxnConnectionSource instance) made from specified connection source. Restore old transaction context upon exit on best effort basis. See: invoke-with-transaction

Setup a transaction and evaluate the body of code in specified transaction context, binding `txn-connection-source`
(symbol or destructuring form) to a transactional connection source (asphalt.type.TxnConnectionSource instance) made
from specified connection source. Restore old transaction context upon exit on best effort basis.
See: invoke-with-transaction
sourceraw docstring

with-txn-connection-sourcecljmacro

(with-txn-connection-source [txn-connection-source connection-source] & body)

Bind txn-connection-source (symbol or destrucuring form) to a transactional connection source (an instance of asphalt.type.TxnConnectionSource) made from specified connection source, and execute body of code in that context.

Bind `txn-connection-source` (symbol or destrucuring form) to a transactional connection source (an instance of
asphalt.type.TxnConnectionSource) made from specified connection source, and execute body of code in that context.
sourceraw docstring

wrap-transaction-optionsclj

(wrap-transaction-options f txn-options)

Wrap a fn accepting connection-source as first argument with transaction options. Return the wrapped fn that accepts connection-source as first argument, but internally invokes f with transactional connection-source as first argument. See: invoke-with-transaction

Wrap a fn accepting connection-source as first argument with transaction options. Return the wrapped fn that accepts
connection-source as first argument, but internally invokes f with transactional connection-source as first argument.
See: invoke-with-transaction
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close