/
versions
versions
The versions operator shows array versions.
Synopsis
versions(named_array);
Summary
The versions operator lists all versions of an array in the SciDB database. Each version has a version ID and date/time of creation.
Example
To create an array with two versions, do the following:
Create an array containing all 1's:
AFL% create array A <val:double>[i=1:2]; AFL% store(build(A, 1), A);
The output is:{i} val {1} 1 {2} 1
Change the values to 2:
AFL% store(build(A, 2), A)
The output is:{i} val {1} 2 {2} 2
Use the versions operator to list the versions of array A:
AFL% versions(A);
The output is:{VersionNo} version_id,timestamp {1} 1,'2016-02-26 18:19:39' {2} 2,'2016-02-26 18:21:28'
Use the scan operator and the @ array version specifier to access a version other than the last:
AFL% scan(A@1);
The output is:{i} val {1} 1 {2} 1
, multiple selections available,