JDBC driver impl of DatabaseMetadata#getTypeInfo() is rather incomplete

Aperta
#937 3 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
32/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java, sqlite
Ambito
database

Direzione di ricerca

The issue demonstrates the output of DatabaseMetadata#getTypeInfo() but names no implementation file or test. Start by locating that method and its tests, then compare the reported five rows with SQLite’s available SQL types. Done means the result includes the supported type mappings; the issue gives no expected complete mapping to verify against.

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

Descrizione

needs rework triage

The result returned from DatabaseMetadata#getTypeInfo() is a very small (useless) subset of the SQL types sqlite provides.

  1. Run the following on any database:
ResultSet rs = dbMetaData.getTypeInfo();
while (rs.next())
  out.println(rs.getString("TYPE_NAME") + "\t" + JDBCType.valueOf(rs.getInt("DATA_TYPE")).getName());
  1. Result:
BLOB	BLOB
INTEGER	INTEGER
NULL	NULL
REAL	REAL
TEXT	VARCHAR
  1. As you can see, these mappings only cover a small fraction of the available sqlite SQL types. I was hoping to use this to overcome https://github.com/xerial/sqlite-jdbc/issues/935.
  2. Given all the shortcuts taken in this driver wrt type-safety, one has to conclude the implementers don't consider type-safety a worthwhile aspect. If that is the case, please let me know so I can account for that in my project (and stop filing issues here). Thanks.
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.