FIND YOUR NEXT FEW LINES

Results for “fallback”

Small, practical examples. Search by task or narrow things down below.

34 snippets foundClear filters
SQLiteWindow analytics

Read the next row’s value

SQLite: LEAD reads a later ordered row without a self join and supports a fallback at the end.

SQLite✓ Tested
JavaScriptPromises & iteration protocols

Recover from an expected promise rejection

JavaScript: Return a fallback from catch so later handlers receive an ordinary resolved value.

JavaScript✓ Tested
TypeScriptPromises & iteration protocols

Recover from an expected promise rejection

TypeScript: Return a fallback from catch so later handlers receive an ordinary resolved value.

TypeScript✓ Tested
SQLExpressions & aggregates

Replace NULL in a result

Choose a fallback for a missing value.

COALESCE✓ Tested
JavaRecords & reliable control flow

Return a value from a switch expression

Java: Use an exhaustive switch expression with a fallback for other input values.

Java✓ Tested
SQLText cleanup & matching

Treat an empty trimmed value as missing

SQL: NULLIF converts an empty string to NULL before a fallback is applied.

SQL✓ Tested
SQL ServerText cleanup & matching

Treat an empty trimmed value as missing

SQL Server: NULLIF converts an empty string to NULL before a fallback is applied.

SQL Server✓ Tested
PostgresText cleanup & matching

Treat an empty trimmed value as missing

Postgres: NULLIF converts an empty string to NULL before a fallback is applied.

Postgres✓ Tested
SQLiteText cleanup & matching

Treat an empty trimmed value as missing

SQLite: NULLIF converts an empty string to NULL before a fallback is applied.

SQLite✓ Tested
Bash ScriptsVariables & text

Use a default value for an unset variable

Supply a fallback without changing the original variable.

parameter expansion✓ Tested