Unplanned
Last Updated: 02 Oct 2025 12:01 by Systeem
Troy
Created on: 06 Feb 2020 21:43
Category: SyntaxEditor
Type: Feature Request
3
SyntaxEditor: SqlTagger Improvements

I do have some feedback on this component. I love it, but of course there are some areas where improvement can be made. For instance, in the screenshot below, I have highlighted some words where improvement can be made.

  1. ‘1,2,3,5’ – Literals in SSMS are Red
  2. ‘ER – 100% OF MEDICARE’ – OF is highlighted in Blue. It is contained in a literal and shouldn’t be highlighted
  3. ISNULL – Is a function and should be highlighted in Blue
---- - It looks like that the tagger is only looking for 2 – only. If there are more than 2 in sequence, it doesn’t identify it as a comment and should
Attached Files:
2 comments
Systeem
Posted on: 02 Oct 2025 12:01

I am also interested in an improved version of the SqlTagger. Here is the test SQL I used to check the highlighter:

-- single-line comment
--- triple-dash comment
/* block comment start
/* nested block comment */
*/
CREATE TEMP TABLE "Group_Stats"(id SERIAL PRIMARY KEY,group_id INT,"SELECTED" BOOLEAN,data JSONB,note TEXT);
INSERT INTO "Group_Stats"(group_id, "SELECTED", data, note) VALUES
(1, true,  '{"a":1,"b":[1,2]}'::jsonb, E'Line1\nQuote: 'single''),
(2, false, $Dollar: contains "double" and 'single'$)
RETURNING id, note;

WITH nums AS (SELECT generate_series(1,3) AS n)
SELECT g.id,g.group_id AS GROUP_ID,          -- alias that looks like a keyword
g."SELECTED",
unnest(ARRAY[1,2,3]) AS u,
COUNT(*) OVER (PARTITION BY g.group_id) AS cnt
FROM "Group_Stats" g JOIN LATERAL (SELECT 1) l ON true
WHERE g.note IS NOT NULL GROUP BY g.id, g.group_id, g."SELECTED" ORDER BY cnt DESC
LIMIT 5;
DO $do$
BEGIN
RAISE NOTICE 'DO block with ''embedded'' quotes and $dollar$';
END
$do$;
EXPLAIN SELECT * FROM "Group_Stats" WHERE note LIKE '%Quote%';
COMMENT ON COLUMN "Group_Stats".note IS 'Contains -- dashes and ''quotes''';
SELECT data @> '{"a":1}'::jsonb AS has_a FROM "Group_Stats" LIMIT 1;
SELECT DISTINCT ON (group_id) id, note COLLATE "C" FROM "Group_Stats" ORDER BY group_id, id DESC;
SELECT 1 INTERSECT SELECT 1 EXCEPT SELECT 2;
SELECT ('123'::int + $1::int) AS sum_with_param LIMIT 1;

 



 

 

ADMIN
Dilyan Traykov
Posted on: 13 Feb 2020 14:00

Hello Troy,

Thank you very much for your feedback.

We will consider applying these improvements in future releases. Please follow the item to get notified about any changes in its status.

I've awarded you with some Telerik points for bringing this to our attention. Do let us know if you find any other areas which need improvement.

Regards,
Dilyan Traykov
Progress Telerik

Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.