| java.lang.Object org.apache.openjpa.lib.jdbc.SQLFormatter
SQLFormatter | public class SQLFormatter (Code) | | Converts single-line SQL strings into nicely-formatted
multi-line, indented statements.
Example: from PERSON t0, COMPANY t1 WHERE t0.ID = 10 AND \
t0.COMPANY_ID = t1.ID AND t1.NAME = 'OpenJPA' becomes
SELECT * FROM PERSON t0, COMPANY t1
WHERE t0.ID = 10 AND t0.COMPANY_ID = t1.ID AND t1.NAME = 'OpenJPA'\
and
INSERT INTO PERSON VALUES('Patrick', 'Linskey', 'OpenJPA', \
'202 595 2064 x1111') becomes
INSERT INTO PERSON VALUES('Patrick', 'Linskey', 'OpenJPA', '202
595 2064 x1111') etc.
author: Patrick Linskey |
getDoubleSpace | public boolean getDoubleSpace()(Code) | | If true, then output two lines after multi-line statements.
|
getLineLength | public int getLineLength()(Code) | | |
getMultiLine | public boolean getMultiLine()(Code) | | If true, then try to parse multi-line SQL statements.
|
setClauseIndent | public void setClauseIndent(String val)(Code) | | |
setDoubleSpace | public void setDoubleSpace(boolean doubleSpace)(Code) | | If true, then output two lines after multi-line statements.
|
setLineLength | public void setLineLength(int val)(Code) | | |
setMultiLine | public void setMultiLine(boolean multiLine)(Code) | | If true, then try to parse multi-line SQL statements.
|
|
|