Giter VIP home page Giter VIP logo

Comments (10)

julienschmidt avatar julienschmidt commented on May 19, 2024

So are these fields NULL ?

from mysql.

arnehormann avatar arnehormann commented on May 19, 2024

It's a database/sql issue, which provides no NullTimeValue.
Have a look at issue #9 (esp. the part The driver gets no information about the destination type).

from mysql.

einthusan avatar einthusan commented on May 19, 2024

Yes it's NULL. As for not being able handle this kind of renders the time.Time support useless? Unless there is some workaround that does indeed use the recently added support for time.Time as oppose to manual string conversion.

from mysql.

arnehormann avatar arnehormann commented on May 19, 2024

You could make the timestamp non-null in the table and use a "marker time". It could even be faster that way.
I know, this advice sucks - but database/sql is not that good at supporting NULLable columns (yet?).

from mysql.

julienschmidt avatar julienschmidt commented on May 19, 2024

I'll add a NullTime type to the driver later

from mysql.

arnehormann avatar arnehormann commented on May 19, 2024

Just for reference:
The PostreSQL driver uses this NullTime

from mysql.

einthusan avatar einthusan commented on May 19, 2024

Thanks for that bit of info.. but I really am not sure how to implement this so I will just wait for an official fix to this repo and in the meantime will make the mysql field as non-NULL. This defaults to 0000-00-00 00:00:00

from mysql.

arnehormann avatar arnehormann commented on May 19, 2024

That was intended as a reference for whoever implements NullTime (probably Julien), not for users of the driver 😀 .

from mysql.

julienschmidt avatar julienschmidt commented on May 19, 2024

*Juli_e_n
See #63 ;)

from mysql.

arnehormann avatar arnehormann commented on May 19, 2024

Your issue would be...? (thank the Octocat for the edit function...)

from mysql.

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.