Files
secondo/Algebras/Temporal2/Temporal2.examples
2026-01-23 17:03:45 +08:00

78 lines
2.6 KiB
Plaintext

Sequential: YES
Database: temporal2test
Restore: YES
Operator : streamvalve
Number : 1
Signature: stream(alpha) x string -> stream(alpha)
Example : query intstream (1,3) streamvalve [] printstream count;
Result : 3
Operator : streamnext
Number : 2
Signature: string x int -> int;
Example : query streamnext('NoSuchValve', 11);
Result : -1
Operator : m2mm
Number : 3
Signature: mpoint -> mpoint2;
Example : query [const mpoint value ((("2000-01-01" "2000-01-01-00:01" TRUE FALSE)(0.0 0.0 1.0 1.0)))] m2mm;
Result : (mpoint2((("2000-01-01" "2000-01-01-00:01" TRUE FALSE)(0.0 0.0 1.0 1.0))))
Operator : mm2m
Number : 4
Signature: mpoint2 -> mpoint;
Example : query [const mpoint2 value ((("2000-01-01" "2000-01-01-00:01" TRUE FALSE)(0.0 0.0 1.0 1.0)))] mm2m;
Result : (mpoint((("2000-01-01" "2000-01-01-00:01" TRUE FALSE)(0.0 0.0 1.0 1.0))))
Operator : barrier
Number : 5
Signature: string x int -> int
Example : query barrier ('sampleid', 1);
Result : 1
Operator : appendpositions
Number : 6
Signature: stream(iT) x mT -> mT, where T in {bool, int, real, string, point}
Example : query pos_updates feed appendpositions ['trajectories', 'DestTid', 'IPos','Trajectory'] count;
Result : 100
Operator : atperiods
Number : 7
Signature: (mT periods) -> mT
Example : query train7 atperiods [const periods value (("2003-11-20-07:01:40" "20003-11-20-07:45" TRUE TRUE))]
Result : (mpoint2((("2003-11-20-07:01:40" "2003-11-20-07:01:44.586" TRUE FALSE)(-3519.76750330251 14374.09577278732 -3544.0 14312.0))(("2003-11-20-07:01:44.586" "2003-11-20-07:01:50" TRUE FALSE)(-3544.0 14312.0 -3560.0 14235.0))(("2003-11-20-07:01:50" "2003-11-20-07:02" TRUE FALSE)(-3560.0 14235.0 -3560.0 14235.0))))
Operator : enterwormhole
Number : 8
Signature: stream(X) x string -> int
Example : query pos_updates feed enterwormhole [''];
Result : 100
Operator : leavewormhole
Number : 9
Signature: string -> stream(X)
Example : query leavewormhole ('') count;
Result : 0
Operator : bbox
Number : 10
Signature: upoint -> rect3, mpoint2 -> rect3, ipoint -> rect3, periods -> rect3, instant -> rect3
Example : query bbox([const mpoint2 value ((("2000-01-01" "2000-01-01-00:01" TRUE FALSE)(0.0 0.0 1.0 1.0)))])
Result : (rect3 (0.0 1.0 0.0 1.0 -2.0 -1.999305555555555))
Operator : trajectory
Number : 11
Signature: mpoint2 -> line
Example : query trajectory(train7)
Result : file
Operator : translateappendS
Number : 12
Signature: stream(tuple([a1 : t1, ...an : tn])) x ai x duration -> mpoint2, with ti = mpoint2
Example : query Trains feed head[3] translateappendS[Trip, [const duration value(0 40000)]]
Result : file