DatabaseMetaData#getColumns() returns conflicting results for ResultSet#getInt("DATA_TYPE") and ResultSet#getString("TYPE_NAME")

Đang mở
#935 5 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
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java, sqlite
Lĩnh vực
database

Hướng nghiên cứu

Start by locating the implementation of DatabaseMetaData#getColumns() and the code that maps SQLite column types to JDBC DATA_TYPE values. Compare the DATA_TYPE and TYPE_NAME results for TIMESTAMP columns with ResultSetMetaData#getColumnType(index). Done means ResultSet#getInt("DATA_TYPE") reports Types#TIMESTAMP consistently; the issue provides no file or test path.

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

Mô tả

needs rework triage

DatabaseMetaData#getColumns() returns conflicting results for ResultSet#getInt("DATA_TYPE") and ResultSet#getString("TYPE_NAME")

For instance, a column with a TIMESTAMP type will have the following results:
ResultSet#getInt("DATA_TYPE") : VARCHAR
ResultSet#getString("TYPE_NAME") : TIMESTAMP (declared SQL type)

Of course, the right answer is TIMESTAMP. Also, for the same column referenced in a query the result is Types#TIMESTAMP as it should be.
ResultSetMetaData#getColumnType(index) : Types#TIMESTAMP

Please fix the ResultSet#getInt("DATA_TYPE") for use with DatabaseMetaData#getColumns().

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.