Package org.mariadb.jdbc.util
Class ClientParser
java.lang.Object
org.mariadb.jdbc.util.ClientParser
- All Implemented Interfaces:
PrepareResult
-
Method Summary
Modifier and TypeMethodDescriptionintbyte[]getQuery()getSql()booleanisInsert()booleanbooleanstatic ClientParserparameterParts(String queryString, boolean noBackslashEscapes) For a givenqueryString, get query - a byte array containing the UTF8 representation of that string paramPositions - the byte positions of any '?'static ClientParserrewritableParts(String queryString, boolean noBackslashEscapes) For a givenqueryString, get the fields and flags fromparameterParts(String, boolean), and valuesBracketPositions - a two-element list containing the positions of the opening and closing parenthesis of the VALUES block
-
Method Details
-
parameterParts
For a givenqueryString, get- query - a byte array containing the UTF8 representation of that string
- paramPositions - the byte positions of any '?' positional parameters in
query
- isInsert - queryString contains 'INSERT' outside of quotes, without one of the characters '();>invalid input: '<'=-+,' immediately preceding or following
- isInsertDuplicate - isInsert invalid input: '&'invalid input: '&' queryString contains 'DUPLICATE' outside of quotes, without one of the characters '();>invalid input: '<'=-+,' immediately preceding or following
- isMulti - queryString contains text after the last ';' outside of quotes
- Parameters:
queryString- querynoBackslashEscapes- escape mode- Returns:
- ClientParser
-
rewritableParts
For a givenqueryString, get the fields and flags fromparameterParts(String, boolean), and- valuesBracketPositions - a two-element list containing the positions of the opening and closing parenthesis of the VALUES block
- Parameters:
queryString- querynoBackslashEscapes- escape mode- Returns:
- ClientParser
-
getSql
- Specified by:
getSqlin interfacePrepareResult
-
getQuery
public byte[] getQuery() -
getParamPositions
-
getValuesBracketPositions
-
getParamCount
public int getParamCount()- Specified by:
getParamCountin interfacePrepareResult
-
isInsert
public boolean isInsert() -
isInsertDuplicate
public boolean isInsertDuplicate() -
isMultiQuery
public boolean isMultiQuery()
-