Results for “default”
Small, practical examples. Search by task or narrow things down below.
Apply a default when an insert omits a column
SQL: A default supplies an omitted value; an explicit NULL still follows the column’s nullability rules.
SQL✓ Tested
Apply a default when an insert omits a column
SQL Server: A default supplies an omitted value; an explicit NULL still follows the column’s nullability rules.
SQL Server✓ Tested
Apply a default when an insert omits a column
Postgres: A default supplies an omitted value; an explicit NULL still follows the column’s nullability rules.
Postgres✓ Tested
Apply a default when an insert omits a column
SQLite: A default supplies an omitted value; an explicit NULL still follows the column’s nullability rules.
SQLite✓ Tested
Assign a default to an empty or unset variable
Bash Scripts: The colon-equals expansion both supplies and assigns a fallback value.
Bash Scripts✓ Tested
Avoid a shared mutable default argument
Python: Create a fresh list inside the function when the optional argument is omitted.
Python✓ Tested
Build an image with a default command
Docker / Compose: Build an image with a default command with a complete introductory Dockerfile.
Docker / Compose✓ Tested
Choose an image’s default directory
Docker / Compose: Choose an image’s default directory with a complete introductory Dockerfile.
Docker / Compose✓ Tested
Combine a stable entrypoint with default arguments
Docker / Compose: CMD supplies default arguments to an exec-form ENTRYPOINT.
Docker / Compose✓ Tested
Construct a struct with default values
Construct a struct with default values in a complete Rust program using the standard library.
Rust✓ Tested
Give an optional property a default
Handle missing object fields with nullish coalescing.
optional✓ Tested
Move a collection out and leave an empty default
Move a collection out and leave an empty default in a complete Rust program using the standard library.
Rust✓ Tested