| java.lang.Object org.h2.bnf.Bnf
Bnf | public class Bnf (Code) | | This class can read a file that is similar to BNF (Backus-Naur form).
It is made specially to support SQL grammar.
|
Constructor Summary | |
| Bnf() |
COMBINE_KEYWORDS | final static boolean COMBINE_KEYWORDS(Code) | | |
addFixedRule | void addFixedRule(String name, int fixedType)(Code) | | |
getInstance | public static Bnf getInstance(Reader csv) throws Exception(Code) | | Create an instance using the grammar specified in the CSV file.
Parameters: csv - if not specified, the help.csv is used a new instance |
getNextTokenList | public HashMap getNextTokenList(String query)(Code) | | Get the list of tokens that can follow.
This is the main autocomplete method.
The returned map for the query 'S' may look like this:
key: 1#SELECT, value: ELECT
key: 1#SET, value: ET
Parameters: query - the start of the statement the map of possible token types / tokens |
getStatements | public ArrayList getStatements()(Code) | | Get the list of possible statements.
the list of statements |
getSyntaxHtml | public String getSyntaxHtml(String rule, String syntax)(Code) | | Get the HTML documentation for a given syntax.
Parameters: rule - the rule (topic) Parameters: syntax - the BNF syntax the HTML formatted text |
linkStatements | public void linkStatements()(Code) | | Cross-link all statements with each other.
This method is called after updating the topics.
|
updateTopic | public void updateTopic(String topic, DbContextRule rule)(Code) | | Update a topic with a context specific rule.
This is used for autocomplete support.
Parameters: topic - the topic Parameters: rule - the database context rule |
|
|