Giter VIP home page Giter VIP logo

Comments (11)

caibirdme avatar caibirdme commented on July 4, 2024 1

Actually, this is a bug. If you don't set parseTime=true when initialize the sql.DB, the mysql driver won't parse datetime type, thus it returns a []uint8 to gendry. Gendry will convert it to string or something else, but lost the case of time! Gendry should have been smarter to handle this case, and I'll fix it as soon as possible
But for now, the workaround is set parseTime=true

from gendry.

caibirdme avatar caibirdme commented on July 4, 2024 1

@caibirdme int64

gendry will convert []uint8 to int automatically. I suggest that you can confirm the data in your mysql, is that data able to convert to int

from gendry.

arthurkiller avatar arthurkiller commented on July 4, 2024

@caibirdme

cool, how could I set this option?

from gendry.

caibirdme avatar caibirdme commented on July 4, 2024

@caibirdme

cool, how could I set this option?

Fixed

from gendry.

arthurkiller avatar arthurkiller commented on July 4, 2024

@caibirdme Thx for your contribution. But, we have pined on a specific version, and the upgrade could be hard.

So how could I use the parseTime=true to work around this?

from gendry.

caibirdme avatar caibirdme commented on July 4, 2024

see the example code

from gendry.

arthurkiller avatar arthurkiller commented on July 4, 2024

ApplyApp.UserID is int which is not AssignableBy []uint8

another problem. how about this? @caibirdme

from gendry.

arthurkiller avatar arthurkiller commented on July 4, 2024

int64 type in mysql

from gendry.

caibirdme avatar caibirdme commented on July 4, 2024

ApplyApp.UserID is int which is not AssignableBy []uint8

another problem. how about this? @caibirdme

What's the type of that column in the table?

from gendry.

arthurkiller avatar arthurkiller commented on July 4, 2024

@caibirdme int64

from gendry.

arthurkiller avatar arthurkiller commented on July 4, 2024

thx

from gendry.

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.