All Packages Class Hierarchy This Package Previous Next Index
Class Zql.ZqlParser
java.lang.Object
|
+----Zql.ZqlParser
- public class ZqlParser
- extends Object
ZqlParser: an SQL parser
-
ZqlParser()
- Create a new parser: before use, call initParser(InputStream) to
specify an input stream for the parsing.
-
ZqlParser(InputStream)
- Create a new parser to parse SQL statements from a given input stream.
-
initParser(InputStream)
- Initialize (or re-initialize) the input stream for the parser.
-
main(String[])
- Test program:
Parses SQL statements from stdin or from a text file.
If the program receives one argument, it is an SQL text file name;
if there's no argument, the program reads from stdin.
-
readExpression()
- Parse an SQL Expression (like the WHERE clause of an SQL query).
-
readStatement()
- Parse an SQL Statement from the parser's input stream.
-
readStatements()
- Parse a set of SQL Statements from the parser's input stream (all the
available statements are parsed and returned).
ZqlParser
public ZqlParser(InputStream in)
- Create a new parser to parse SQL statements from a given input stream.
- Parameters:
- in - The InputStream from which SQL statements will be read.
ZqlParser
public ZqlParser()
- Create a new parser: before use, call initParser(InputStream) to
specify an input stream for the parsing.
main
public static void main(String args[]) throws ParseException
- Test program:
Parses SQL statements from stdin or from a text file.
If the program receives one argument, it is an SQL text file name;
if there's no argument, the program reads from stdin.
initParser
public void initParser(InputStream in)
- Initialize (or re-initialize) the input stream for the parser.
readStatement
public ZStatement readStatement() throws ParseException
- Parse an SQL Statement from the parser's input stream.
- Returns:
- An SQL statement, or null if there's no more statement.
readStatements
public Vector readStatements() throws ParseException
- Parse a set of SQL Statements from the parser's input stream (all the
available statements are parsed and returned).
- Returns:
- A vector of ZStatement objects (SQL statements).
readExpression
public ZExp readExpression() throws ParseException
- Parse an SQL Expression (like the WHERE clause of an SQL query).
- Returns:
- An SQL expression.
All Packages Class Hierarchy This Package Previous Next Index