| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static void | doAppendEscapedIdentifier(Appendable
Either StringBuffer or StringBuilder as we do not expect any IOException to be
thrown. sbuf, String value to append value)Common part for appendEscapedIdentifier. |
| private static void | doAppendEscapedLiteral(Appendable
Either StringBuffer or StringBuilder as we do not expect any IOException to be
thrown sbuf, String value to append value, boolean if standard conforming strings should be used standardConformingStrings)Common part for |
| public static StringBuilder | Returns: the sbuf argument; or a new string builder for sbuf == nullthe string builder to append to; or sbuf, String nullthe string value value)Escape the given identifier |
| public static StringBuilder | Returns: the sbuf argument; or a new string builder for sbuf == nullthe string builder to append to; or sbuf, String nullthe string value value, boolean if standard conforming strings should be used standardConformingStrings)Escape the given literal |
| public static int | Returns: server version in number formserver version in a XXYYZZ form serverVersion)
Deprecated
use specific
Version instance
Attempt to parse the server version string into an XXYYZZ form version number. |
| public static String | Returns: a hex-encoded printable representation ofdatathe bytearray to stringize data)Turn a bytearray into a printable form, representing each byte in hex. |
| Utils | back to summary |
|---|---|
| public Utils() | |
| doAppendEscapedIdentifier | back to summary |
|---|---|
| private static void doAppendEscapedIdentifier(Appendable sbuf, String value) throws SQLException Common part for appendEscapedIdentifier.
| |
| doAppendEscapedLiteral | back to summary |
|---|---|
| private static void doAppendEscapedLiteral(Appendable sbuf, String value, boolean standardConformingStrings) throws SQLException Common part for
| |
| escapeIdentifier | back to summary |
|---|---|
| public static StringBuilder escapeIdentifier(@Nullable StringBuilder sbuf, String value) throws SQLException Escape the given identifier
| |
| escapeLiteral | back to summary |
|---|---|
| public static StringBuilder escapeLiteral(@Nullable StringBuilder sbuf, String value, boolean standardConformingStrings) throws SQLException Escape the given literal
| |
| parseServerVersionStr | back to summary |
|---|---|
| public static int parseServerVersionStr(@Nullable String serverVersion) throws NumberFormatException
Deprecated use specific Attempt to parse the server version string into an XXYYZZ form version number. Returns 0 if the version could not be parsed. Returns minor version 0 if the minor version could not be determined, e.g. devel or beta releases. If a single major part like 90400 is passed, it's assumed to be a pre-parsed version and returned verbatim. (Anything equal to or greater than 10000 is presumed to be this form). The yy or zz version parts may be larger than 99. A NumberFormatException is thrown if a version part is out of range.
| |
| toHexString | back to summary |
|---|---|
| public static String toHexString(byte[] data) Turn a bytearray into a printable form, representing each byte in hex.
| |