-
-
Save codenoid/99bca9a3f36ff249c67852e5ae9f3dda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qdata = {} of String => String | |
db.query "select column1, column2, column3 from table" do |rs| | |
rs.each do | |
qdata["title"] = rs.read(String) | |
qdata["desc"] = rs.read(String) | |
lats = rs.read(String).split('~') | |
qdata["lat"] = lats[0] | |
qdata["long"] = lats[1] | |
end | |
end | |
puts qdata.to_json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment