Difference between revisions of "SET TIMELINE"

From Lianjapedia
Jump to: navigation, search
(See Also)
(Description)
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
  
 
Timelines can also be enabled for a specific database in its metadata.  In the [[MetaData_Editor#Database_MetaData|MetaData Editor]] specify the Attribute as ''timeline'' and the Value as ''on''.  Alternatively, use the [[ALTER DATABASE]] command as shown below.
 
Timelines can also be enabled for a specific database in its metadata.  In the [[MetaData_Editor#Database_MetaData|MetaData Editor]] specify the Attribute as ''timeline'' and the Value as ''on''.  Alternatively, use the [[ALTER DATABASE]] command as shown below.
 +
 +
If you are not building Lianja Apps but rather you are performing data admin tasks that perform CRUD operations on large tables and work mainly interactively in the console then you should SET SYSTIMELINE OFF.
 +
 +
From Lianja v6.0, SET TIMELINE is automatically switched OFF for the following commands: [[APPEND BLANK]], [[APPEND FROM]] and [[GENERATE]].
  
 
==Example==
 
==Example==
Line 27: Line 31:
 
[[Category:Lianja VFP Extensions]]
 
[[Category:Lianja VFP Extensions]]
 
[[Category:VFP Command Extensions]]
 
[[Category:VFP Command Extensions]]
 +
[[Category:Performance and Optimization]]

Latest revision as of 05:50, 4 January 2021

Purpose

Enable database timelines for row versioning

Syntax

SET TIMELINE ON | OFF

See Also

ALTER DATABASE, CLEAR TIMELINE, Database Timelines Commands and Functions, Database Timelines (Video), LIST TIMELINE, MetaData Editor, ROLLBACK TIMELINE, SET SYSTIMELINE, SET TIMESTAMP, Systimeline System Table, TIMELINE(), Timeline Section Attributes, Understanding Database Timelines

Description

Database timelines provide row versioning for Lianja database applications. Whenever a change is made to a table that is timeline enabled, delta changes are automatically recorded for each transaction. Changes made to any tables that are timeline enabled can be undone much like you would undo changes to program code that you edit in a text editor. SET TIMELINE is OFF by default.

Timelines can also be enabled for a specific database in its metadata. In the MetaData Editor specify the Attribute as timeline and the Value as on. Alternatively, use the ALTER DATABASE command as shown below.

If you are not building Lianja Apps but rather you are performing data admin tasks that perform CRUD operations on large tables and work mainly interactively in the console then you should SET SYSTIMELINE OFF.

From Lianja v6.0, SET TIMELINE is automatically switched OFF for the following commands: APPEND BLANK, APPEND FROM and GENERATE.

Example

set timeline on
 
// Or set in the database metadata to always apply to the specified database
alter database southwind metadata "timeline=on"