|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.datasource.util.SqlParser
Parse a sql-92 select statement into its various clauses.
Field Summary | |
static int |
FROM
|
static int |
REST
|
static int |
SELECT
|
static int |
WHERE
|
Constructor Summary | |
SqlParser(String query)
Parse a sql 92 select statement into it component clauses: SELECT, FROM, WHERE, REST. |
Method Summary | |
String |
getClause(int clause)
Return indicated clause. |
String |
getClause(int clause,
boolean include_clause_word)
Return indicated clause. |
Vector |
getColumns()
Gets a list of SqlStatementColumn s |
Vector |
getColumnsForTable(String table)
Return a Vector of SqlStatementColumns for a table |
Vector |
getJoins()
Gets a list of ColumnMap s |
String |
getNonJoinWhereClause()
Gets text of non-join where clause |
Vector |
getParameterColumns()
Gets a list of parameter columns |
com.klg.jclass.datasource.util.SqlStatementColumn |
getSqlStatementColumn(String table,
String column)
Return the SqlStatementColumn object for this table column combination. |
com.klg.jclass.datasource.util.SqlStatementTable |
getSqlStatementTable(String table)
Given an unqualified table name, return the SqlStatementTable object |
Vector |
getTables()
Gets a list of SqlStatementTable s |
static boolean |
isColumn(String s)
A string is a column if it is not a number and it is not in quotes. |
static boolean |
isParameter(String s)
A string is a parameter if it contains a question mark "?" (without quotes). |
static com.klg.jclass.datasource.util.SqlStatementColumn |
parseColumn(String text)
Parse a string into a SqlStatementColumn . |
static com.klg.jclass.datasource.util.SqlStatementTable |
parseTable(String text)
Parse a string into a SqlStatementTable . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SELECT
public static final int FROM
public static final int WHERE
public static final int REST
Constructor Detail |
public SqlParser(String query)
Method Detail |
public String getClause(int clause)
clause
- an int one of SELECT, FROM, WHERE, REST.
public String getClause(int clause, boolean include_clause_word)
clause
- an int one of SELECT, FROM, WHERE, REST.include_clause_word
- indicates if the word "SELECT", "FROM" or "WHERE"
is included in the returned string.
public Vector getColumns()
SqlStatementColumn
s
public Vector getTables()
SqlStatementTable
s
public Vector getJoins()
ColumnMap
s
public Vector getParameterColumns()
public String getNonJoinWhereClause()
public static com.klg.jclass.datasource.util.SqlStatementTable parseTable(String text)
SqlStatementTable
.
public static com.klg.jclass.datasource.util.SqlStatementColumn parseColumn(String text)
SqlStatementColumn
.
public static boolean isColumn(String s)
public static boolean isParameter(String s)
public com.klg.jclass.datasource.util.SqlStatementTable getSqlStatementTable(String table)
public com.klg.jclass.datasource.util.SqlStatementColumn getSqlStatementColumn(String table, String column)
column
- a String, the unqualified column name
public Vector getColumnsForTable(String table)
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |