Re: WIP: SQL Formatter

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: WIP: SQL Formatter
Date: 2020-07-31 12:33:42
Message-ID: CA+OCxoyLSyMB6HF7ty085gngD2=GYXQkUffY4zJtGaDL2oZrkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

Currently, all the CodeMirrors in pgAdmin use the settings from the Query
> tool -> Editor, even though they're not related. I think you're right.
> We should move all CodeMirror settings out of the Query tool and move it to
> a new node - "SQL" may be. Editor and Auto-format would be sub nodes under
> SQL. With that, the editor settings will apply at all the places where
> CodeMirror editing is used(function body, query tool). What do you say ?
>

Turns out that's more work than I really have time for at the moment,
because it means making the editors be able to handle automatic reloads of
multiple preference sections. We can always think about moving the
formatting preferences into their own section later.

In the meantime, this update to the patch does what was originally
suggested and puts the options into a Query Tool -> SQL Formatting section.

Comments? Obviously docs will need updating too, once we're all happy with
the basics.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

Attachment Content-Type Size
SQL_Formatting_v2.diff application/octet-stream 11.1 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Yogesh Mahajan 2020-08-03 05:09:52 [pgAdmin4][Patch] - SonarQube Issues - 12 (String literals should not be duplicated)
Previous Message Satish V 2020-07-31 10:19:16 [pgAdmin 4 - Housekeeping #5327][Code Coverage] Improve API test cases for Schemas and Catalog Objects