-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
mariadb 10.0.22 problem #5
Comments
Hi @tophe . I added quoting-code to your comment to facilitate reading it. When you use db.query sql do |rs|
# rs is a ResultSet, not a row.
# you can ask column information, yes
puts rs.column_name(0)
# but you need to call ResultSet#each to iterate over the rows
rs.each do
puts rs.read(Int32)
end
end Alternative you can use db.query_one sql do |rs|
puts rs.column_name(0)
puts rs.read(Int32)
end Or if you just want the id puts db.scalar sql Your issue was calling |
Oh, thank you for that clean explanation ! |
just to be sure, right now we can read String with are nullable on mysql.
|
@tophe use |
hello,
I have issue using the driver, as I run the readme code exemple it work, but when I run that:
I have :
using Crystal 0.18.7 68783f1 on ubuntu 14.4, mariadb 10.0.22
The text was updated successfully, but these errors were encountered: