Switch to: V13V12V11V10V9V8V7V6V5

SQL Editor - Autocomplete

While you type in SQL Editor, the autocomplete feature will help you type your SQL commands faster.

If only you have typed the first letter you can get an autocomplete menu with suggestions.

For this Valentina Studio collects different information. For example:

  • list of identifiers from your database (e.g. Table, Field names, etc)
  • list of keywords from DBMS
  • list of built-in functions from DBMS

You can move in the menu by the UP/DOWN arrow buttons. You can press ENTER to use the current item on the menu as the final choice. The menu will be closed and the item will be typed. The same you can do by mouse-click on an item.

Press ESC if you want to close the menu without any choice. You can force to show the menu by pressing CTRL/CMD + '.' shortcut for the command “SQL → Complete Word”.

Some items of the menu can show a tooltip with useful information.

AutoComplete Prefs

You can tune how auto-completion works in the Preferences Dialog:autocompletion

AutoComplete Styles

StartWith Style

This is the original style of autocomplete, which worked in Valentina Studio for years.

When you type letters, they are used to find strings in the prepared lists using the StartWith search. Typed chars are shown in the menu in yellow color.

Future Prefix

Additionally, the algorithm tries to find a group of strings with the same “future prefix” using the currently selected item.

If such a “future prefix” is found, it is highlighted in the menu by PINK color and if you press the TAB button on the keyboard this “future prefix” will be typed for you.

On the picture, you can see that “admintools_” is marked as a future prefix. On TAB it will be added to the typed string, so will be “jos3_admintools_”.

RegEx Style

This style of autocomplete was added into v10.5 (Sept 2020).

When you type letters, they are used to find strings in the prepared lists using the RegEx search, which is able to find that letters also inside of strings. Notice that the StartWith search is the special case of the RegEx search.

RegEx search can be more comfortable if many names in a database use common prefixes, like on the picture above: “jos3_”, “admintools_”. You can skip these prefixes and start to type a significant part.

Notice, that if you use this style of autocompletion, then there is no feature “future prefix”, because it has no sense.