Comments (11)
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 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.
cool, how could I set this option?
from gendry.
cool, how could I set this option?
Fixed
from gendry.
@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.
see the example code
from gendry.
ApplyApp.UserID is int which is not AssignableBy []uint8
another problem. how about this? @caibirdme
from gendry.
int64 type in mysql
from gendry.
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.
@caibirdme int64
from gendry.
thx
from gendry.
Related Issues (20)
- builder.BuildSelect where参数传递的map[string]interface{}在生成sql的时候where顺序随机生成,导致生成sql不走索引 HOT 1
- NamedQuery 支持嵌套 map[string]interface{}, 实现过滤条件
- 是否支持MySQL关键词 HOT 2
- scanner.Scan返回错误码 HOT 3
- buildDelete不支持limit操作 HOT 1
- 请问下, BuildInsertOnDuplicate方法支持如下的sql吗? HOT 3
- 支持force index操作吗
- "[scanner]: empty result" HOT 4
- 请问可以支持UNION ALL语句吗? HOT 1
- 支持多个 or 查询 HOT 1
- scanner在go继承模式下,无法scan到父级tag HOT 1
- 请求打个最新版本的tag HOT 1
- mysql传limit句柄错误 HOT 9
- 您好,支持 IS NOT NULL吗?在文档里没有看到 HOT 2
- 对rows进行scan后, 需要检查err
- scan不支持结构体嵌套赋值
- where语句中两列数据相互比较,如何正确声明查询条件呢? HOT 5
- scan 对于继承的struct不生效 HOT 1
- ctx超时或取消情况下,scanner.Scan()方法会把err吞掉,不返回err,导致读出的数据不全
- map[string]interface{} support between ? and ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gendry.