Class SQLFormatter
Format a SQL Query for better readable output in HTML or Plaintext. Its a simple string parser, not a full tokenizer - so formatting is not aware of the SQL syntax. This means we have to be conservative with modifying the SQL string.
- Object
-
SQLFormatter
Author: Ingo Schommer, Silverstripe Ltd. (<firstname>@silverstripe.com)
Located at sapphire/parsers/SQLFormatter.php
Methods summary
public
|
|
public
|
|
protected
|
#
addNewlines( mixed $sql, mixed $useHtmlFormatting = false )
Newlines for tokens defined in $newline_before_tokens. Case-sensitive, only applies to uppercase SQL to avoid messing with possible content fragments in the query. |
Methods inherited from Object
__call(),
__construct(),
__toString(),
__wakeup(),
addMethodsFrom(),
addStaticVars(),
addWrapperMethod(),
add_extension(),
add_static_var(),
allMethodNames(),
cacheToFile(),
cacheToFileWithArgs(),
clearCache(),
combined_static(),
create(),
createMethod(),
create_from_string(),
defineMethods(),
exists(),
extInstance(),
extend(),
getCustomClass(),
getExtensionInstance(),
getExtensionInstances(),
get_extensions(),
get_static(),
hasExtension(),
hasMethod(),
has_extension(),
invokeWithExtensions(),
is_a(),
loadCache(),
parentClass(),
parse_class_spec(),
remove_extension(),
sanitiseCachename(),
saveCache(),
set_stat(),
set_static(),
set_uninherited(),
stat(),
strong_create(),
uninherited(),
uninherited_static(),
useCustomClass()
Magic methods summary
Properties summary
protected static
array
|
$newline_before_tokens |