Child pages
  • Auto-complete of tables and columns in "Query Database" section [5.3.0-B1]
Skip to end of metadata
Go to start of metadata

In the  INP-1174 - Getting issue details... STATUS  the task the CodeMirror (see editor was added to "Tools > Query Database" section. This allowed to have syntax highlighting and line numbering to enhance use experience.

To make user experience even better proposing to enable auto-complete of tables and their column names.


  1. create "adm:CodeMirrorDatabaseHintOptions", that, that will:
    1. store results in memcache for 1 hour
    2. get database tables matching used TablePrefix
    3. get column names of these tables
    4. build up a JSON-encoded array from that data
    5. return it
  2. on the "tools/sql_query" template add "hintOptions" to CodeMirror options, that's content would look like: {tables: <inp2:adm:CodeMirrorDatabaseHintOptions/>}


Copied from page source:

hintOptions: {
	tables: {
		users: {name: null, score: null, birthDate: null},
		countries: {name: null, population: null, size: null}

Related Discussions

Related Tasks