forked from dork/tarantool-java
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jdbc: support for sub-set of JDBC escape syntax
Add a driver SQL pre-processing before sending it to the server. The driver supports sub-set of scalar functions defined by the spec (appendix C), outer joins, escape clause for SQL LIKE operator, and limit/offset clause. The processed result can be received using Connection.nativeSQL() method. Closes #79 Closes #76 Closes #81 Closes #83 Closes #84 Affects: #108
- Loading branch information
1 parent
fb2e568
commit 939a617
Showing
13 changed files
with
1,585 additions
and
13 deletions.
There are no files selected for viewing
416 changes: 416 additions & 0 deletions
416
src/main/java/org/tarantool/jdbc/EscapeSyntaxParser.java
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.tarantool.util; | ||
|
||
/** | ||
* Represents a function that accepts two arguments and | ||
* produces a result or throws an exception. | ||
* | ||
* @param <T> type of the first argument to the function | ||
* @param <U> type of the second argument to the function | ||
* @param <R> type of the result of the function | ||
* @param <E> type of the exception in case of error | ||
*/ | ||
@FunctionalInterface | ||
public interface ThrowingBiFunction<T, U, R, E extends Exception> { | ||
|
||
/** | ||
* Applies this function to the given arguments. | ||
* | ||
* @param argument1 first argument | ||
* @param argument2 second argument | ||
* | ||
* @return function result | ||
* | ||
* @throws E if any error occurs | ||
*/ | ||
R apply(T argument1, U argument2) throws E; | ||
|
||
} |
Oops, something went wrong.