v1.2.0 Summary Chapter 2: Modeling basics 2. Start modeling 2.4. Code completion widget
You're browsing the documentation of a version that is still under development, the features described here may change or even be removed.

2.4. Code completion widget

In almost all input fields that accept a SQL expression, pgModeler implements a basic but handy code completion widget (as shown below). The purpose of this control is to enhance the speed of command typing since the user can have quick access to objects' names as well as SQL keywords, and in some specific cases, code snippets. To activate it, just hit Ctrl + Space or type the dot (.) character and the completion will pop up. The listing changes as the user types something. To hide the completion hit Esc. To use one of the elements in the listing just select it using the arrow keys or the mouse and hit Enter or double-click the desired item. It's important to note that while using the completion widget in the design view all objects in the current database model are displayed as well as SQL keywords and code snippets (see below).

The user can avoid the behavior of automatically closing the completion widget when selecting items by checking the box Always on top, this way only hitting Esc causes the widget to be closed. Any other action like double-clicking or hitting Enter will not trigger the close action.

Now, when using the completion in manage view to type SQL commands that are sent to a server, the widget will list schemas, tables (and columns), sequences, and functions names in the middle of the INSERT, DELETE, TRUNCATE, UPDATE, ALTER, and DROP commands. The behavior of the completion changes depending on the SQL command being typed. This feature also considers table aliases and lists the correct columns. It also works with non-schema-qualified object names, but in that case, public and pg_catalog will be used as the default search path when retrieving object names during completion. The image below gives some examples of how the completion works on the manage view.


Oct 31, 2024 at 09:12