Results for “foreign keys”
Small, practical examples. Search by task or narrow things down below.
Keep children while clearing a deleted relationship
SQL: ON DELETE SET NULL requires a nullable foreign-key column.
SQL✓ Tested
Keep children while clearing a deleted relationship
SQL Server: ON DELETE SET NULL requires a nullable foreign-key column.
SQL Server✓ Tested
Keep children while clearing a deleted relationship
Postgres: ON DELETE SET NULL requires a nullable foreign-key column.
Postgres✓ Tested
Keep children while clearing a deleted relationship
SQLite: ON DELETE SET NULL requires a nullable foreign-key column.
SQLite✓ Tested
Look up values in an associative array
Use named keys for a small in-memory configuration table.
dictionary✓ Tested
Merge configuration maps with override precedence
PowerShell: Copy defaults before applying override keys so the original remains unchanged.
PowerShell✓ Tested
Preserve equal-key order while sorting records
C++: stable_sort retains encounter order for records whose selected sort keys compare equal.
C++✓ Tested
Preserve key insertion order
PowerShell: An ordered dictionary enumerates keys in the order they were inserted.
PowerShell✓ Tested
Preserve map insertion order
Java: Use LinkedHashMap when iteration should follow the order keys were first added.
Java✓ Tested
Produce compact deterministic JSON
Python: Sort dictionary keys and remove separator whitespace for a reproducible representation.
Python✓ Tested
Read a property with keyof
Keep the key and returned value tied to an object type.
keyof✓ Tested
Read an object’s own enumerable values
JavaScript: Object.values provides values without their corresponding keys.
JavaScript✓ Tested