-
Notifications
You must be signed in to change notification settings - Fork 19
jdbc: metadata: ParameterMetaData support #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
AFAIK, we cannot obtain such metainformation from Tarantool right now and it seems we have no ways to emulate this feature on the driver side. I'll move this to @nicktorwald Can you please investigate how this usually implemented by other vendors? Whether they allows to obtain parameters metainfo w/o actual operation performing? If no, whether the metainfo is available after an operation? |
Blocked on tarantool/tarantool#3292 |
In addition to result set metadata it's possible to examine parameters of PreparedStatement using getParameterMetaData() method. Because Tarantool returns extra info related to query parameters as a result of PREPARE operation, we can fill ParameterMetaData by available info. However, the server sends always 'ANY' as a target parameter type for parameters and the driver treats all of them as UNKNOWN type. Once the server starts to send proper types (such as integer, string and so on) the driver should parse it automatically (required to be tested in future). Follows on: #173
In addition to result set metadata it's possible to examine parameters of PreparedStatement using getParameterMetaData() method. Because Tarantool returns extra info related to query parameters as a result of PREPARE operation, we can fill ParameterMetaData by available info. However, the server sends always 'ANY' as a target parameter type for parameters and the driver treats all of them as UNKNOWN type. Once the server starts to send proper types (such as integer, string and so on) the driver should parse it automatically (required to be tested in future). Follows on: #173
In addition to result set metadata it's possible to examine parameters of PreparedStatement using getParameterMetaData() method. Because Tarantool returns extra info related to query parameters as a result of PREPARE operation, we can fill ParameterMetaData by available info. However, the server sends always 'ANY' as a target parameter type for parameters and the driver treats all of them as UNKNOWN type. Once the server starts to send proper types (such as integer, string and so on) the driver should parse it automatically (required to be tested in future). Follows on: #173
The JDBC compliance requires
java.sql.ParameterMetaData
to be fully implemented.This issue is about describing Inputs of a PreparedStatement Object and optionally of a CallableStatement.
The method
PreparedStatement.getParameterMetaData
returns aParameterMetaData
object describing the parameter markers that appear in the PreparedStatement object. Methods in the ParameterMetaData interface provide information about the number of parameters and their characteristics.Example:
See the API specification for more details.
The text was updated successfully, but these errors were encountered: