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

Aperta
#928 20 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java, sqlite

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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]
Lingua principale
Java
Stelle
3.3k
Fork
676
Merge medio
1g 15h
PR unite (30g)
18

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di xerial/sqlite-jdbc

Tutte le issue di xerial/sqlite-jdbc

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.