java - what's the class Hibernate uses internally to format SQL output? -
we know sql output formatting can enabled set attribute true in xml configuration file when using hibernate. , want know name of class or classes hibernate uses internally.
it because working on old project, developers hard-coded sql statements dao classes , crammed complicated ones few lines, makes them hard read , understand.
i can extract original sqls stringbuffer
or plain string concatenation structures, still need format them me. can of low accuracy, @ least can recognize key words select, from, join, union
etc.
the interface org.hibernate.jdbc.util.formatter
implemented classes
org.hibernate.jdbc.util.basicformatterimpl
,org.hibernate.jdbc.util.ddlformatterimpl
(at least in versions 3.3.0 through 4.3.6).
Comments
Post a Comment