Giter Club home page Giter Club logo

Comments (3)

gwenn avatar gwenn commented on August 14, 2024

Don't fix the dialect, fix the driver.

https://docs.oracle.com/javase/6/docs/api/java/sql/ResultSetMetaData.html#getColumnType(int)

Retrieves the designated column's SQL type.

Not the value type...

And https://sqlite.org/datatype3.html

In order to maximize compatibility between SQLite and other database engines, and so that the example above will work on SQLite as it does on other SQL database engines, SQLite supports the concept of "type affinity" on columns. The type affinity of a column is the recommended type for data stored in that column.

'NULL' is not listed among type affinities: 'TEXT', 'NUMERIC', 'INTEGER', 'REAL', 'BLOB'.

from sqlite-dialect.

fireandfuel avatar fireandfuel commented on August 14, 2024

If it's a driver issue, how should it be fixed at the driver?

from sqlite-dialect.

gwenn avatar gwenn commented on August 14, 2024

Something like:

  1. Do not take into account the value type,
  2. Retrieve the "type affinity" using the same rules as SQLite and return the appropriate SQL type.

Or:
Just replace NULL by NUMERIC (the default type affinity).

from sqlite-dialect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.