Help › Write SQL
Find and replace
Search the SQL in a tab as you type, with case, whole-word and regular-expression options, and replace one match or all of them.
Querlyn 0.1.0 is not released yet. This help describes it ahead of release.
Find and replace work on the text of the tab you are in.
Find
Press ⌘F on macOS or Ctrl+F on Windows and Linux (). A bar opens above the editor. If you had text selected on one line, the bar starts with it.
Type. The first match from where the cursor was is selected as you type, and every match is highlighted. Beside the field, the bar counts them: "2 of 14", or "No results".
Move between matches:
To Press Go to the next match ↩ on macOS or Enter on Windows and Linux in the bar, or ⌘G on macOS or F3 on Windows and Linux Go to the match before ⇧ on macOS or Shift on Windows and Linux and ↩ on macOS or Enter on Windows and Linux in the bar, or ⇧⌘G on macOS or Shift+F3 on Windows and Linux Close the bar ⎋ on macOS or Esc on Windows and Linux
⌘G on macOS or F3 on Windows and Linux and ⇧⌘G on macOS or Shift+F3 on Windows and Linux also work while the keyboard is in the editor. If the bar is closed, they open it.
Narrow the search
Three buttons in the bar change what counts as a match:
| Button | Shortcut | Finds |
|---|---|---|
| Match case | ⌥⌘C on macOS or Alt+C on Windows and Linux | Only text in the same upper and lower case. |
| Whole word | ⌥⌘W on macOS or Alt+W on Windows and Linux | Only whole words: id does not match in order_id. |
| Regular expression | ⌥⌘R on macOS or Alt+R on Windows and Linux | What the pattern describes. If the pattern is not valid, the bar says what is wrong with it. |
A regular expression matches within one line.
Replace
Press ⌥⌘F on macOS or Ctrl+H on Windows and Linux (). The bar opens with a second field, Replace. ⇥ on macOS or Tab on Windows and Linux moves between the two fields.
Type what to find and what to put in its place.
Choose:
Button What it does Replace Replaces the selected match and goes to the next (). ↩ on macOS or Enter on Windows and Linux in the Replace field does the same. All Replaces every match (⌥⌘↩ on macOS or Ctrl+Alt+Enter on Windows and Linux). One step to undo.
With Regular expression on, the replacement can use what the pattern
captured: $1 for the first group in parentheses, ${name} for a named
group.
Other ways to find
- To change every occurrence of a word by typing once, select them all with ⇧⌘L on macOS or Ctrl+Shift+L on Windows and Linux; see Edit in several places at once.
- To rename an alias or a
WITHquery everywhere it is used, and nowhere else, see Refactor a query. - In the results, ⌘F on macOS or Ctrl+F on Windows and Linux filters rows; see Sort and filter results.
Find works in one tab at a time. There is no search across tabs or files.
Help for Querlyn 0.1.0. All help topics