Results for “unknown”
Small, practical examples. Search by task or narrow things down below.
Reject unknown JSON object fields
Reject unknown JSON object fields using a complete Go program with explicit sample inputs.
Go✓ Tested
Represent progress whose total is unknown
HTML: Omit value to make a progress element indeterminate.
HTML✓ Tested
Validate an unknown value with a type guard
Check a field before treating unknown data as a typed object.
unknown✓ Tested
Safely read a caught error
Check the error type before accessing its message.
unknown✓ Tested
Create a reusable one-to-many lookup
C#: ToLookup groups values by key and returns an empty sequence for an unknown key.
C#✓ Tested
Dispatch a one-character serial command
Arduino / C: A switch provides explicit handling for accepted and unknown commands.
Arduino / C✓ Tested
Reject a negative quantity with CHECK
SQL: Combine NOT NULL and CHECK because an unknown NULL check result is normally accepted.
SQL✓ Tested
Reject a negative quantity with CHECK
SQL Server: Combine NOT NULL and CHECK because an unknown NULL check result is normally accepted.
SQL Server✓ Tested
Reject a negative quantity with CHECK
Postgres: Combine NOT NULL and CHECK because an unknown NULL check result is normally accepted.
Postgres✓ Tested
Reject a negative quantity with CHECK
SQLite: Combine NOT NULL and CHECK because an unknown NULL check result is normally accepted.
SQLite✓ Tested
Test missing values with IS NULL
Find rows where an optional value is absent.
IS NULL✓ Tested