JSQLFormatter 4.7.0-SNAPSHOT API¶
Base Package: com.manticore.jsqlformatter
Base¶
JSQLFormatter.BackSlashQuoting¶
[YES, NO]
JSQLFormatter.BreakLine¶
[NEVER, AS_NEEDED, AFTER_FIRST, ALWAYS]
JSQLFormatter.FormattingOption¶
[SQUARE_BRACKET_QUOTATION, BACKSLASH_QUOTING, OUTPUT_FORMAT, KEYWORD_SPELLING, FUNCTION_SPELLING, OBJECT_SPELLING, SEPARATION, INDENT_WIDTH, SHOW_LINE_NUMBERS]
JSQLFormatter.OutputFormat¶
[PLAIN, ANSI, HTML, RTF, XSLFO]
JSQLFormatter.Separation¶
[BEFORE, AFTER]
JSQLFormatter.ShowLineNumbers¶
[YES, NO]
JSQLFormatter.Spelling¶
[UPPER, LOWER, CAMEL, KEEP]
JSQLFormatter.SquaredBracketQuotation¶
[AUTO, YES, NO]
Comment¶
extends: Object implements: Comparable
Comment (absolutePosition, text)
int absolutePosition
String text
@Override
toString () → String
returns String
CommentMap¶
extends: LinkedHashMap
CommentMap (sqlStr)
String sqlStr
insertComments (sqlStrWithoutComments, outputFormat) → StringBuilder
StringBuilder sqlStrWithoutComments
OutputFormat outputFormat
returns StringBuilder
getLength () → int
returns int
FragmentContentHandler¶
extends: DefaultHandler
FragmentContentHandler (xmlReader, builder)
XMLReader xmlReader
StringBuilder builder
@Override
startElement (uri, localName, qName, atts)
String uri
String localName
String qName
Attributes atts
@Override
endElement (uri, localName, qName)
String uri
String localName
String qName
@Override
characters (ch, start, length)
char ch
int start
int length
getXPath (xml, object) → String
String xml
Object object
returns String
JSQLFormatter¶
extends: Object
A powerful Java SQL Formatter based on the JSQLParser.
JSQLFormatter ()
getSquaredBracketQuotation () → SquaredBracketQuotation
returns SquaredBracketQuotation
setSquaredBracketQuotation (squaredBracketQuotation)
SquaredBracketQuotation squaredBracketQuotation
getBackSlashQuoting () → BackSlashQuoting
returns BackSlashQuoting
setBackSlashQuoting (backSlashQuoting)
BackSlashQuoting backSlashQuoting
getSeparation () → Separation
returns Separation
setSeparation (separation)
Separation separation
getKeywordSpelling () → Spelling
returns Spelling
setKeywordSpelling (keywordSpelling)
Spelling keywordSpelling
getFunctionSpelling () → Spelling
returns Spelling
setFunctionSpelling (functionSpelling)
Spelling functionSpelling
getObjectSpelling () → Spelling
returns Spelling
setObjectSpelling (objectSpelling)
Spelling objectSpelling
getOutputFormat () → OutputFormat
returns OutputFormat
setOutputFormat (outputFormat)
OutputFormat outputFormat
getIndentWidth () → int
returns int
setIndentWidth (indentWidth)
int indentWidth
getIndentString () → String
returns String
setIndentString (indentString)
String indentString
getAbsoluteFile (filename) → File
String filename
returns File
getAbsoluteFileName (filename) → String
String filename
returns String
main (args)
String args | args The Command Line Parameters.
@CEntryPoint
format (thread, sql, options) → CCharPointer
Format a list of SQL Statements.
SELECT, INSERT, UPDATE and MERGE statements are supported.
IsolateThread thread | thread The
CCharPointer sql | sql The SQL Statements to beautify.
CCharPointer options | options The Formatting Options (List of “key = value” pairs).
returns CCharPointer | The beautifully formatted SQL Statements, semi-colon separated.
verify (sqlStr, options) → ArrayList
String sqlStr
String options
returns ArrayList
format (sqlStr, options) → String
String sqlStr
String options
returns String
formatToJava (sqlStr, indent, options) → StringBuilder
String sqlStr
int indent
String options
returns StringBuilder
getAstNodes (sqlStr, options) → ArrayList
String sqlStr
String options
returns ArrayList
translateNode (node) → SimpleTreeNode
TreeNode node
returns SimpleTreeNode
encodeObject (object) → String
Object object
returns String
formatToTree (sqlStr, options) → String
String sqlStr
String options
returns String
formatToXML (sqlStr, options) → String
String sqlStr
String options
returns String
extract (sql, clazz, xpath) → Collection
String sql
Class clazz
String xpath
returns Collection
applyFormattingOptions (options)
String options
appendMergeUpdate (update, builder, indent, i)
MergeUpdate update
StringBuilder builder
int indent
int i
appendMergeInsert (insert, builder, indent, i)
MergeInsert insert
StringBuilder builder
int indent
int i
appendSelectItemList (selectItems, builder, subIndent, i, bl, indent)
List selectItems
StringBuilder builder
int subIndent
int i
BreakLine bl
int indent
JSQLFormatter.JavaObjectNode¶
extends: Object implements: TreeNode
JavaObjectNode (parent, fieldName, object)
TreeNode parent
String fieldName
Object object
@Override
getChildAt (childIndex) → TreeNode
int childIndex
returns TreeNode
@Override
getChildCount () → int
returns int
@Override
getParent () → TreeNode
returns TreeNode
@Override
getIndex (node) → int
TreeNode node
returns int
@Override
getAllowsChildren () → boolean
returns boolean
@Override
isLeaf () → boolean
returns boolean
@Override
children () → Enumeration
returns Enumeration
@Override
toString () → String
returns String
JavaTools¶
extends: Object
A powerful Java SQL Formatter based on the JSQLParser.
JavaTools ()
main (args)
String args
formatJava (javaCode, options) → String
String javaCode
String options
returns String
toJavaString (sql) → String
String sql
returns String
toJavaStringBuilder (sql) → String
String sql
returns String
toJavaMessageFormat (sql) → String
String sql
returns String
RRTools¶
extends: Object
RRTools ()
main (args)
String args
insertTOC (file)
File file
extractSVG (file)
File file