This is an old revision of the document!
Table of Contents
SQL Editor - Left Side Panel Help
The Left Side Panel (or Navigator) of Valentina SQL Editor assists in writing queries. It allows you to access several different tabs including: Schema Tab, Queries Tab, Templates Tab and Snippets Tab. Click on each tab within the navigator to display the objects of the tab.
Schema Tab
The Schema tab-panel displays the schema tree of the current database to help you write SQL query more effectively.
You can filter the tree using the filter field located at the bottom of the tab.
Double-Click Object
Double-click a Schema object in the Schema tab to add a reference into the SQL Editor at the current cursor position.
The addition to your code is appropriate to the type of Schema object.
Drag and Drop Database Objects
You can drag objects from the navigator into the main edit area. When objects are dropped into the edit area, Valentina Studio displays a dialog for editing options for the SQL command.
If you drag a Table into the main edit area, you will see:
Drag Container of Database Objects
You can drag entire folders with database objects, e.g. Tables or Fields. After dropping the objects, you get comma-separated list with names of all its elements:
For Tables:
"actor", "address", "category", "city", "country", "customer", "film", "film_actor", "film_category", "film_text", "inventory", "language", "payment", "rental", "staff", "store", "T1"
For fields:
"actor"."actor_id", "actor"."first_name", "actor"."last_name", "actor"."last_update"
Schema Tab Contextual Menu
Queries Tab
The Queries tab-panel shows all queries, saved or created in the Valentina Studio Query Editor.
Double-click a query to set its text within the SQL Editor.
Queries Tab Toolbar
The Queries Tab toolbar is located at the bottom of the tab:
- “Add” button opens the Query Editor to create a new query;
- “Delete” button deletes the selected query;
- Filter field to filter queries by name.
Templates Tab
On the SQL Editor Templates Tab are predefined templates of SQL commands. Templates differ depending on the database engine used.
Double-click the template to add the text of the template to the SQL Editor.
Templates Tab Context Menu
Snippets Tab
The Snippets tab-panel lets you create, edit and save your own named code snippets.
Double-click the snippet to add it at the current position of the text cursor or drag snippet text to an arbitrary place.
Snippets Tab Toolbar
The Snippets Tab toolbar is located at the bottom of the tab:
- “Add” button opens the dialog to create a new snippet;
- “Delete” button deletes the selected snippets;
- Filter field to filter snippets by name.
Snippet Object Contextual Menu
You can:
- Copy to Clipboard – Copies the snippet text to the clipboard;
- Send to SQL Editor – Appends the snippet text to the query in SQL Editor;
- Update from SQL Editor – Updates the snippet text with the query in SQL Editor;
- Edit… – Opens dialog to edit snippet;
- Delete… – Deletes selected snippet;
- Show For All Databases – If ON, this snippet is shown for all databases. If OFF – only for databases allowed with Show For Current Database option;
- Show For Current Database – If ON, this snippet will be shown for the current database. If OFF – only if the snippet has Show For All Databases option.
The list of snippets supports multiple selection. For the multiple snippets the context menu will look like: