net.sf.saffron.sql
Class SqlWriter
java.lang.Object
|
+--net.sf.saffron.sql.SqlWriter
- public class SqlWriter
- extends Object
A SqlWriter
is the target to construct a SQL statement from a
parse tree. It deals with dialect differences; for example, Oracle quotes
identifiers as "scott"
, while SQL Server quotes them as
[scott]
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
alwaysUseParentheses
static final boolean alwaysUseParentheses
- See Also:
- Constant Field Values
dialect
public final SqlDialect dialect
query
SqlSelect query
queryStack
Stack queryStack
pw
private PrintWriter pw
SqlWriter
public SqlWriter(SqlDialect dialect,
PrintWriter pw)
popQuery
public void popQuery(SqlSelect query)
pushQuery
public void pushQuery(SqlSelect query)
print
public void print(String s)
print
public void print(char x)
print
public void print(int x)
printIdentifier
public void printIdentifier(String name)
println
public void println()
getQuery
public SqlSelect getQuery()