Skip to content

Transaction specification

Milko Venkov edited this page Aug 30, 2018 · 21 revisions

Transaction Specification

Contents

  1. Overview
  2. User Stories
  3. Functionality
  4. Assumptions and Limitations
  5. Test scenarios
  6. References

Revision History

Version User Date Notes
0.1 Milko Venkov Aug 30, 2018 Initial Draft

Objectives

igx-transaction should be able to plug between given component and its data source. While plugged in igx-transaction should collect all the changes performed in the component without send them to the data source. igx-transaction should update the data source and commit all the changes.

As an end user, I want

  • there is no end users stories as igx-transaction should be an Angular Service.

Developer Stories

As a developer, I want to

  • be able to enable transaction on a given component
  • be able to retrieve all the transactions - transaction log
  • be able to get updated state of the data including all changes in the transaction log
  • be able to update data source with all the changes currently in the transaction log
  • be able to undo the last change
  • be able to redo the change that was undone
  • be able to reset all the changes in the transaction log

3.1. End User Experience

3.2. Developer Experience

Developers are able to inject the igx-transaction service. Then developers should be able to add changes to the transaction's transaction log. After some changes are added developers should be able to retrieve updated data source state, including all changes in the transaction log; update the data source when needed; reset all the changes in the transaction log; perform undo and redo actions.

3.3. API

Methods

ITransaction

Name Description Parameters
add Adds a change to the transaction's transaction log change
get Gets the respective change according to provided id id
getAll Gets all the changes from the transaction log -
update Commits all the changes to the data source -
reset Clears all the changes from the transaction log -
undo Remove the last change from the transaction log -
undo Adds the last undone change to the transaction log -

There are no any assumptions or limitations.

Clone this wiki locally