FIND YOUR NEXT FEW LINES

Results for “foreign keys”

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

56 snippets foundClear filters
SQLConstraints & defaults

Keep children while clearing a deleted relationship

SQL: ON DELETE SET NULL requires a nullable foreign-key column.

SQL✓ Tested
SQL ServerConstraints & defaults

Keep children while clearing a deleted relationship

SQL Server: ON DELETE SET NULL requires a nullable foreign-key column.

SQL Server✓ Tested
PostgresConstraints & defaults

Keep children while clearing a deleted relationship

Postgres: ON DELETE SET NULL requires a nullable foreign-key column.

Postgres✓ Tested
SQLiteConstraints & defaults

Keep children while clearing a deleted relationship

SQLite: ON DELETE SET NULL requires a nullable foreign-key column.

SQLite✓ Tested
Bash ScriptsFunctions & arguments

Look up values in an associative array

Use named keys for a small in-memory configuration table.

dictionary✓ Tested
PowerShellHashtables & object records

Merge configuration maps with override precedence

PowerShell: Copy defaults before applying override keys so the original remains unchanged.

PowerShell✓ Tested
C++Ordering & set operations

Preserve equal-key order while sorting records

C++: stable_sort retains encounter order for records whose selected sort keys compare equal.

C++✓ Tested
PowerShellHashtables & object records

Preserve key insertion order

PowerShell: An ordered dictionary enumerates keys in the order they were inserted.

PowerShell✓ Tested
JavaQueues & collection operations

Preserve map insertion order

Java: Use LinkedHashMap when iteration should follow the order keys were first added.

Java✓ Tested
PythonStructured data & serialization

Produce compact deterministic JSON

Python: Sort dictionary keys and remove separator whitespace for a reproducible representation.

Python✓ Tested
TypeScriptUtilities & async

Read a property with keyof

Keep the key and returned value tied to an object type.

keyof✓ Tested
JavaScriptObject behavior & collections

Read an object’s own enumerable values

JavaScript: Object.values provides values without their corresponding keys.

JavaScript✓ Tested