FIND YOUR NEXT FEW LINES

Results for “if”

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

946 snippets foundClear filters
HTMLText semantics

Expand an abbreviation with explanatory text

HTML: The title attribute supplies the full form while nearby text remains useful without hovering.

HTML✓ Tested
PostgresJSON & arrays

Expand an array into rows

Use WITH ORDINALITY to retain original element order.

unnest✓ Tested
HTMLAccessible structure

Expose a disclosure button’s expanded state

HTML: Keep aria-expanded synchronized with the controlled panel’s hidden state.

HTML✓ Tested
SQLSchema design & transactions

Expose a reusable filtered view

SQL: A view stores a query definition rather than a snapshot of its rows.

SQL✓ Tested
SQL ServerSchema design & transactions

Expose a reusable filtered view

SQL Server: A view stores a query definition rather than a snapshot of its rows.

SQL Server✓ Tested
PostgresSchema design & transactions

Expose a reusable filtered view

Postgres: A view stores a query definition rather than a snapshot of its rows.

Postgres✓ Tested
SQLiteSchema design & transactions

Expose a reusable filtered view

SQLite: A view stores a query definition rather than a snapshot of its rows.

SQLite✓ Tested
SQLiteJSON data

Extract a JSON field

Read a scalar value from JSON text.

json_extract✓ Tested
PythonText validation & encoding

Extract named regex fields

Python: Use named capture groups to parse a known date-shaped identifier.

Python✓ Tested
PythonStrings & dates

Extract numbers from text

Find all runs of ASCII digits in a string and convert the matches to integers.

regex✓ Tested
PostgresDates & series

Extract part of a date

Read a calendar component with EXTRACT.

EXTRACT✓ Tested
SQLiteQueries & text

Extract part of a string

Use one-based positions with substr.

substr✓ Tested