Guest User

Untitled

a guest
Jan 13th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. EM.run {
  2. db = EM.connect_unix_domain( "/tmp/.s.PGSQL.5432", EM::P::Postgres3 )
  3. db.connect( "mydb", "myuser", "" ).callback do |status|
  4. if status
  5. db.query( "select * from largish_table_with_200k_rows" ).callback do |status, result, errors|
  6. if status
  7. result.rows.each do |row|
  8. p row
  9. end
  10. end
  11. end
  12. end
  13. end
  14. }
Add Comment
Please, Sign In to add comment