Class ClientParser

    • Method Detail

      • parameterPartsCheckReturning

        public static ClientParser parameterPartsCheckReturning​(String queryString,
                                                                boolean noBackslashEscapes)
        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 - query
        noBackslashEscapes - escape mode
        Returns:
        ClientPrepareResult
      • parameterParts

        public static ClientParser parameterParts​(String queryString,
                                                  boolean noBackslashEscapes)
        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 - query
        noBackslashEscapes - escape mode
        Returns:
        ClientPrepareResult
      • hasParameter

        public static boolean hasParameter​(String queryString,
                                           boolean noBackslashEscapes)
        Check if SQL has parameter.
        Parameters:
        queryString - query
        noBackslashEscapes - escape mode
        Returns:
        True if has named parameter
      • getSql

        public String getSql()
      • getQuery

        public byte[] getQuery()
      • getParamPositions

        public List<Integer> getParamPositions()
      • getParamNameList

        public List<String> getParamNameList()
      • isReturning

        public boolean isReturning()
      • supportAddingReturning

        public Boolean supportAddingReturning()
      • validateAddingReturning

        public void validateAddingReturning()