Sunday, December 22, 2024
HomeProductsSQL Server ToolsSQL Complete Enhanced Functionality

SQL Complete Enhanced Functionality

While working on the new version of SQL Complete, we focused on adding the most needed features discussed on Devart’s uservoice site – devart.uservoice.com. Here, users leave their feedbacks regarding any of the Devart’s products as well as vote for new features to be added. Thus, we do our best to address user needs for most desirable functionality. This is an early preview of the upcoming functionality that will be available in SQL Complete v5.0!

In this article, we will discuss newly added features that will speed up and simplify SQL code writing.

New Features in Details

SQL Refactoring

Using the refactoring you can avoid cumbersome code rewriting and code analysis, which when done manually, may be very error-prone and time-consuming. Instead, the process will be simple and safe for your database structure.

For example, you can use refactoring to rename database objects and variables. This allows you to assign more meaningful names to objects you constantly use when working with a database. When you change the name of an object, all references to the object will be automatically updated without the risk of breaking any dependencies.

The SQL refactoring works for the following types of objects:

  • Tables, temporary tables and columns
  • Views
  • Stored procedures and functions
  • Local variables and SQLCMD variables

Refactoring Example

The following screenshot demonstrates an example of how to rename the parameter @CheckDate into @Check_Date. This can be done directly from the Code Editor.

To rename the parameter:

1. Right-click the @CheckDate and select the Rename command from the shortcut menu. Alternatively you may select @CheckDate and press F2. The object being remaned will be highlighted

2. Modify the name as necessary – @Check_Date. As you type, a tooltip appears instructing to Press F2 to preview changes or Enter/Tab to apply

3. Press F2 to open the Preview Changes – Rename dialog window and preview changes throughout the code. All occurences of the renamed object are shown in the user-friendly preview window. Introduce changes by pressing Apply

4. Alternatively, press Enter/Tab to apply changes in the code without previewing

SQL-refactoring

 

Custom Alias Mapping

Sometimes alias names generated automatically may coincide with a keyword or be difficult to spell, and it would be nice to assign a more friendly name to a database object. SQL Complete gives you an opportunity to create your own custom aliases for various database objects including tables, views, table-valued functions, synonyms and others.

The following screenshot demonstrates the Alias window which is used to create custom aliases. The window contains the table with two columns to be filled with conditions and actions, and a number of condition masks for managing custom alias mapping. The condition masks allows you to specify various conditions for assigning aliases.

For example, you can:

  • Assign distinct aliases for same-named objects and vice versa
  • Specify a prefix to be ignored or added to an alias
  • Exclude a portion from a generated alias
  • Match any identifiers starting/ending/including a certain character set, and others

custom alias mapping

Paired Code Elements Highlighting

When you wright a code, SQL Complete helps you to visually define code blocks by highlighting both the opening and closing code elements, such as IFELSE, BEGINEND, BEGIN TRYEND TRY, etc. This way you can determine mismatched or misspelled paired code elements in your code. To highlight a pair, just place a caret at one of its elements.

paired code elements highlighting

UPDATE Statement Expansion

The UPDATE statement can now be expanded to a full code template. Simply press the Tab key and you will get:

  • A full template of the UPDATE statement
  • Column data type with NOT NULL and ROWGUID properties
  • A template for inserting time (for datetime data type)
  • A DEFAULT clause (if a default value is created for a table)

UPDATE statement expansion

 

New Code Snippets

SQL Complete offers a plenty of snippets for frequently used code fragments. The new version is enriched with BEGIN TRANSACTION and ROLLBACK TRANSACTION snippets.

With SQL Complete you can:

  • Insert snippets into the code you are typing by pressing Tab or Enter
  • Edit code templates in the Snippets Manager
  • Add parameters to a code template

SQL code snippets

 

Learn more about the reach functionality of dbForge SQL Complete from Devart at the product page.

Download the trial version of dbForge SQL Complete now and evaluate the benefits of the full featured Standard edition for free during a 30-day trial period.

RELATED ARTICLES

2 COMMENTS

  1. kuddos for doing a great job.
    I just want to clarify. Do these feature applicable for 4.8.43.1 release of sql complete?

  2. Hi

    This is an early preview of the upcoming functionality!
    All these features will be available in SQL Complete v 5.0. The new version will be released next week!

    You can subscribe to our newsletters to get the information about new releases!

    Thank you.

Comments are closed.

Whitepaper

Social

Topics

Products