Constructor
new PostData()
Saves a single DataSet using a given DataAccess
- Source:
Methods
createSingleDataSetPost(ds, conn) → {SinglePostData}
Parameters:
Name | Type | Description |
---|---|---|
ds |
||
conn |
- Source:
Returns:
- Type
- SinglePostData
doAllLog(conn) → {Promise}
log all operations made
Parameters:
Name | Type | Description |
---|---|---|
conn |
DataAccess |
- Source:
Returns:
promise fails on errors
- Type
- Promise
doAllPhisicalPostBatch(conn, locking) → {Promise}
Executes all data posting
Parameters:
Name | Type | Description |
---|---|---|
conn |
DataAccess | |
locking |
OptimisticLocking |
- Source:
Returns:
promise fails on errors
- Type
- Promise
doAllUpdate(conn, result) → {Promise}
Executes all post-saving updates
Parameters:
Name | Type | Description |
---|---|---|
conn |
DataAccess | |
result |
BusinessLogicResult |
- Source:
Returns:
promise fails on errors
- Type
- Promise
getAllChanges() → {Array.<dataSetName:string, changes:Array.<DataRow>>}
- Source:
Returns:
- Type
- Array.<dataSetName:string, changes:Array.<DataRow>>
getBusinessLogic(context, rowChanges) → {Promise.<IBusinessLogic>}
This is meant to be replaced or overridden in derived classes
Parameters:
Name | Type | Description |
---|---|---|
context |
Context | |
rowChanges |
Array.<ObjectRow> |
- Source:
Returns:
- Type
- Promise.<IBusinessLogic>
getChecks(conn, post) → {Promise.<BusinessLogicResult>}
This function is called before and after applying changes to db.
The first time is called with post=false and the second time with post=true.
Should give a list of messages to return to client. If it does return an empty array, the transaction is committed.
If it does return some rows, those are merged and returned to client, and transaction is roll-backed.
if canIgnore is false in the first call, the procedure terminates and no data is written at all
This is meant to be replaced or overridden in derived classes
Parameters:
Name | Type | Description |
---|---|---|
conn |
DataAccess | |
post |
boolean | True if post check otherwise precheck are requested |
- Source:
Returns:
- Type
- Promise.<BusinessLogicResult>
init(ds, context) → {Promise.<SinglePostData>}
Parameters:
Name | Type | Description |
---|---|---|
ds |
DataSet | |
context |
Context |
- Source:
Returns:
- Type
- Promise.<SinglePostData>
isInnerPoster() → {boolean}
Check if this PostClass is run-time nested insider another one
- Source:
Returns:
- Type
- boolean
recursiveCallAfterPost(committed)
Parameters:
Name | Type | Description |
---|---|---|
committed |
boolean |
- Source:
reselectAllViewsAndAcceptChanges(conn) → {Promise}
Read again view data from database
Parameters:
Name | Type | Description |
---|---|---|
conn |
DataAccess |
- Source:
Returns:
- Type
- Promise
setAsInnerPoster()
Establish that this PostClass is run-time nested insider another one
- Source:
setInnerPosting(ds, innerPoster) → {boolean}
Check if this PostClass is run-time nested insider another one
Parameters:
Name | Type | Description |
---|---|---|
ds |
DataSet | |
innerPoster |
IInnerPoster |
- Source:
Returns:
- Type
- boolean
setOptimisticLocking(locking)
Sets a default for optimistic locking
Parameters:
Name | Type | Description |
---|---|---|
locking |
OptimisticLocking |
- Source: