[MXS-4017] Query Editor Auto completion for all identifier names of the active schema Created: 2022-02-22  Updated: 2023-12-12  Resolved: 2023-11-02

Status: Closed
Project: MariaDB MaxScale
Component/s: maxgui
Affects Version/s: None
Fix Version/s: 24.02.0

Type: New Feature Priority: Major
Reporter: Naresh Chandra Assignee: Duong Thien Ly
Resolution: Fixed Votes: 0
Labels: None

Attachments: PNG File screenshot-1.png    
Issue Links:
Blocks
is blocked by MXS-4829 Query Editor doesn't assign active da... Closed
Duplicate
is duplicated by MXS-4057 Query Editor Auto Intelligence Closed
Sprint: MXS-SPRINT-193

 Description   

If we mention any table in the select or any query, then the table columns should be automatically display if we start writing on the query editor.

EX:
select * from table;
Column Names: name, address, id

so I want to select specific columns then if I try to do select na [na -->name column should show using auto intelligence] then it should automatically show the matching column names for the table.

select name, id from table; – the columns name, id should come automatically when we start with the column names.



 Comments   
Comment by Duong Thien Ly [ 2023-10-23 ]

naresh.chandra@copart.com Hi, I closed MXS-4057 as it essentially serves the same purpose.
What do you think about this, as you already suggested:
When a schema is active (selected), all identifier names of that schema will be queried and added to the completion item list. So when you partially type the name of an identifier name, the auto-completion items matching that name will show up.

Detecting the identifier names for the schema or table being joined is not trivial as we would need to parse the query and detect the JOIN or UNION clause to get the identifier name. I'll move that requirement into a separate feature ticket so we can at least have the auto-completion worked for all identifier names of the active schema in 24.02.0

Comment by Naresh Chandra [ 2023-10-23 ]

Thanks Duong.

Comment by Naresh Chandra [ 2023-12-12 ]

Hi Duong,

I'll move that requirement into a separate feature ticket so we can at least have the auto-completion worked for all identifier names of the active schema in 24.02.0 --> Did we create any separate ticket for the auto completion?

Comment by Duong Thien Ly [ 2023-12-12 ]

HI naresh.chandra@copart.com, sorry I completely forgot about it.
For auto completion of non-active schemas, it's pretty complex as it deals with parsing the query and requires heavy implementation on MaxScale backend side.
Do we really need a comprehensive auto-completion for non-active schemas?

Comment by Naresh Chandra [ 2023-12-12 ]

Duong,

We don't need for active schemas but at least we need if select schema instead of expanding the tables tree and all. Whenever we select schema then automatically auto intelligence should work all the objects resides the schema selected.

Comment by Duong Thien Ly [ 2023-12-12 ]

Ah, okay that's actually have been done in this ticket. What I mean "active schema" here is when you send "use mysql" or double-clicking on the mysql node, all of its identifiers will be retrieved, so auto-completion for that active schema will work.

Comment by Naresh Chandra [ 2023-12-12 ]

Duong,

Thanks for the fix. But we don't need to expand tables tree, right?

Comment by Duong Thien Ly [ 2023-12-12 ]

Yes, you don't have to.
By default, this feature is turned on, so you don't have to do anything. To turn it off, open the "Query configuration" dialog and uncheck the "Active schema identifier auto-completion" checkbox.

Comment by Naresh Chandra [ 2023-12-12 ]

Thanks Duong, this is what we are expecting for the active schema.
Thanks for the fix.

Generated at Thu Feb 08 04:25:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.