Results for “Collections & data structures”
Small, practical examples. Search by task or narrow things down below.
Select the top row in each group with a tie-breaker
Postgres: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.
Postgres✓ Tested
Select the top row in each group with a tie-breaker
SQLite: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.
SQLite✓ Tested
Select values in an inclusive range
SQL: BETWEEN includes both endpoints of the range.
SQL✓ Tested
Select values in an inclusive range
SQL Server: BETWEEN includes both endpoints of the range.
SQL Server✓ Tested
Send query parameters as an object
jQuery: jQuery encodes the data object into the request query.
jQuery✓ Tested
Serialize a hashtable as JSON
Produce compact JSON for a small data object.
JSON✓ Tested
Serialize an object to JSON
Serialize a small anonymous C# object with System.Text.Json.
C#✓ Tested
Serialize nested objects with an explicit depth
PowerShell: Select a sufficient depth so nested data is retained instead of converted into a descriptive string.
PowerShell✓ Tested
Serialize query rows as JSON
Return a JSON array directly from a SELECT.
FOR JSON✓ Tested
Set a JSON property
Create an updated JSON document from existing text.
json_set✓ Tested
Set and inspect a bit flag
Store several boolean states in one byte.
bitSet✓ Tested
Show a bounded measurement
Display a measured value within a known range using HTML meter.
HTML✓ Tested