PreparedStatement#getParameterMetadata()#getParameterType() results in string type, context type

Đang mở
#928 20 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java, sqlite
Lĩnh vực
database, databases

Hướng nghiên cứu

Start by tracing how PreparedStatement#getParameterMetadata() and getParameterType() produce metadata for a parameter in a query such as the City.country_id example. Check the relevant JDBC driver code and tests for parameter metadata; the payload names no files or tests. Done means the metadata reports the parameter's context type instead of VARCHAR, with coverage for the example.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

blocked:sqlite limitation enhancement:JDBC

PreparedStatement#getParameterMetadata()#getParameterType() results in string (varchar) type, regardless of the parameter's context type.

For instance,

SELECT * FROM City WHERE country_id = ?

Here country_id is an unsigned int, however the call to getParameterType(1) returns java.sql.Types#VARCHAR. This behavior is at odds with type-safe languages that use this metadata for code generation.

Environment (please complete the following information):

  • OS: Windows 10, x86_64
  • sqlite-jdbc version [e.g. 3.39.2.0]
Ngôn ngữ chính
Java
Star
3.3k
Fork
676
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
18

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của xerial/sqlite-jdbc

Tất cả issue của xerial/sqlite-jdbc

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.