Skip to content

rows.ColumnTypes() not working ? #595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
telemac opened this issue May 18, 2017 · 5 comments
Closed

rows.ColumnTypes() not working ? #595

telemac opened this issue May 18, 2017 · 5 comments

Comments

@telemac
Copy link

telemac commented May 18, 2017

Hello,

I need to get back the Mysql types of the columns of a request

Example code

columnTypes, err := rows.ColumnTypes()
...
for _, columnType := range columnTypes {
fmt.Printf("columnType = %#v\n", columnType.DatabaseTypeName())
}

this returns en empty string

Configuration

commit 382e13d

Go version: run go version in your console
go1.8.1 darwin/amd64

Server version: E.g. MySQL 5.6, MariaDB 10.0.20
mysqld Ver 5.7.18-0ubuntu0.16.04.1 for Linux on x86_64 ((Ubuntu))

Server OS: E.g. Debian 8.1 (Jessie), Windows 10
Ubuntu 16.04
Linux nuc 4.4.0-77-generic #98-Ubuntu SMP Wed Apr 26 08:34:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

@julienschmidt
Copy link
Member

See https://github.com/go-sql-driver/mysql/tree/columntype
Will merged when the other type interface implementations and the documentation are done

@codecat
Copy link

codecat commented Jun 18, 2017

Ran into this just now, is there no workaround for this?

Edit: I guess the temporary workaround is to just manually merge the columntype branch. Works fine for now.

@Soontao
Copy link

Soontao commented Jul 10, 2017

waiting for good news. I've tried the columntype branch, but nullable was not works correctly now.

@AndrewHogg
Copy link

I've been using this branch and so far its working very well

@julienschmidt
Copy link
Member

See #667

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants