Method GenerateStreamsSource(IReadOnlyList<FieldInfo>, string, string?, IReadOnlyCollection<string>?, bool, string?, (long StructureId, string DbColumn)?)
The streams source on its own, as a derived table aliased pvt: one row per object of
the scheme with a column per field, ready to be aggregated, grouped or windowed. It is the
same table the aggregate pivot produces, so whatever was written over that works over this.
Example output (ends without a newline, so the caller can put WHERE or GROUP BY next):
(
SELECT o_src._id AS _id_object, o_src._id_owner, f0._numeric AS "Salary"
FROM _objects o_src
LEFT JOIN _values f0 ON f0._id_object = o_src._id AND f0._id_structure = $2 AND f0._array_index IS NULL
WHERE o_src._id_scheme = $1
OFFSET 0
) pvt
public string GenerateStreamsSource(IReadOnlyList<FieldInfo> fields, string schemeIdParam, string? additionalObjectFilter, IReadOnlyCollection<string>? baseColumns = null, bool fence = true, string? drivingCondition = null, (long StructureId, string DbColumn)? drivingField = null)