A query context object. It contains the list of table and alias objects.
Used for autocomplete.
| Methods |
| void |
add(String n, String string, int type)
Add a word to the set of next tokens.
|
| void |
add(String n, String string, int type)
Add a word to the set of next tokens.
Parameters:
n - the token name
string - an example text
type - the token type
|
| void |
addAlias(String alias, DbTableOrView table)
Add an alias name and object
|
| void |
addAlias(String alias, DbTableOrView table)
Add an alias name and object
Parameters:
alias - the alias name
table - the alias table
|
| void |
addTable(DbTableOrView table)
Add a table.
|
| void |
addTable(DbTableOrView table)
Add a table.
Parameters:
table - the table
|
| HashMap |
getAliases()
Get the alias map.
|
| HashMap |
getAliases()
Get the alias map.
Returns:
the alias map
|
| DbSchema |
getLastMatchedSchema()
Get the last matched schema if the last match was a schema.
|
| DbSchema |
getLastMatchedSchema()
Get the last matched schema if the last match was a schema.
Returns:
the last schema or null
|
| DbTableOrView |
getLastMatchedTable()
Get the last matched table if the last match was a table.
|
| DbTableOrView |
getLastMatchedTable()
Get the last matched table if the last match was a table.
Returns:
the last table or null
|
| DbTableOrView |
getLastTable()
Get the last added table.
|
| DbTableOrView |
getLastTable()
Get the last added table.
Returns:
the last table
|
| HashMap |
getNext()
Get the map of next tokens.
|
| HashMap |
getNext()
Get the map of next tokens.
Returns:
the next token map
|
| String |
getQuery()
Get the query string.
|
| String |
getQuery()
Get the query string.
Returns:
the query
|
| String |
getQueryUpper()
Get the uppercase version of the query string.
|
| String |
getQueryUpper()
Get the uppercase version of the query string.
Returns:
the uppercase query
|
| HashSet |
getTables()
Get the set of tables.
|
| HashSet |
getTables()
Get the set of tables.
Returns:
the set of tables
|
| void |
setLastMatchedSchema(DbSchema schema)
Set the last matched schema if the last match was a schema,
or null if it was not.
|
| void |
setLastMatchedSchema(DbSchema schema)
Set the last matched schema if the last match was a schema,
or null if it was not.
Parameters:
schema - the last matched schema or null
|
| void |
setLastMatchedTable(DbTableOrView table)
Set the last matched table if the last match was a table.
|
| void |
setLastMatchedTable(DbTableOrView table)
Set the last matched table if the last match was a table.
Parameters:
table - the last matched table or null
|
| void |
setQuery(String query)
Set the query string.
|
| void |
setQuery(String query)
Set the query string.
Parameters:
query - the query string
|
| void |
start()
Start the timer to make sure processing doesn't take too long.
|
| void |
start()
Start the timer to make sure processing doesn't take too long.
|
| void |
stopIfRequired()
Check if it's time to stop processing.
|
| void |
stopIfRequired()
Check if it's time to stop processing.
Processing auto-complete shouldn't take more than a few milliseconds.
If processing is stopped, this methods throws an IllegalStateException
|
This token type means the possible choices of the item depend on the
context. For example the item represents a table name of the current
database.
The token type for a keyword.
The token type for a function name.