Module: Neon::TransactionHelpers::Rest
- Included in:
- PropertyContainer::Rest
- Defined in:
- lib/helpers/transaction_helpers.rb
Instance Method Summary collapse
Instance Method Details
#run_rest_transaction(method, *args, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/helpers/transaction_helpers.rb', line 4 def run_rest_transaction(method, *args, &block) if @session.auto_tx yield else # Fetch the query for this method query = query_for method, *args tx = @session.begin_tx result = tx.run_query query tx.success tx.close result = parse_result(result, method, *args) end end |