public abstract class SqlListenerUtils extends Object
| Constructor and Description |
|---|
SqlListenerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
exceptionToSqlErrorCode(Throwable e) |
static boolean |
isPlainType(Class<?> cls) |
static @Nullable Object |
readObject(BinaryReaderExImpl reader,
boolean binObjAllow) |
static @Nullable Object |
readObject(BinaryReaderExImpl reader,
boolean binObjAllow,
boolean keepBinary) |
static @Nullable Object |
readObject(byte type,
BinaryReaderExImpl reader,
boolean binObjAllow,
boolean keepBinary) |
static String |
translateSqlWildcardsToRegex(String sqlPtrn)
Converts sql pattern wildcards into java regex wildcards.
|
static void |
writeObject(BinaryWriterExImpl writer,
@Nullable Object obj,
boolean binObjAllow) |
@Nullable public static @Nullable Object readObject(BinaryReaderExImpl reader, boolean binObjAllow) throws BinaryObjectException
reader - Reader.binObjAllow - Allow to read non plaint objects.BinaryObjectException - On error.@Nullable public static @Nullable Object readObject(BinaryReaderExImpl reader, boolean binObjAllow, boolean keepBinary) throws BinaryObjectException
reader - Reader.binObjAllow - Allow to read non plaint objects.keepBinary - Whether to deserialize objects or keep in binary format.BinaryObjectException - On error.@Nullable public static @Nullable Object readObject(byte type, BinaryReaderExImpl reader, boolean binObjAllow, boolean keepBinary) throws BinaryObjectException
type - Object type.reader - Reader.binObjAllow - Allow to read non plaint objects.BinaryObjectException - On error.public static void writeObject(BinaryWriterExImpl writer, @Nullable @Nullable Object obj, boolean binObjAllow) throws BinaryObjectException
writer - Writer.obj - Object to write.binObjAllow - Allow to write non plain objects.BinaryObjectException - On error.public static boolean isPlainType(Class<?> cls)
cls - Class.true is the type is plain (not user's custom class).public static int exceptionToSqlErrorCode(Throwable e)
e - Exception to convert.public static String translateSqlWildcardsToRegex(String sqlPtrn)
Converts sql pattern wildcards into java regex wildcards.
Translates "_" to "." and "%" to ".*" if those are not escaped with "\" ("\_" or "\%").
All other characters are considered normal and will be escaped if necessary.
Example:
som_ --> som.
so% --> so.*
s[om]e --> so\[om\]e
so\_me --> so_me
some? --> some\?
som\e --> som\\e
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023