Results for “array_agg”
Small, practical examples. Search by task or narrow things down below.
Generate a bounded integer range
JavaScript: Array.from supplies each output position to its mapping function.
JavaScript✓ Tested
Generate a bounded integer range
TypeScript: Array.from supplies each output position to its mapping function.
TypeScript✓ Tested
Group related readings in a struct
Arduino / C: A struct keeps a sample’s fields together without dynamic allocation.
Arduino / C✓ Tested
Join rows in a chosen order
Aggregate text with STRING_AGG and WITHIN GROUP.
STRING_AGG✓ Tested
Join text rows in a chosen order
Combine values using string_agg.
string_agg✓ Tested
Join values with a delimiter
Concatenate rows in a specified order.
group_concat✓ Tested
Keep a counter from wrapping at its maximum
Arduino / C: Increment only when the value is below its limit.
Arduino / C✓ Tested
Keep both matching and rejected values
JavaScript: Use two explicit outputs when a caller needs both sides of a classification.
JavaScript✓ Tested
Keep both matching and rejected values
TypeScript: Use two explicit outputs when a caller needs both sides of a classification.
TypeScript✓ Tested
Map items to multiple output values
JavaScript: flatMap combines mapping and a one-level flattening operation.
JavaScript✓ Tested
Map items to multiple output values
TypeScript: flatMap combines mapping and a one-level flattening operation.
TypeScript✓ Tested
Reject insertion when a fixed queue is full
Arduino / C: Track a count separately from circular read and write positions.
Arduino / C✓ Tested