| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final char[] | |
| private static final char[] | |
| private static final String | |
| private static final int | |
| private static final int | |
| private static final int | |
| pack-priv static final char | |
| pack-priv static final char | |
| pack-priv static final char |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static void | |
| public static boolean | canHandleAsServerPreparedStatementNoCache(String sql, ServerVersion serverVersion, boolean allowMultiQueries, boolean noBackslashEscapes, boolean useAnsiQuotes)
|
| public static String | Returns: a hex and ASCII dumpthe data to dump as hex byteBuffer, int the number of bytes to print length)Returns the given bytes as a hex and ASCII dump (up to length bytes). |
| private static boolean | |
| public static boolean | Returns: whether searchIn ends with searchFor, ignoring casethe string to search in searchIn, String the string to search for searchFor)Determines whether or not the string 'searchIn' ends with the string 'searchFor', dis-regarding case starting at 'startAt' Shorthand for a String.regionMatch(...) |
| public static void | |
| public static String | |
| public static StringBuilder | escapeString(StringBuilder buf, String x, boolean useAnsiQuotedIdentifiers, CharsetEncoder charsetEncoder)
|
| public static char | |
| public static char | Returns: the first non-whitespace character, upper cased.the string to search in searchIn)Returns the first non-whitespace char, converted to upper case |
| public static char | |
| public static String | Returns: String the string with a '+' added (if needed)The value as a string dString)Adds '+' to decimal numbers that are positive (MySQL doesn't understand them otherwise |
| public static byte[] | |
| public static byte[] | Returns: byteschars value)Returns the byte[] representation of subset of the given char[] using the default/platform encoding. |
| public static byte[] | |
| public static byte[] | |
| public static byte[] | |
| public static byte[] | |
| public static byte[] | |
| public static byte[] | |
| public static byte[] | |
| public static byte[] | Returns: bytessource string s, char opening char delimiter beginWrap, char closing char delimiter endWrap, String java encoding encoding)Returns the byte[] representation of the given string properly wrapped between the given char delimiters using the given encoding. |
| public static String | Returns: fully qualified namedatabase name db, String identifier entity, String quote character as defined on server quoteId, boolean are we in pedantic mode isPedantic)Builds and returns a fully qualified name, quoted if necessary, for the given database entity. |
| public static String | |
| public static boolean | Returns: true if src contains wildcard symbolsstring src)Does the string contain wildcard symbols ('%' or '_'). |
| public static final void | hexEscapeBlock(byte[]
source bytes buf, int number of bytes to read size, BiConsumer<Byte, Byte> consumer for low and high bits of each byte bc)Used to escape binary data with hex |
| public static int | |
| public static int | Returns: the position wheresearchFor is found within searchIn starting from startingPosition.the string to search in searchIn, String the array of strings to search for searchFor)Finds the position of a substring within a string ignoring case. |
| public static int | Returns: the position wheresearchFor is found within searchIn starting from startingPosition.the position to start the search from startingPosition, String the string to search in searchIn, String the array of strings to search for searchFor)Finds the position of a substring within a string ignoring case. |
| public static int | Returns: the position wheresearchFor is found within searchIn starting from startingPosition.the position to start the search from startingPosition, String the string to search in searchIn, String[] searchForSequence searchForSequence, String characters that delimit the beginning of a text block to skip openingMarkers, String characters that delimit the end of a text block to skip closingMarkers, Set<SearchMode> a searchMode)Set, ideally an EnumSet, containing the flags from the enum StringUtils.SearchMode that determine the
behavior of the searchFinds the position of the first of a consecutive sequence of strings within a string, ignoring case, with the option to skip text delimited by given markers or within comments. |
| public static int | Returns: the position wheresearchFor is found within searchIn starting from startingPosition.the position to start the search from startingPosition, String the string to search in searchIn, String the string to search for searchFor, String characters that delimit the beginning of a text block to skip openingMarkers, String characters that delimit the end of a text block to skip closingMarkers, Set<SearchMode> a searchMode)Set, ideally an EnumSet, containing the flags from the enum StringUtils.SearchMode that determine the
behavior of the searchFinds the position of a substring within a string, ignoring case, with the option to skip text delimited by given markers or within comments. |
| public static int | Returns: the position wheresearchFor is found within searchIn starting from startingPosition.the position to start the search from startingPosition, String the string to search in searchIn, String the string to search for searchFor, String characters that delimit the beginning of a text block to skip openingMarkers, String characters that delimit the end of a text block to skip closingMarkers, String the subset of overridingMarkers, Set<SearchMode> openingMarkers that override the remaining markers, e.g., if openingMarkers = "'(" and
overridingMarkers = "'" then the block between the outer parenthesis in "start ('max('); end" is strictly consumed,
otherwise the suffix " end" would end up being consumed too in the process of handling the nested parenthesis.a searchMode)Set, ideally an EnumSet, containing the flags from the enum StringUtils.SearchMode that determine the
behavior of the searchFinds the position of a substring within a string, ignoring case, with the option to skip text delimited by given markers or within comments. |
| public static int | Returns: the position where the next non-whitespace character is found withinsearchIn starting from startingPosition.the position to start the search from startingPosition, String the string to search in searchIn, String characters that delimit the beginning of a text block to skip openingMarkers, String characters that delimit the end of a text block to skip closingMarkers, String the subset of overridingMarkers, Set<SearchMode> openingMarkers that override the remaining markers, e.g., if openingMarkers = "'(" and
overridingMarkers = "'" then the block between the outer parenthesis in "start ('max('); end" is strictly consumed,
otherwise the suffix " end" would end up being consumed too in the process of handling the nested parenthesis.a searchMode)Set, ideally an EnumSet, containing the flags from the enum StringUtils.SearchMode that determine the
behavior of the searchFinds the position of the next alphanumeric character within a string, with the option to skip text delimited by given markers or within comments. |
| public static int | Returns: the position where the next non-whitespace character is found withinsearchIn starting from startingPosition.the position to start the search from startingPosition, String the string to search in searchIn, String characters that delimit the beginning of a text block to skip openingMarkers, String characters that delimit the end of a text block to skip closingMarkers, String the subset of overridingMarkers, Set<SearchMode> openingMarkers that override the remaining markers, e.g., if openingMarkers = "'(" and
overridingMarkers = "'" then the block between the outer parenthesis in "start ('max('); end" is strictly consumed,
otherwise the suffix " end" would end up being consumed too in the process of handling the nested parenthesis.a searchMode)Set, ideally an EnumSet, containing the flags from the enum StringUtils.SearchMode that determine the
behavior of the searchFinds the position of the next non-whitespace character within a string, with the option to skip text delimited by given markers or within comments. |
| public static int | Returns: the position where the next whitespace character is found withinsearchIn starting from startingPosition.the position to start the search from startingPosition, String the string to search in searchIn, String characters that delimit the beginning of a text block to skip openingMarkers, String characters that delimit the end of a text block to skip closingMarkers, String the subset of overridingMarkers, Set<SearchMode> openingMarkers that override the remaining markers, e.g., if openingMarkers = "'(" and
overridingMarkers = "'" then the block between the outer parenthesis in "start ('max('); end" is strictly consumed,
otherwise the suffix " end" would end up being consumed too in the process of handling the nested parenthesis.a searchMode)Set, ideally an EnumSet, containing the flags from the enum StringUtils.SearchMode that determine the
behavior of the searchFinds the position of the next whitespace character within a string, with the option to skip text delimited by given markers or within comments. |
| public static int | |
| private static boolean | isCharAtPosNotEqualIgnoreCase(String searchIn, int pos, char firstCharOfSearchForUc, char firstCharOfSearchForLc)
|
| protected static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | Returns: true if the CharSequence not empty and contains only digits, false otherwise.The CharSequence to check. cs)Checks is the CharSequence contains digits only. |
| public static final boolean | |
| public static String | Returns: the String with all elements, joined by commas and "and".the elements to join elements)Joins all elements of the given list using serial comma (Oxford comma) rules. |
| public static int | |
| public static boolean | Returns: true if both strings are null or have the same valuefirst string to compare str1, String fecond string to compare str2)Two given strings are considered equal if both are null or if they have the same string value. |
| public static String | |
| public static byte[] | |
| public static String | Returns: With quoteChar="`":
in pedantic mode (connection property pedantic=true) identifier is treated as unquoted
(as it is stored in the database) even if it starts and ends with quoteChar;
in non-pedantic mode if identifier starts and ends with quoteChar method treats it as already quoted and doesn't modify. identifier, String ` or " quoteChar, boolean operating in pedantic mode? isPedantic)Surrounds identifier with quoteChar and duplicates these symbols inside the identifier. |
| public static String | Returns:
in pedantic mode (connection property pedantic=true) identifier is treated as unquoted (as it is stored in the database) even if it starts and
ends with "`";
in non-pedantic mode if identifier starts and ends with "`" method treats it as already quoted and doesn't modify. identifier, boolean are we in pedantic mode isPedantic)Surrounds identifier with "`" and duplicates these symbols inside the identifier. |
| public static boolean | Returns: whether searchIn starts with searchFor, ignoring casethe string to search in searchIn, int the position to start at startAt, String the string to search for searchFor)Determines whether or not the string 'searchIn' contains the string 'searchFor', disregarding case and starting at 'startAt'. |
| public static int | |
| public static String | |
| public static String | Returns: the input string with all comment-delimited data removedthe source string src)Next two functions are to help DBMD check if the given string is in form of database.name and return it as "database";"name" with comments removed. |
| public static List | |
| public static List | Returns: the list of strings, split by delimiterthe string to split stringToSplit, String the string to split on delimiter, String characters that delimit the beginning of a text block to skip openingMarkers, String characters that delimit the end of a text block to skip closingMarkers, boolean should the split strings be whitespace trimmed? trim)Splits stringToSplit into a list, using the given delimiter and skipping all between the given markers. |
| public static List | Returns: the list of strings, split by delimiterthe string to split stringToSplit, String the string to split on delimiter, String characters that delimit the beginning of a text block to skip openingMarkers, String characters that delimit the end of a text block to skip closingMarkers, boolean should the split strings be whitespace trimmed? trim, Set<SearchMode> a searchMode)Set, ideally an EnumSet, containing the flags from the enum StringUtils.SearchMode that determine the
behaviour of the searchSplits stringToSplit into a list, using the given delimiter and skipping all between the given markers. |
| public static List | Returns: the list of strings, split by delimiterthe string to split stringToSplit, String the string to split on delimiter, String characters that delimit the beginning of a text block to skip openingMarkers, String characters that delimit the end of a text block to skip closingMarkers, String the subset of overridingMarkers, boolean openingMarkers that override the remaining markers, e.g., if openingMarkers = "'(" and
overridingMarkers = "'" then the block between the outer parenthesis in "start ('max('); end" is strictly consumed,
otherwise the suffix " end" would end up being consumed too in the process of handling the nested parenthesis.should the split strings be whitespace trimmed? trim)Splits stringToSplit into a list, using the given delimiter and skipping all between the given markers. |
| public static List | Returns: the list of strings, split by delimiterthe string to split stringToSplit, String the string to split on delimiter, String characters that delimit the beginning of a text block to skip openingMarkers, String characters that delimit the end of a text block to skip closingMarkers, String the subset of overridingMarkers, boolean openingMarkers that override the remaining markers, e.g., if openingMarkers = "'(" and
overridingMarkers = "'" then the block between the outer parenthesis in "start ('max('); end" is strictly consumed,
otherwise the suffix " end" would end up being consumed too in the process of handling the nested parenthesis.should the split strings be whitespace trimmed? trim, Set<SearchMode> a searchMode)Set, ideally an EnumSet, containing the flags from the enum StringUtils.SearchMode that determine the
behaviour of the searchSplits stringToSplit into a list, using the given delimiter and skipping all between the given markers. |
| public static List | Returns: an array with the database name as first element and the object name as second.the source string source, String database, if available db, String quote character as defined on server quoteId, boolean is our connection in no BackSlashEscape mode isNoBslashEscSet)Splits an entity identifier into its parts (database and entity name) and returns a list containing the two elements. |
| private static boolean | |
| public static boolean | Returns: whether searchIn starts with searchFor, ignoring casethe string to search in searchIn, String the string to search for searchFor)Determines whether or not the string 'searchIn' starts with the string 'searchFor', dis-regarding case. |
| public static boolean | Returns: true if the string starts with 'searchFor' ignoring whitespacethe string to search in searchIn, String the string to search for searchFor)Determines whether or not the string 'searchIn' starts with the string 'searchFor', disregarding case,leading whitespace and non-alphanumeric characters. |
| public static boolean | Returns: true if the string starts with 'searchFor' ignoring whitespacethe string to search in searchIn, String the string to search for searchFor)Determines whether or not the string 'searchIn' starts with the string 'searchFor', disregarding case and leading whitespace |
| public static boolean | Returns: true if the string starts with 'searchFor' ignoring whitespacethe string to search in searchIn, String the string to search for searchFor, int where to start searching beginPos)Determines whether or not the string 'searchIn' contains the string 'searchFor', disregarding case and leading whitespace |
| public static int | Returns: the 'searchFor' array index that matched or -1 if none matchesthe string to search in searchIn, String[] the string array to search for searchFor)Determines whether or not the string 'searchIn' starts with one of the strings in 'searchFor', disregarding case and leading whitespace |
| public static String | Returns: a String built from the provided String array and concatenation elements.the String array from where to take the elements. elems, String the prefix of the resulting String. prefix, String the delimiter to be used between the N-1 elements midDelimiter, String the delimiter to be used before the last element. lastDelimiter, String the suffix of the resulting String. suffix)Constructs a String containing all the elements in the String array bounded and joined by the provided concatenation elements. |
| public static String | Returns: the query string with all comment-delimited data removedthe query string to clean up. source, final String characters that delimit the beginning of a text block to skip openingMarkers, final String characters that delimit the end of a text block to skip closingMarkers, final boolean whether or not backslash escapes are allowed allowBackslashEscapes)Removes comments and hints from the given string. |
| public static byte[] | Returns: result bytesbytes to strip source, String prefix prefix, String suffix suffix)
|
| public static char[] | Returns: the ASCII char arraythe bytes to convert buffer, int the position to start converting startPos, int the length of the string to convert length)Returns the bytes as an ASCII String. |
| public static String | Returns: The ASCII String.the bytes representing the string buffer)Returns the bytes as an ASCII String. |
| public static String | Returns: the ASCII stringthe bytes to convert buffer, int the position to start converting startPos, int the length of the string to convert length)Returns the bytes as an ASCII String. |
| public static String | Returns: a String containing the Hex representation of the given bytesthe byte array to convert byteBuffer, int the number of bytes from the given array to convert length)Converts the given byte array into Hex String, stopping at given length. |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static byte[] | |
| public static String | Returns:
identifier identifier, String ` or " quoteChar)Trims the identifier, removes quote chars from first and last positions and replaces double occurrences of quote char from entire identifier, i.e. converts quoted identifier into the form as it is stored in database. |
| public static String | |
| public static boolean | Returns: true if matchesthe string to search in searchIn, String the string to search for, using the 'standard' SQL wildcard chars of '%' and '_' searchFor)Compares searchIn against searchForWildcard with wildcards, in a case insensitive manner. |
| private static int | Returns: WILD_COMPARE_MATCH if matched, WILD_COMPARE_NO_MATCH if not matched, WILD_COMPARE_CONTINUE_WITH_WILD if not matched yet, but it may in one of following recursion roundsthe string to search in searchIn, String the string to search for, using the 'standard' SQL wildcard chars of '%' and '_' searchFor)Compares searchIn against searchForWildcard with wildcards (heavily borrowed from strings/ctype-simple.c in the server sources) This method does a single passage matching for normal characters and WILDCARD_ONE (_), and recursive matching for WILDCARD_MANY (%) which may be repeated for as many anchor chars are found. |
| public static String |