Package org.mariadb.jdbc.util
Class ClientParser
java.lang.Object
org.mariadb.jdbc.util.ClientParser
- All Implemented Interfaces:
PrepareResult
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<String,
ClientParser> private final int
private final List<byte[]>
private final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
List<byte[]>
getSql()
static ClientParser
parameterParts
(String queryString, boolean noBackslashEscapes) Separate query in a String list and set flag isQueryMultipleRewritable.
-
Field Details
-
sql
-
queryParts
-
paramCount
private final int paramCount -
cache
-
-
Constructor Details
-
ClientParser
-
-
Method Details
-
parameterParts
Separate query in a String list and set flag isQueryMultipleRewritable. The resulting string list is separed by ? that are not in comments. isQueryMultipleRewritable flag is set if query can be rewrite in one query (all case but if using "-- comment"). example for query : "INSERT INTO tableName(id, name) VALUES (?, ?)" result list will be : {"INSERT INTO tableName(id, name) VALUES (", ", ", ")"}- Parameters:
queryString
- querynoBackslashEscapes
- escape mode- Returns:
- ClientPrepareResult
-
getSql
- Specified by:
getSql
in interfacePrepareResult
-
getQueryParts
-
getParamCount
public int getParamCount()- Specified by:
getParamCount
in interfacePrepareResult
-