Revisit ResultSetMetaData results

Aperta
#1,319 1 commento 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
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java, sqlite
Ambito
database

Direzione di ricerca

Start by locating the implementations of ResultSetMetaData::getColumnDisplaySize, getPrecision, and getScale, then inspect how they derive results for SQL column types such as INTEGER, BIGINT, and VARCHAR. Compare the returned values with the examples in the issue; done means these methods return meaningful type-based metadata instead of 0 or Integer.MAX_VALUE. The issue has had no recent discussion for over a year.

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

Descrizione

enhancement:JDBC

Methods

  • ResultSetMetaData::getColumnDisplaySize
  • ResultSetMetaData::getPrecision
  • ResultSetMetaData::getScale

For different column types like Types.INTEGER, Types.BIGINT, Types.VARCHAR often return 0 or Integer.MAX_VALUE instead of meaningful values.

This is a proposal to revisit this metadata methods and return meaningful values based on SQL-type.

E.g. for Types.VARCHAR ::getColumnDisplaySize result should be equal to ::getPrecision result.
E.g. for Types.INTEGER ::getPrecision result might be equal to 10 instead of current 0 (10 decimal digits max - PostgreSQL's approach).
E.g. for Types.INTEGER ::getColumnDisplaySize result might be equal to 11 instead of current Integer.MAX_VALUE (10 digits + potential minus sign - PostgreSQL's approach).
E.g. for Types.BIGINT ::getPrecision result might be equal to 19 instead of current 0 (19 decimal digits max - PostgreSQL's approach).
E.g. for Types.BIGINT ::getColumnDisplaySize result might be equal to 20 instead of current Integer.MAX_VALUE (19 digits + potential minus sign - PostgreSQL's approach).

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.