Created
May 5, 2014 20:30
-
-
Save vanderhoop/e578b537d7ad9f1f05aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| require 'pg' | |
| db_conn = PG.connect(dbname: 'shopping_db') | |
| result = db_conn.exec(string_of_sql) | |
| entry_as_hash = result[0] # yield a hash of the first row. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment