Difference between revisions of "RECALL"

From Lianjapedia
Jump to: navigation, search
 
(4 intermediate revisions by 3 users not shown)
Line 3: Line 3:
  
 
==Syntax==
 
==Syntax==
RECALL [<scope>]
+
RECALL  
 +
 
 +
[IN <workarea>|<alias>]
 +
 
 +
[<scope>]
  
 
[FOR <condition>]
 
[FOR <condition>]
Line 14: Line 18:
 
==Description==
 
==Description==
 
The RECALL command is used to reinstate those records that are marked for deletion in the active table.  The default scope for the RECALL command is only to recall the current record.  Records marked for deletion cannot be recalled once a table has been packed.  If SET FILTER TO is in effect, then any records that do not satisfy the filter condition are not recalled.  While SET DELETED ON is in effect, all deleted records are automatically filtered and cannot be recalled.
 
The RECALL command is used to reinstate those records that are marked for deletion in the active table.  The default scope for the RECALL command is only to recall the current record.  Records marked for deletion cannot be recalled once a table has been packed.  If SET FILTER TO is in effect, then any records that do not satisfy the filter condition are not recalled.  While SET DELETED ON is in effect, all deleted records are automatically filtered and cannot be recalled.
 +
 +
====IN <workarea>|<alias>====
 +
If the workarea number, letter or alias name is specified, the RECALL is carried out in that workarea.  Note, the IN clause must be the first clause.  From v6.0.
  
 
====<scope>====
 
====<scope>====
Line 24: Line 31:
 
If the WHILE clause is specified, then the RECALL command terminates as soon as the specified <condition> is .F..  The WHILE clause is often used in conjunction with the FIND or SEEK commands to RECALL records which have a common key.
 
If the WHILE clause is specified, then the RECALL command terminates as soon as the specified <condition> is .F..  The WHILE clause is often used in conjunction with the FIND or SEEK commands to RECALL records which have a common key.
  
If the table is indexed, then the records are read in index order unless you specify RECORD <expN>, as the scope.  If the currently selected table is not opened exclusively, Recital will automatically lock each record in turn, recall it if required, then unlock the record.
+
If the table is indexed, then the records are read in index order unless you specify RECORD <expN>, as the scope.  If the currently selected table is not opened exclusively, Lianja will automatically lock each record in turn, recall it if required, then unlock the record.
 
+
Recital positions to EOF when RECALL specifies FOR or WHILE conditions and SET COMPATIBLE TO <XBASE> is in effect.
+
  
 
==Example==
 
==Example==
Line 38: Line 43:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
[[Category:Data Commands]]
+
[[Category:NoSQL Commands]]

Latest revision as of 08:01, 4 January 2021

Purpose

Reinstate records that are marked for deletion

Syntax

RECALL

[IN <workarea>|<alias>]

[<scope>]

[FOR <condition>]

[WHILE <condition>]

See Also

DELETE, PACK, SCOPE, SET DELETED, SET FILTER, ZAP

Description

The RECALL command is used to reinstate those records that are marked for deletion in the active table. The default scope for the RECALL command is only to recall the current record. Records marked for deletion cannot be recalled once a table has been packed. If SET FILTER TO is in effect, then any records that do not satisfy the filter condition are not recalled. While SET DELETED ON is in effect, all deleted records are automatically filtered and cannot be recalled.

IN <workarea>|<alias>

If the workarea number, letter or alias name is specified, the RECALL is carried out in that workarea. Note, the IN clause must be the first clause. From v6.0.

<scope>

The default SCOPE is the current record unless a FOR or WHILE condition is specified.

FOR <condition>

If the FOR clause is specified, then only those records which satisfy the <condition> are considered for recalling. If no <scope> was specified and the FOR clause was specified, then a scope of ALL is used.

WHILE <condition>

If the WHILE clause is specified, then the RECALL command terminates as soon as the specified <condition> is .F.. The WHILE clause is often used in conjunction with the FIND or SEEK commands to RECALL records which have a common key.

If the table is indexed, then the records are read in index order unless you specify RECORD <expN>, as the scope. If the currently selected table is not opened exclusively, Lianja will automatically lock each record in turn, recall it if required, then unlock the record.

Example

use patrons index events
delete for event = "OPERA" and eventdate < date()
seek "OPERA"
recall rest while event = "OPERA" and eventdate < date()