Why is that so? Let’s look at the code style to answer this question. However, the result differs between the tools, although the configuration is based on the same code style. Once formatted with spaces between the tokens and once with line breaks between the tokens.Īll tools produced the same result for both variants of the statement. ![]() This makes a complete formatter a heavyweight. There is no room for individuality unless it is part of a rule and its configuration. Therefore, a formatter comes with a large set of rules and options to override the default (single space between tokens).Ī key feature of a heavyweight formatter is that it produces the same result regardless of how the original code was formatted. As a consequence, a single space is not the desired result in many cases. The grammars for SQL*Plus, PL/SQL and SQL are huge. ![]() As a result the original whitespace between the tokens is lost. A whitespace consists of a series of spaces, tabs and line breaks. Heavyweight FormatterĪ typical PL/SQL & SQL formatter replaces whitespace between lexical tokens by default with a single space. A compromise between conformity and individuality. Are you using Oracle’s SQL Developer or SQLcl? Then install these settings and press Ctrl-F7 to produce code that conforms to the Trivadis PL/SQL & SQL Coding Style.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |