VisualQuery: Out Streams
All DataSources must have Out Streams.
By convention, the primary Out is called
Such a Stream will contain zero, one or many Entities (items of data) depending on the logic in the DataSource and the data/configuration which was handed in.
The counterpart of Out-Streams are In-Streams.
Out Streams in VisualQuery
These are predefined
Out Streams where each DataSource declares what it can offer:
Some Sources can have Dynamic Out where you can create as many Out streams as you want. Usually the name you give each stream will affect what is in it:
You can always rename a connection by clicking on the name and typing in a new name.
Out-Streams are Run Once
If an Out-Stream is accessed in a web-request it will run the code to create the Stream. If it is accessed again (re-used) within the same request, it will simply return the data from the first run.
Out-Streams are Lazy
An Out-Stream offers Data, but the underlying code is not executed unless accessed. This is for performance reasons.
For an Out-Stream to be accessed, it must be connected to one or more In-Stream of other DataSource which in turn are accessed.
Note that when debugging in VisualQuery, all Out-Streams of the final target are accessed to show statistis, but if the Query is used elsewhere very often not all streams are accessed.
If an out-stream is not connected to anything, it's not used and the underlying code which generates this data will not be accessed.
Out-Streams can be Reused
The underlying code will still only be run once.
- Introduced ca. in 2sxc 6
- Extended with Dynamic Out ca. 2sxc 8