Difference between revisions of "ROLLBACK TIMELINE"

From Recital Documentation Wiki
Jump to: navigation, search
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
{{YLM to do}}
 
 
==Purpose==
 
==Purpose==
Rolls back transactions database timeline transaction information
+
Rolls back transactions stored in the database timeline
  
  
Line 9: Line 8:
  
 
==See Also==
 
==See Also==
[[CLEAR TIMELINE]], [[DTOS()]], [[DISPLAY TIMELINE]], [[LIST TIMELINE]], [[SET TIMELINE]], [[SET TIMESTAMP]], [[SYSTIMELINE]]
+
[[CLEAR TIMELINE]], [[DTOS()]], [[DISPLAY TIMELINE]], [[LIST TIMELINE]], [[SET TIMELINE]], [[SET TIMESTAMP]], [[SYSTIMELINE]], [[UNWATCH()]], [[WATCH()]], [[WATCHCHANGED()]], [[WATCHING()]], [[WATCHRESET()]]
  
  
 
==Description==
 
==Description==
DISPLAY TIMELINE displays database timeline transaction information.  Database timelines provide row versioning for Recital database applications.  Whenever a change is made to a table that is timeline enabled, delta changes are automatically recorded for each transaction.
+
ROLLBACK TIMELINE rolls back transactions stored in the database timeline.  Database timelines provide row versioning for Recital database applications.  Whenever a change is made to a table that is timeline enabled, delta changes are automatically recorded for each transaction.
  
DISPLAY TIMELINE differs from the LIST TIMELINE command in that it pauses every 17 lines until a key is pressed.   
+
The optional RANGE <expC1> [, <expC2>] clause allows the rollback to be restricted to transactions from a particular date <expC1> or transactions that fall between two inclusive dates: <expC1> and <expC2>The dates must be specified as strings in the format YYYYMMDDHH:MM:SS (including the time) or YYYYMMDD (date only).  The [[DTOS()]] function can be used to convert date data type values to YYYYMMDD format.  HH:MM:SS is the standard time format returned by the TIME() function.
  
The optional RANGE <expC1> [, <expC2>] clause allows the display to be restricted to transactions from a particular date <expC1> or transactions that fall between two inclusive dates: <expC1> and <expC2>.  The dates must be specified as strings in the format YYYYMMDD.  The [[DTOS()]] function can be used to convert date data type values to this format.
+
The optional FOR <expL> clause, where <expL> is a valid logical expression, can also be used to restrict the rollback.  For a structure listing of the database timeline storage table, please see [[SYSTIMELINE]].
 
+
The optional FOR <expL> clause, where <expL> is a valid logical expression, can also be used to restrict the output.  For a structure listing of the database timeline storage table, please see [[SYSTIMELINE]].
+
 
+
Transactions are displayed grouped by transaction date and include the following:
+
 
+
* Time of transaction
+
* Table name
+
* Row number
+
* Changed by user@hostname
+
* Command
+
* Field old and new values
+
  
 
To enable database timelines simply issue the SET TIMELINE ON command in your Recital configuration file.  SET TIMELINE is OFF by default.
 
To enable database timelines simply issue the SET TIMELINE ON command in your Recital configuration file.  SET TIMELINE is OFF by default.
Line 35: Line 23:
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
display timeline range dtos(date()-10), dtos(date()) for table = "example"
+
rollback timeline range dtos(date()-10), dtos(date()) for systimeline.table = "example"
 
</code>
 
</code>
  
Line 41: Line 29:
 
==Products==
 
==Products==
 
Recital, Recital Server
 
Recital, Recital Server
 +
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Database Timelines]]
 
[[Category:Database Timelines]]
[[Category:Database Timelines Commands]]
 

Latest revision as of 12:02, 30 September 2016

Purpose

Rolls back transactions stored in the database timeline


Syntax

ROLLBACK TIMELINE [RANGE <expC1> [, <expC2>]] [FOR <expL>]


See Also

CLEAR TIMELINE, DTOS(), DISPLAY TIMELINE, LIST TIMELINE, SET TIMELINE, SET TIMESTAMP, SYSTIMELINE, UNWATCH(), WATCH(), WATCHCHANGED(), WATCHING(), WATCHRESET()


Description

ROLLBACK TIMELINE rolls back transactions stored in the database timeline. Database timelines provide row versioning for Recital database applications. Whenever a change is made to a table that is timeline enabled, delta changes are automatically recorded for each transaction.

The optional RANGE <expC1> [, <expC2>] clause allows the rollback to be restricted to transactions from a particular date <expC1> or transactions that fall between two inclusive dates: <expC1> and <expC2>. The dates must be specified as strings in the format YYYYMMDDHH:MM:SS (including the time) or YYYYMMDD (date only). The DTOS() function can be used to convert date data type values to YYYYMMDD format. HH:MM:SS is the standard time format returned by the TIME() function.

The optional FOR <expL> clause, where <expL> is a valid logical expression, can also be used to restrict the rollback. For a structure listing of the database timeline storage table, please see SYSTIMELINE.

To enable database timelines simply issue the SET TIMELINE ON command in your Recital configuration file. SET TIMELINE is OFF by default.


Example

rollback timeline range dtos(date()-10), dtos(date()) for systimeline.table = "example"


Products

Recital, Recital Server