AutoClose & AutoEnclose

Previous  Index  Next  How To Use

AutoClose and AutoEnclose can be turned ON and OFF on a per character basis. See the Preferences for this.

 

AutoClose

With the AutoClose feature, you can avoid having to enter "closing" characters. For example, in MS SQL, when you write "[", Database Workbench will automatically add the "]" character.

 

AutoClose is activated for the following characters:

' -> '

" -> "

( -> )

[ -> ]

` -> `

 

AutoEnclose

This feature is similar to the AutoClose feature, whenever you have a piece of text selected in the editor and you enter one of the AutoEnclose characters, Database Workbench will add the opening and closing character around the piece of selected text. In the case of the quote character, it will also double any single quotes in the selected text.

 

For example, when selecting this text:

O'Hara

 

And pressing the ' character, it will end up as:

'O''Hara'

 

Making it a valid SQL string.

 

This feature can be useful when modifying strings, copy/pasting strings from data into any editor and enclosing pieces of text in, for example, parenthesis.